]> git.mxchange.org Git - fba.git/commitdiff
Mastodon parser adjustment
authorMint <>
Sat, 3 Sep 2022 11:47:55 +0000 (14:47 +0300)
committerMint <>
Sat, 3 Sep 2022 11:49:11 +0000 (14:49 +0300)
fetch_blocks.py

index 6850a463c13583b71b40424ecf84255db1494358..5302e6903ea26eebdca75b3e0c21e031da92f2b8 100644 (file)
@@ -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,