I am looking to scrape the coin table from link and create a CSV file datewise. For every new coin update, a new entry at the top should be created in the existing data file.
Desired output
Coin,Pings,...Datetime
BTC,25,...07:17:05 03/18/21
I haven't reached far but below is my attempt at it
from selenium import webdriver
import numpy as np
import pandas as pd
firefox = webdriver.Firefox(executable_path="/usr/local/bin/geckodriver")
firefox.get('https://agile-cliffs-23967.herokuapp.com/binance/')
rows = len(firefox.find_elements_by_xpath("/html/body/div/section[2]/div/div/div/div/table/tr"))
columns = len(firefox.find_elements_by_xpath("/html/body/div/section[2]/div/div/div/div/table/tr[1]/th"))
df = pd.DataFrame(columns=['Coin','Pings','Net Vol BTC','Net Vol per','Recent Total Vol BTC', 'Recent Vol per', 'Recent Net Vol', 'Datetime'])
for r in range(1, rows+1):
for c in range(1, columns+1):
value = firefox.find_element_by_xpath("/html/body/div/section[2]/div/div/div/div/table/tr["+str(r)+"]/th["+str(c)+"]").text
print(value)
# df.loc[i, ['Coin']] =