actually pass Request objects to utils.http.request_many() from rss.py

This commit is contained in:
jesopo 2019-09-19 15:04:50 +01:00
parent 88a69aaa66
commit 957a222f96

View file

@ -47,7 +47,6 @@ class Module(ModuleManager.BaseModule):
if server and channel_name in server.channels: if server and channel_name in server.channels:
channel = server.channels.get(channel_name) channel = server.channels.get(channel_name)
for url in urls: for url in urls:
request = utils.http.Request(url, id=url)
if not url in hooks: if not url in hooks:
hooks[url] = [] hooks[url] = []
hooks[url].append((server, channel)) hooks[url].append((server, channel))
@ -55,7 +54,11 @@ class Module(ModuleManager.BaseModule):
if not hooks: if not hooks:
return return
pages = utils.http.request_many(hooks.keys()) requests = []
for url in hooks.keys():
requests.append(utils.http.Request(url, id=url))
pages = utils.http.request_many(requests)
for url, channels in hooks.items(): for url, channels in hooks.items():
if not url in pages: if not url in pages: