diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2023-09-11 10:39:36 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2023-09-11 10:39:36 +0300 |
| commit | 8c54989f182e2485564a071cbae43afb64cb8905 (patch) | |
| tree | 461c0925857039f8f9f3cd56cd9b027ef5e99402 /plugins/ScraperSourcePlugin.py | |
| parent | a8aed014dbbfed67ef56fdda6219e7f17922f383 (diff) | |
Fix html parsing
Diffstat (limited to 'plugins/ScraperSourcePlugin.py')
| -rw-r--r-- | plugins/ScraperSourcePlugin.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/ScraperSourcePlugin.py b/plugins/ScraperSourcePlugin.py index 75aa376..b51943b 100644 --- a/plugins/ScraperSourcePlugin.py +++ b/plugins/ScraperSourcePlugin.py @@ -47,9 +47,7 @@ class Plugin(PluginInterface): result_items: list[Item] = [] with requests.session() as session: page_resp = session.get(self.url, allow_redirects=True) - page_elem = BeautifulSoup( - page_resp.text, features=["xml", "lxml", "lxml-xml"] - ) + page_elem = BeautifulSoup(page_resp.text, "html.parser") post_elems = eval(self.selector_post, {"page": page_elem}) for post_elem in post_elems: @@ -67,7 +65,7 @@ class Plugin(PluginInterface): detail_page_url, allow_redirects=True ) detail_page_elem = BeautifulSoup( - detail_page_resp.text, features=["xml", "lxml", "lxml-xml"] + detail_page_resp.text, "html.parser" ) guid = ItemGUID(detail_page_url, is_perma_link=True) else: |
