MCPcopy
hub / github.com/wistbean/learn_python3_spider / header

Function header

meizitu.py:9–23  ·  view source on GitHub ↗
(referer)

Source from the content-addressed store, hash-verified

7
8
9def header(referer):
10
11 headers = {
12 'Host': 'i.meizitu.net',
13 'Pragma': 'no-cache',
14 'Accept-Encoding': 'gzip, deflate',
15 'Accept-Language': 'zh-CN,zh;q=0.8,en;q=0.6',
16 'Cache-Control': 'no-cache',
17 'Connection': 'keep-alive',
18 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36',
19 'Accept': 'image/webp,image/apng,image/*,*/*;q=0.8',
20 'Referer': '{}'.format(referer),
21 }
22
23 return headers
24
25
26def request_page(url):

Callers 1

download_PicFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected