8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e94add commit ac0db3bCopy full SHA for ac0db3b
python3_samples/biying_spider/biying_spider.py
@@ -0,0 +1,14 @@
1
+import requests
2
+import re
3
+import time
4
+local = time.strftime("%Y.%m.%d")
5
+url = 'https://cn.bing.com/'
6
+con = requests.get(url)
7
+content = con.text
8
+reg = r"(http://s.cn.bing.net/az/hprichbg/rb/.*?.jpg)"
9
+a = re.findall(reg, content, re.S)[0]
10
+print(a)
11
+read = requests.get(a)
12
+f = open('%s.jpg' % local, 'wb')
13
+f.write(read.content)
14
+f.close()
0 commit comments