Ai
1 Star 0 Fork 0

南寻/DistributedCrawler

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
download.py 465 Bytes
一键复制 编辑 原始数据 按行查看 历史
南寻 提交于 2017-03-17 22:29 +08:00 . 第一次提交
#!/usr/bin/python3
#coding:utf8
from requests import Session as req
def download(url):
headers={
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Upgrade-Insecure-Requests':'1',
'User-Agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/56.0.2924.76 Chrome/56.0.2924.76 Safari/537.36',
}
#print(headers['Host'])
return req().get(url=url,headers=headers).text
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/nanxun/DistributedCrawler.git
git@gitee.com:nanxun/DistributedCrawler.git
nanxun
DistributedCrawler
DistributedCrawler
master

搜索帮助