Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple newbie Q
#1
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
Reply


Messages In This Thread
Simple newbie Q - by Darkish - Mar-24-2018, 07:04 PM
RE: Simple newbie Q - by Larz60+ - Mar-24-2018, 09:14 PM
RE: Simple newbie Q - by wavic - Mar-24-2018, 09:19 PM
RE: Simple newbie Q - by Darkish - Mar-24-2018, 10:48 PM
RE: Simple newbie Q - by DeaD_EyE - Mar-25-2018, 08:36 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020