import requests
dd = {
'BB':'2',
'fromYear':'2016',
'fromMonth':'1',
'fromDay':'9',
'toYear':'2016',
'toMonth':'8',
'toDay':'9',
}
res = requests.post('http://www.biga.com.tw/Record1.asp',data = dd)
data 的資料在headers 下方的Form Data裡面
將格式改成雜湊檔格式
import requests
from bs4 import BeautifulSoup
dd = {
'BB':'2',
'fromYear':'2016',
'fromMonth':'1',
'fromDay':'9',
'toYear':'2016',
'toMonth':'8',
'toDay':'9',
}
res = requests.post("http://www.biga.com.tw/Record1.asp",data = dd)
soup= BeautifulSoup(res.text)
print soup.select('table')[0]
沒有留言:
張貼留言