import requests
from bs4 import BeautifulSoup


if __name__ == '__main__':
    resp = requests.get('http://taqm.epa.gov.tw/taqm/tw/HourlyData.aspx')
    soup = BeautifulSoup(resp.text, 'html5lib')
    view_state = soup.find(id='__VIEWSTATE')['value']
    event_validation = soup.find(id='__EVENTVALIDATION')['value']
    viewstate_generator = soup.find(id='__VIEWSTATEGENERATOR')['value']
    form_data = {
        '__VIEWSTATE': view_state,
        '__VIEWSTATEGENERATOR': viewstate_generator,
        '__EVENTVALIDATION': event_validation,
        'ctl08$lbSite': '56',
        'ctl08$lbParam': '4',
        'ctl08$txtDateS': '2017/02/01',
        'ctl08$txtDateE': '2017/03/31',
        'ctl08$btnQuery': '查詢即時值'
    }
    resp = requests.post('http://taqm.epa.gov.tw/taqm/tw/HourlyData.aspx', data=form_data)
    soup = BeautifulSoup(resp.text, 'html5lib')
    for t in soup.find_all('table', 'TABLE_G'):
        print([s for s in t.stripped_strings])

@@ -548,17 +548,17 @@
    'ctl0
-8
+9
 $lbSite'
@@ -578,17 +578,17 @@
    'ctl0
-8
+9
 $lbParam
@@ -600,33 +600,33 @@
 ',%0A        'ctl0
-8
+9
 $txtDateS': '201
@@ -648,17 +648,17 @@
    'ctl0
-8
+9
 $txtDate
@@ -692,9 +692,9 @@
 ctl0
-8
+9
 $btn

Update taqm_epa.py