0

I have tried to get the data from this table but I have been unable to do so: https://datagolf.ca/player-trends

I have tried many things for the last few hours, below is my most recent when just returns an empty list.


import bs4
import requests

res = requests.get('https://datagolf.ca/player-trends')

soup = bs4.BeautifulSoup(res.text, 'lxml')

table = soup.find_all("div", class_ = "table")

table

Is the issue something similar to this:

Scrape of table with only 'div's

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

This page is java script rendered. Take a closer look at what requests.get('https://datagolf.ca/player-trends') actually returns. It does not contain the table.

Despite that it pulls the data from https://dl.dropboxusercontent.com/s/hprrfklqs5q0oge/player_trends_dev.csv?dl=1

Raphael
  • 1,731
  • 2
  • 7
  • 23