I am trying to scrape the table data from this table URL: https://covid19criticalcare.com/pharmacies/
On my previous scrape I used the following Python packages: from bs4 import BeautifulSoup import requests import mysql.connector import pandas as pd from sqlalchemy import create_engine
But this url's HTML doesn't contain the table data on it, instead it seems to be drawing the data from an external database.
Could someone please point me in the right direction for scraping a table data with this sort of HTML setup using a python script?
I tried doing a blind scrape, by using the method I used on my previous scrape.
from bs4 import BeautifulSoup
import requests
import mysql.connector
import pandas as pd
from sqlalchemy import create_engine
url = "https://covid19criticalcare.com/pharmacies/"
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}
result = requests.get(url, headers = headers)
doc = BeautifulSoup(result.text, "html.parser")
name = doc.find_all("td", class\_="column-1")
td_pharmacy_name = \[\]
for td in name:
names = td.text
td_names.append(names)
print(td_names)