I am able to scrape static website to csv via the following code:
import pandas as pd
url = 'http://www.etnet.com.hk/www/tc/futures/index.php?subtype=HSI&month=201801&tab=interval'
for i, df in enumerate(pd.read_html(url)):
filename = 'C:/Users/Lawrence/Desktop/PyTest/output%02d.csv' % i
df.to_csv(filename, encoding='UTF-8')
However, I found it doesn't work for dynamic website. How can I fulfill this?
P.S.: I am using Python 3.6