Ads
Ads
resp = requests.get(url)
dfs = pd.read_html(resp.content)
# suppose your table is the third one
your_number = dfs[2].iloc[1,2]
http://www.aastocks.com/tc/stocks/quote/quick-quote.aspx?symbol=00700
咁呢個就係GET request,你用requests.get(url)就可以send同一個packet去server度拎番同一個html document。當你browser接到plain html之後,佢會去run個document入面嘅javascript,然後呢堆javascript會再向server發出不同的request拎其他野,例如係圖片或json,最後就係你browser砌番個完整網頁比你睇。Ads