Add "search" option

PLEASE NOTE that this is case sensitive and does really basic research ("is xyz in the title?"). Don't use this for fine filtering.
Also fixed an issue with After(), due to the fact that some functions were removing items from the feed while looping over the feed items, creating some anoying item-skipping issues.
master
pictuga 2014-11-06 21:11:23 +01:00
parent 690bf43977
commit 1a8ee716f3
1 changed files with 5 additions and 1 deletions

View File

@ -669,7 +669,11 @@ def Gather(rss, url, cache, options):
def After(rss, options): def After(rss, options):
for i, item in enumerate(rss.items): for i, item in enumerate(list(rss.items)):
if options.search:
if options.search not in item.title:
item.remove()
continue
if item.desc and item.content: if item.desc and item.content:
if options.clip: if options.clip: