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
#-*- coding:utf-8 -*- | |
#!/usr/bin/env python | |
import websocket | |
url="wss://rs1.sa8888.net:6125/?device=Web_main&token=Web_main_kvi4yxlses0tilzxok5y0jox/" | |
headers={ | |
"Accept-Encoding": "gzip, deflate, br", | |
"Accept-Language": "zh-TW,zh;q=0.9,en-US;q=0.8,en;q=0.7", | |
"Cache-Control": "no-cache", |
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
#-*- coding:utf-8 -*- | |
#!/usr/bin/env python | |
import requests | |
import json | |
url="http://www.pxmart.com.tw/px/store1?cityid=&cityzoneid=&cityroadid=&name_short=" | |
res=requests.get(url) | |
data=json.loads(res.content) | |
for row in data: | |
# print row |
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
#-*- coding:utf-8 -*- | |
#!/usr/bin/env python | |
import requests | |
from bs4 import BeautifulSoup | |
import re | |
import shutil | |
import os | |
out='/home/coericnb' |
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
#-*- coding:utf-8 -*- | |
#!/usr/bin/env python | |
import zipfile | |
import urllib | |
dataid="F-D0047-093" | |
token="my_token" | |
url="http://opendata.cwb.gov.tw/opendataapi?dataid={}&authorizationkey={}".format(dataid,token) | |
urllib.urlretrieve(url,'temp.zip') | |
for file in zipfile.ZipFile('temp.zip',"r").namelist(): |