Hi Guys,
What i'm trying to do is use beautiful soup to get the value of an html attribute.
<div class="g-recaptcha" data-sitekey="VALUE_TO_RETURN"></div>
What i have so far is:
any help would be appreciated.
cheers guys
What i'm trying to do is use beautiful soup to get the value of an html attribute.
<div class="g-recaptcha" data-sitekey="VALUE_TO_RETURN"></div>
What i have so far is:
soup = BeautifulSoup(html, "html.parser") print("data-sitekey=" + soup.find("div", {"class" : "data-sitekey"})) return soup.find("div", {"class" : "data-sitekey"})But this returns "must be str, not nulltype"
any help would be appreciated.
cheers guys