This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://www.femh.org.tw/research/news_op.aspx') | |
update_time =re.findall(u'日期:(.*)</span>',html.text) | |
update_time.append( datetime.now().strftime('%p') ) | |
update_time = ' '.join(update_time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://www.pohai.org.tw/pohai/bedqty_er/bedqty_er.php') | |
html.encoding='utf8' | |
update_time = re.findall(u'日期:(.*)</td>',html.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://med.cgh.org.tw/unit/branch/Pharmacy/ebl/RealTimeInfoHQ.html') | |
html.encoding='big5' | |
update_time = re.findall(u'時間:(.*)</p>',html.text) | |
pending = re.findall(u':</td *>(.+?)</td>',html.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://www.wanfang.gov.tw/p11_information.aspx') | |
update_time = re.findall(u"日期:(.+?)</div",html.text)[0] | |
pending = re.findall(u"\'>(.+?)</div",html.text)[:-1] | |
# prase like ["<div class='p11_con'><div class='p11_icon05'>否", '1', '0', '16', '1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://www6.vghtpe.gov.tw/ERREALIFO/ERREALIFO.jsp') | |
html.encoding='big5' | |
pending = re.findall(u'">?(\w+)</font>',html.text) | |
full_reported = re.findall(u'體">?(.?)</font>',html.text)[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://eng.shh.org.tw/ER_WEB/ER_WEB/Default.aspx') | |
html.encoding='utf8' | |
pending = re.findall(u'">(.*)</span>',html.text) | |
# prase like ['<b><font color="Red">未滿載</font></b>', '1', '0', '22', '0', '06:33:10'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ptyhon | |
#coding:UTF-8 | |
import requests, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://hlm.tzuchi.com.tw/html/HLinfo/Hlinfo.php') | |
pending = json.loads(html.text)[0] | |
# keys: ['m', 'WaitToPushBed', 'yy', 's', 'BedFull', 'WaitToAdm', 'WaitToDiagnosis', 'dd', 'mm', 'WaitToICU', 'h'] | |
full_reported = True if u'是' in pending['BedFull'] else False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://www1.ndmctsgh.edu.tw/ErOnlineNews/ErOnLineData.aspx') | |
pending = re.findall(u'd">(.+)</fon',html.text) | |
# prase like ['否', '3', '0', '9', '0'] | |
values = [ int(ele) for ele in pending[1:] ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
html = requests.get('http://www.tsmh.org.tw/~webapp/b/web_dg/er_status/er_show_db.php') | |
html.encoding='big5' | |
pending = re.findall(u': (.*?) 人',html.text) | |
# parse like ['1', '0', '4', '0'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:UTF-8 | |
import requests, re, json, os | |
from datetime import datetime | |
os.environ['TZ'] = 'ROC' | |
headers = {"Accept": "*/*", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "User-Agent": " Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36"} | |
data = {'RadioButtonList1': '2', '__EVENTARGUMENT': '', '__EVENTTARGET': 'RadioButtonList1$1', '__EVENTVALIDATION': '/wEWBQKuhbKKAwL444i9AQL544i9AQL3jKLTDQKM54rGBiyOzv44KJOw6BT65+syY0+hyJGU', '__LASTFOCUS': '', '__VIEWSTATE': '/wEPDwUKLTg4MTI3NDI5MQ9kFgICAw9kFgQCBQ8QZGQWAWZkAgcPPCsADQEADxYEHgtfIURhdGFCb3VuZGceC18hSXRlbUNvdW50AgZkFgJmD2QWDgIBD2QWBGYPDxYCHgRUZXh0BQ/oqIrmga/mmYLplpPvvJpkZAIBDw8WAh8CBRUyMDE3LzMvMyDkuIvljYggMDI6MDlkZAICD2QWBGYPDxYCHwIFIeW3suWQkTExOemAmuWgsea7v+W6iu+8iOi8ie+8ie+8mmRkAgEPDxYCHwIFA+WQpmRkAgMPZBYEZg8PFgIfAgUV562J5b6F55yL6Ki65Lq65pW477yaZGQCAQ8PFgIfAgUBNWRkAgQPZBYEZg8PFgIfAgUV562J5b6F5o6o5bqK5Lq65pW477yaZGQCAQ8PFgIfAgUBMGRkAgUPZBYEZg8PFgIfAgUV562J |
OlderNewer