feeds: remove mimetype from function call as no longer used
This commit is contained in:
parent
749acc87fc
commit
a1dc96cb50
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user