BeautifulSoup: Find Text Elements

From Glitchdata
Revision as of 18:47, 8 July 2014 by Admin (talk | contribs) (Related)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • Using soup.find_all


import urllib.request
from bs4 import BeautifulSoup

# open the webpage and assign the content to a new variable
base = urllib.request.urlopen('')
f = base.readlines()
f = str(f)

soup = BeautifulSoup(f)
rn_base = soup.find_all(itemprop="temperature-fahrenheit")