user image

AKY King of Life
Published in : 2022-03-04

Webscraping England Hockey Python BeautifulSoup

Python

I am trying to BeautifulSoup to get the table found in this link: https://gms.englandhockey.co.uk/fixtures-and-results/competitions.php?comp=4154007

It's an England Hockey website and basically I want to download the table and put it in a DataFrame, and also eventually get the fixtures as well.

Whenever I try and find the right div or table, it returns None.

Here's what I have tried:

url = "https://gms.englandhockey.co.uk/fixtures-and-results/club.php?id=Royal%20Holloway%20HC&prev=4153800"
page = requests.get(url)

soup = BeautifulSoup(page.text, "html.parser")

I have tried to find the div the table is within, but it returns None.

bread_crumbs = soup.find("div", class_="container")
print(bread_crumbs

Again, I try to find the table but it returns None.

bread_crumbs = soup.find("table")
print(bread_crumbs)

anyone can suggest a way to access the table, I would be grateful! It might be that Selenium would be better for this, but I haven't used Selenium yet so I am not sure how it would start.

As you can see from the link, it's a php website, so could this be part of the reason?

Comments

There is no comments yet

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

The table does not exist error while inserting into database?
Publish date: 2022-03-04 | Comments: 1

Python

How to segregate data from a single cell in a scan pdf file.
Publish date: 2022-03-02 | Comments: 1

Python