It is currently April 16th, 2024, 3:12 pm

Google feed "For you"

General topics related to Rainmeter.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Google feed "For you"

Post by kyriakos876 »

Hello,
Any chance that there's an RSS URL for google's feed where you put your ID and PW in the link and get news related to you? Kinda like "google now" in android phones.... Did some research but didn't find something.

-Thanks in advance!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Google feed "For you"

Post by eclectic-tech »

kyriakos876 wrote: November 1st, 2018, 1:46 pm Hello,
Any chance that there's an RSS URL for google's feed where you put your ID and PW in the link and get news related to you? Kinda like "google now" in android phones.... Did some research but didn't find something.

-Thanks in advance!
I was able to work out a way to parse Google Alerts that are set up to be delivered as RSS.

Create an alert in your Google account. https://www.google.com/alerts
When you set the options for the alert, set 'Deliver to' as RSS
Then from your list of alerts, right-click the RSS icon and select 'Copy link location'
This will be a URL in the form of 'https://www.google.com/alerts/feeds/{userid}/{alertid}'
Use that as the URL in Webparser or create a #URL# variable with that value
The RegExp to obtain Title and Link is: <entry>.*<title.*>(.*)<.*url=(.*)&.*</entry>.*
I set that as a variable #Storysect# and repeat it 10 times to obtain the data:

Code: Select all

[RSS]
Measure=WebParser
Url=#URL#
; Parse multiple sections the neat way using a variable in the RegExp that defines the repeated captures
RegExp=(?siU)#storysect##storysect##storysect##storysect##storysect##storysect##storysect##storysect##storysect##storysect#
The issue I had was determining how Google coded the link :x ... and needed a substitution to for embedded HTML code in the Title child measures: Substitute="<b>":"","</b>":"","&#39;":"'"
I am sure there are other HTML characters that I haven't seen yet that can be added to the substitution.

With a slight modification to the #storysect# experession, you can get the 'publish date/time' and 'content' info.
Google Alerts let you customize the content based on keywords.

I sent you a PM