Whats happend here?
Code:
class google_news_sample(BasicNewsRecipe):
# variables you should change to fit your requests!
# here are a sample for an english speaking user intrested in ebook content and news from Denver Colorado
#
searchfor = 'ebook' # a serarch topic, filled into the string below. You can change that to anything google news should be searched for...
my_language_id = 'en' # may us, de, or other.... change this if you want
location = 'DenverCo'
# Titel of the Recipe - this is a sample
title = 'Google News sample'
cover_url = 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/Google_News_icon.svg/500px-Google_News_icon.svg.png'
# Author
__author__ = 'Volker Heggemann, VoHe'
# delete some stuff here
# feel free to add, wipe out what you need ---- can be edit by user
#
feeds = [
('Google news for '+location,
'https://news.google.com/news/rss/headlines/section/geo/'+location),
('Google news intrested in '+searchfor,
'https://news.google.com/news?cf=all&hl='+my_language_id+'+&pz=1&ned='+my_language_id+'&q='+searchfor+'&output=rss'),
]
because of the variables above the URL's this:
Code:
('Google news for '+location,'https://news.google.com/news/rss/headlines/section/geo/'+location)
changes to:
Code:
('Google news for DenverCo','https://news.google.com/news/rss/headlines/section/geo/DenverCo')
and this:
Code:
('Google news intrested in '+searchfor,'https://news.google.com/news?cf=all&hl='+my_language_id+'+&pz=1&ned='+my_language_id+'&q='+searchfor+'&output=rss')
now is:
Code:
('Google news intrested in ebook','https://news.google.com/news?cf=all&hl=en+&pz=1&ned=en&q=ebook&output=rss')
that's the whole trick.
So if YOU change the variables at the beginning (and may you need the news.google.com URL to the one of your country) you can get news for any place and any theme you intressted in.