Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
魅族发货
# -*-coding: utf-8 -*- from urllib2 import urlopen import re page_count = 5 dest = u'厦门' url = 'http://event.meizu.com/pro_zmd-%d-%d.html' shipped = False regex = re.compile(u'<li>.*%s.*</li>' % dest) for i in range(1, page_count +1): data = urlopen(url % (1, i)).read().decode('utf-8') if regex.findall(data): shipped = True print('%s已经发货' % dest) if not shipped: print('尚未发货,请稍等!' )
run
|
edit
|
history
|
help
0
rstring
python bois
Max
rstring
Project Euler #22
daily score
Problem: rstring
p1
bacs_class
Python