forked from sch/Slixfeed
Add a missing argument to function extract_image_from_html.
Thank you. roughnecks.
This commit is contained in:
parent
442fa016f0
commit
59f74df2fb
2 changed files with 3 additions and 2 deletions
|
@ -323,7 +323,7 @@ class Html:
|
|||
async def extract_image_from_html(url):
|
||||
function_name = sys._getframe().f_code.co_name
|
||||
logger.debug('{}: url: {}'.format(function_name, url))
|
||||
result = await fetch.http(url)
|
||||
result = await fetch.http(settings_network, url)
|
||||
if not result['error']:
|
||||
data = result['content']
|
||||
tree = html.fromstring(data)
|
||||
|
@ -552,6 +552,7 @@ class Url:
|
|||
else:
|
||||
proxies_obsolete_file = os.path.join(configuration_directory, 'proxies_obsolete.toml')
|
||||
proxies_file = os.path.join(configuration_directory, 'proxies.toml')
|
||||
breakpoint()
|
||||
proxies_obsolete = Toml.open_file(proxies_obsolete_file)
|
||||
proxies_obsolete['proxies'][proxy_name][proxy_type].append(proxy_url)
|
||||
Toml.save_file(proxies_obsolete_file, proxies_obsolete)
|
||||
|
|
|
@ -676,7 +676,7 @@ class XmppChatAction:
|
|||
if enclosure:
|
||||
media_url = enclosure
|
||||
else:
|
||||
media_url = await Html.extract_image_from_html(url)
|
||||
media_url = await Html.extract_image_from_html(self.settings_network, url)
|
||||
try:
|
||||
http_headers = await Http.fetch_headers(self.settings_network, media_url)
|
||||
if ('Content-Length' in http_headers):
|
||||
|
|
Loading…
Reference in a new issue