From 74ee6b327de8db0cf3ea8bd5a56040eb3fb02f08 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sun, 10 Sep 2023 20:40:49 +0300 Subject: Small fixes, add Docker --- plugins/FacebookSourcePlugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/FacebookSourcePlugin.py') diff --git a/plugins/FacebookSourcePlugin.py b/plugins/FacebookSourcePlugin.py index e7ce1ab..24784e3 100644 --- a/plugins/FacebookSourcePlugin.py +++ b/plugins/FacebookSourcePlugin.py @@ -83,7 +83,7 @@ def fetch_page_posts(email: str, password: str, page_id: str, limit: int) -> lis if cookie_page_resp.status_code >= 400: raise Exception(cookie_page_resp.text) - cookie_page = BeautifulSoup(cookie_page_resp.text, features="xml") + cookie_page = BeautifulSoup(cookie_page_resp.text, features=["xml", "lxml"]) lsd: str = cookie_page.find("input", {"name": "lsd"})["value"] # type: ignore jazoest: str = cookie_page.find("input", {"name": "jazoest"})["value"] # type: ignore @@ -106,7 +106,7 @@ def fetch_page_posts(email: str, password: str, page_id: str, limit: int) -> lis if login_page_resp.status_code >= 400: raise Exception(login_page_resp.text) - login_page = BeautifulSoup(login_page_resp.text, features="lxml") + login_page = BeautifulSoup(login_page_resp.text, features=["xml", "lxml"]) lsd: str = login_page.find("input", {"name": "lsd"})["value"] # type: ignore jazoest: str = login_page.find("input", {"name": "jazoest"})["value"] # type: ignore @@ -158,7 +158,7 @@ def fetch_page_posts(email: str, password: str, page_id: str, limit: int) -> lis if timeline_resp.status_code >= 400: raise Exception(timeline_resp.text) - timeline = BeautifulSoup(timeline_resp.text, features="lxml") + timeline = BeautifulSoup(timeline_resp.text, features=["xml", "lxml"]) posts = timeline.select("section > article") for post in posts: -- cgit v1.3