Mar-24-2018, 07:04 PM
I'm new to python so hope this is really simple.
import bs4 as bs
import urllib .request
saurce = urllib .request.urlopen("https://www.premierleague.com/fixtures").read()
soup = bs.BeautifulSoup(saurce,'lxml')
print(soup.get_text())
I thought this returns all the text on the page. However it doesn't, it returns the text in the header and foot of the page. Much different than following the video using a different page. What should I be doig differently to get the text in the main part of the page?
Many thanks
import bs4 as bs
import urllib .request
saurce = urllib .request.urlopen("https://www.premierleague.com/fixtures").read()
soup = bs.BeautifulSoup(saurce,'lxml')
print(soup.get_text())
I thought this returns all the text on the page. However it doesn't, it returns the text in the header and foot of the page. Much different than following the video using a different page. What should I be doig differently to get the text in the main part of the page?
Many thanks