From 59f74df2fbc5cdde08ecdc0f8de0aaa53ba5c375 Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Thu, 28 Nov 2024 09:09:10 +0200 Subject: [PATCH] Add a missing argument to function extract_image_from_html. Thank you. roughnecks. --- slixfeed/utilities.py | 3 ++- slixfeed/xmpp/chat.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/slixfeed/utilities.py b/slixfeed/utilities.py index dcac9da..15a30b0 100644 --- a/slixfeed/utilities.py +++ b/slixfeed/utilities.py @@ -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) diff --git a/slixfeed/xmpp/chat.py b/slixfeed/xmpp/chat.py index 76d7926..be06aa6 100644 --- a/slixfeed/xmpp/chat.py +++ b/slixfeed/xmpp/chat.py @@ -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):