From 5613ee63a9a17146ff90a61f3ca2e8bfa7d6595b Mon Sep 17 00:00:00 2001 From: Mint <> Date: Sat, 3 Sep 2022 14:47:55 +0300 Subject: [PATCH] Mastodon parser adjustment --- fetch_blocks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch_blocks.py b/fetch_blocks.py index 6850a46..5302e69 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -45,7 +45,8 @@ def get_mastodon_blocks(domain: str) -> dict: if header_text in translations: header_text = translations[header_text] if header_text in blocks: - for line in header.find_next_siblings("table")[0].find_all("tr")[1:]: + # replaced find_next_siblings with find_all_next to account for instances that e.g. hide lists in dropdown menu + for line in header.find_all_next("table")[0].find_all("tr")[1:]: blocks[header_text].append( { "domain": line.find("span").text, -- 2.39.5