

readlines () urls = # remove the '\n' char f. # Just some sample keywords to search for in the title key_words = # get the urls we have seen prior f = open ( 'viewed_urls.txt', 'r' ) urls = f. Now, here is our updated code with those features: I could get a bit more fancy and use a local sqlite database but for a script this simple its really just overkill in my humble opinion. So that is one reason I am using the text file database. But there are some feeds where content is added where the date is older but the entry is actually “new”. Let's make this script a little more useful though by having it only match on certain keywords being contained in the title of the entry and let's add a simple text file database to keep track of the entries that we have seen before.įor a lot of RSS feeds we could skip the database and use the date to indicate whether an entry is new. Now that is fairly useful but you could easily do that with IFTTT and wouldn’t have to write a line of code. parse ( rss ) for key in feed : title = key url = key Adding the ability to search for keywords Source = (request_body),īut when I change https.request to http.Import feedparser rss = '' feed = feedparser. My code is: local https = require "ssl.https" If I change the https to http I get access denied errors, but with https I just get nil outputted from all of my variables. I am trying to create a new PushBullet message using a POST request, however nothing is being returned by the server. I am new to Lua so please bear with me, I know I am doing something silly - I just need another pair of eyes.
