Parsing HTML

About

Beautiful Soup 4 https://pypi.org/project/beautifulsoup4/ - сбор ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ с web страниц

ΠŸΡ€ΠΈΠΌΠ΅Ρ€Ρ‹ Π½Π° bs4

import bs4
import requests

r = self.get("https://example.com/blabla")
if r.status_code == 200:
    parsed_r = bs4.BeautifulSoup(resp.content, features="html.parser")
    # find <input name="test" />
    test = parsed_r.select_one("input[name='test']")
    

Last updated