From: Mint <> Date: Sat, 3 Sep 2022 11:47:55 +0000 (+0300) Subject: Mastodon parser adjustment X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5613ee63a9a17146ff90a61f3ca2e8bfa7d6595b;p=fba.git Mastodon parser adjustment --- 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,