Add :resolve to remove (some?) tracking links

master
pictuga 2020-09-15 22:57:52 +02:00
parent 504ede624d
commit 9ecf856f10
3 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,7 @@ action:
--proxy doesn't fill the articles --proxy doesn't fill the articles
--newest return the feed items in chronological order (morss ohterwise shows the items by appearing order) --newest return the feed items in chronological order (morss ohterwise shows the items by appearing order)
--firstlink pull the first article mentioned in the description instead of the default link --firstlink pull the first article mentioned in the description instead of the default link
--resolve replace tracking links with direct links to articles (not compatible with --proxy)
custom feeds: custom feeds:
--items XPATH (mandatory to activate the custom feeds function) xpath rule to match all the RSS entries --items XPATH (mandatory to activate the custom feeds function) xpath rule to match all the RSS entries

View File

@ -44,6 +44,7 @@ def cli_app():
group.add_argument('--proxy', action='store_true', help='doesn\'t fill the articles') group.add_argument('--proxy', action='store_true', help='doesn\'t fill the articles')
group.add_argument('--newest', action='store_true', help='return the feed items in chronological order (morss ohterwise shows the items by appearing order)') group.add_argument('--newest', action='store_true', help='return the feed items in chronological order (morss ohterwise shows the items by appearing order)')
group.add_argument('--firstlink', action='store_true', help='pull the first article mentioned in the description instead of the default link') group.add_argument('--firstlink', action='store_true', help='pull the first article mentioned in the description instead of the default link')
group.add_argument('--resolve', action='store_true', help='replace tracking links with direct links to articles (not compatible with --proxy)')
group = parser.add_argument_group('custom feeds') group = parser.add_argument_group('custom feeds')
group.add_argument('--items', action='store', type=str, metavar='XPATH', help='(mandatory to activate the custom feeds function) xpath rule to match all the RSS entries') group.add_argument('--items', action='store', type=str, metavar='XPATH', help='(mandatory to activate the custom feeds function) xpath rule to match all the RSS entries')

View File

@ -226,6 +226,9 @@ def ItemFill(item, options, feedurl='/', fast=False):
if out is not None: if out is not None:
item.content = out item.content = out
if options.resolve:
item.link = req['url']
return True return True