Created
October 24, 2020 20:06
-
-
Save buzztiaan/1ab377db647509b2e1fa9e4abd6eadf5 to your computer and use it in GitHub Desktop.
rss roulette function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import feedparser | |
import random | |
NewsFeed = feedparser.parse("https://speld.nl/feed/") | |
numberofentries = len(NewsFeed.entries) | |
pickedentry = random.randint(0,numberofentries-1) | |
entry = NewsFeed.entries[pickedentry]; | |
print entry.title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment