feeds: remove mimetype from function call as no longer used

master
pictuga 2020-04-28 22:07:25 +02:00
parent 749acc87fc
commit a1dc96cb50
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ def parse_rules(filename=None):
return rules
def parse(data, url=None, mimetype=None, encoding=None):
def parse(data, url=None, encoding=None):
" Determine which ruleset to use "
rulesets = parse_rules()
@ -760,7 +760,7 @@ if __name__ == '__main__':
from . import crawler
data, con, contenttype, encoding = crawler.adv_get(sys.argv[1] if len(sys.argv) > 1 else 'https://www.nytimes.com/', follow='rss')
feed = parse(data, url=con.geturl(), mimetype=contenttype, encoding=encoding)
feed = parse(data, url=con.geturl(), encoding=encoding)
if not sys.flags.interactive:
for item in feed.items:

View File

@ -330,7 +330,7 @@ def FeedFetch(url, options):
else:
try:
rss = feeds.parse(xml, url, contenttype, encoding=encoding)
rss = feeds.parse(xml, url, encoding=encoding)
rss = rss.convert(feeds.FeedXML)
# contains all fields, otherwise much-needed data can be lost