user2946746
user2946746

Reputation: 1780

Unable to find URL to use in web-scraping to download csv file

I can't find the URL to download the csv from the below website. I have tired inspect but can't seem to to find the code. Does anyone know of another way to do this? I'm trying to do this in colab/python.

https://stockmarketmba.com/listofreits.php

Upvotes: 0

Views: 77

Answers (1)

Barry the Platipus
Barry the Platipus

Reputation: 10460

That table is a DataTable, and CSV is generated dynamically when you click the button.

If you need the actual csv file, what you can do is:

import pandas as pd

dfs = pd.read_html('https://stockmarketmba.com/listofreits.php')
dfs[0].to_csv('requested_file.csv')

Upvotes: 2

Related Questions