-
Notifications
You must be signed in to change notification settings - Fork 192
/
getskuid.py
22 lines (19 loc) · 4.83 KB
/
getskuid.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import requests
import re
url = ["https://item.jd.com/100006784140.html","https://item.jd.com/11609510701.html","https://item.jd.com/11609507800.html","https://item.jd.com/65402985519.html","https://item.jd.com/65399049577.html","https://item.jd.com/34197525576.html","https://item.jd.com/1238056920.html","https://item.jd.com/41157965868.html","https://item.jd.com/41157965869.html","https://item.jd.com/41157965870.html","https://item.jd.com/41157965871.html","https://item.jd.com/20111976846.html","https://item.jd.com/65425149164.html","https://item.jd.com/10653857950.html","https://item.jd.com/10653857951.html","https://item.jd.com/1938795.html","https://item.jd.com/100005666820.html","https://item.jd.com/1835968.html","https://item.jd.com/1835967.html","https://item.jd.com/1938788.html","https://item.jd.com/1891756.html","https://item.jd.com/100010439846.html","https://item.jd.com/100009450890.html","https://item.jd.com/100005818743.html","https://item.jd.com/100011184496.html","https://item.jd.com/100002690344.html","https://item.jd.com/860176.html","https://item.jd.com/3977082.html","https://item.jd.com/100009130434.html","https://item.jd.com/5707386.html","https://item.jd.com/100011113858.html","https://item.jd.com/6238439.html","https://item.jd.com/100003712460.html","https://item.jd.com/1938811.html","https://item.jd.com/1938800.html","https://item.jd.com/1060200558.html","https://item.jd.com/1138381.html","https://item.jd.com/3500471.html","https://item.jd.com/851157.html","https://item.jd.com/4979082.html","https://item.jd.com/5572426.html","https://item.jd.com/6046611.html","https://item.jd.com/6046613.html","https://item.jd.com/3828117.html","https://item.jd.com/3621679.html","https://item.jd.com/3623375.html","https://item.jd.com/4052340.html","https://item.jd.com/8872215.html","https://item.jd.com/7814095.html","https://item.jd.com/100004237845.html","https://item.jd.com/8660516.html","https://item.jd.com/5198045.html","https://item.jd.com/5105967.html","https://item.jd.com/100007285152.html","https://item.jd.com/1564454.html","https://item.jd.com/100006176160.html","https://item.jd.com/100006877166.html","https://item.jd.com/5481126.html","https://item.jd.com/5326577.html","https://item.jd.com/10728987754.html","https://item.jd.com/100004142807.html","https://item.jd.com/100006176206.html","https://item.jd.com/2291608.html","https://item.jd.com/100002824548.html","https://item.jd.com/100001661013.html","https://item.jd.com/100003680693.html","https://item.jd.com/100002841169.html","https://item.jd.com/10728987753.html","https://item.jd.com/2291586.html","https://item.jd.com/100010215646.html","https://item.jd.com/100006176202.html","https://item.jd.com/59381629579.html","https://item.jd.com/100006176204.html","https://item.jd.com/7043722.html","https://item.jd.com/100001894238.html","https://item.jd.com/7257333.html","https://item.jd.com/100001894236.html","https://item.jd.com/100001431455.html","https://item.jd.com/7296030.html","https://item.jd.com/7509643.html","https://item.jd.com/7509641.html","https://item.jd.com/7263128.html","https://item.jd.com/60323904322.html","https://item.jd.com/7498169.html","https://item.jd.com/100010454866.html","https://item.jd.com/100010572918.html","https://item.jd.com/10977493054.html","https://item.jd.com/10222629474.html","https://item.jd.com/7509607.html","https://item.jd.com/25411367334.html","https://item.jd.com/25411367335.html","https://item.jd.com/100011290370.html","https://item.jd.com/100011293950.html","https://item.jd.com/100011293928.html","https://item.jd.com/100006248247.html","https://item.jd.com/100006248177.html","https://item.jd.com/5724402.html","https://item.jd.com/4530633.html","https://item.jd.com/4530595.html","https://item.jd.com/5290414.html","https://item.jd.com/3852111.html","https://item.jd.com/100009441994.html","https://item.jd.com/100009442472.html","https://item.jd.com/100006066047.html","https://item.jd.com/59959871345.html","https://item.jd.com/59959871346.html","https://item.jd.com/59959871348.html","https://item.jd.com/59959871347.html","https://item.jd.com/1138376.html","https://item.jd.com/100005151507.html","https://item.jd.com/100011294222.html","https://item.jd.com/7498167.html","https://item.jd.com/3083878.html","https://item.jd.com/5322060.html","https://item.jd.com/7914790.html"]
headers= {
"User-Agent":"Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9300 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
"Referer": "https://item.jd.com/7348369.html",
}
skuid_t=""
for url_a in url:
response = requests.get(url_a, headers=headers)
response.encoding = 'utf-8'
skuid_re = re.compile(r"skuid: '(.*?)',")
try:
skuid = re.findall(skuid_re, response.text)[0]
print("url:",url_a,".skuid["+skuid+"]")
skuid_t+=skuid+","
except:
print("ERROR:",url_a)
print(skuid_t)