Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old RSS Feeds #101

Open
dylanjgraham opened this issue Jan 31, 2018 · 3 comments
Open

Old RSS Feeds #101

dylanjgraham opened this issue Jan 31, 2018 · 3 comments

Comments

@dylanjgraham
Copy link

top headline reads "This RSS feed URL is deprecated". Google deprecated their old RSS protocols on December 1st 2017

@vuongmt
Copy link

vuongmt commented Mar 5, 2018

you will need to replace the headlines_url to "https://news.google.com/news/rss/?ned=us&gl=US&hl=en"

@hefta12
Copy link

hefta12 commented Jun 17, 2018

I've replaced headlines_url, but it doesn't work propellery. Any ideas how to fix news?

@vuongmt
Copy link

vuongmt commented Jul 5, 2018

here's my news code:

class News(Frame):
def init(self, parent, *args, **kwargs):
Frame.init(self, parent, *args, **kwargs)
self.config(bg='black')
self.title = 'News' # 'News' is more internationally generic
self.newsLbl = Label(self, text=self.title, font=('Helvetica', medium_text_size), fg="white", bg="black")
self.newsLbl.pack(side=TOP, anchor=W)
self.headlinesContainer = Frame(self, bg="black")
self.headlinesContainer.pack(side=TOP)
self.get_headlines()

def get_headlines(self):
    try:
        # remove all children
        for widget in self.headlinesContainer.winfo_children():
            widget.destroy()
        if news_country_code == None:
            headlines_url =  "https://news.google.com/news/rss/?ned=us&gl=US&hl=en"
        else:
            headlines_url = "https://news.google.com/news/rss/?ned=us&gl=US&hl=en"
            # Old news: "https://news.google.com/news?ned=%s&output=rss" % news_country_code
            
        feed = feedparser.parse(headlines_url)

        for post in feed.entries[0:5]:
            headline = NewsHeadline(self.headlinesContainer, post.title)
            headline.pack(side=TOP, anchor=W)
    except Exception as e:
        traceback.print_exc()
        print ("Error: %s. Cannot get news." % e)

    self.after(600000, self.get_headlines)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants