mirror of
https://git.kiwifarms.net/mint/fedi-block-api.git
synced 2024-10-22 23:29:06 +00:00
Mastodon parser adjustment
This commit is contained in:
parent
7c906a9aae
commit
5613ee63a9
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,8 @@ def get_mastodon_blocks(domain: str) -> dict:
|
||||||
if header_text in translations:
|
if header_text in translations:
|
||||||
header_text = translations[header_text]
|
header_text = translations[header_text]
|
||||||
if header_text in blocks:
|
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(
|
blocks[header_text].append(
|
||||||
{
|
{
|
||||||
"domain": line.find("span").text,
|
"domain": line.find("span").text,
|
||||||
|
|
Loading…
Reference in a new issue