Код: Выделить всё
Recommendations
"["
[url=https://example.com/edit-link]Edit[/url]
"]"
Код: Выделить всё
soup = BeautifulSoup(response.content, 'html.parser')
rec_block = None
for h5 in soup.find_all("h5", class_="series"):
if "Recommendations" in h5.get_text():
rec_block = h5
break
if not rec_block:
print("rec_block")
return None
rec_link = rec_block.find("a")
if rec_link is None:
return None
Подробнее здесь: https://stackoverflow.com/questions/798 ... ant-get-it
Мобильная версия