1 Star 0 Fork 0

xyislove/python-test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
58二手房xpath.py 474 Bytes
一键复制 编辑 原始数据 按行查看 历史
xyislove 提交于 2022-01-03 23:16 . 2022.1.3
import requests
from fake_useragent import UserAgent
import random
import json
import pprint
url='https://xn.58.com/ershoufang/?utm_source=market&spm=u-2d2yxv86y3v43nkddh1.BDPCPZ_BT&PGTID=0d100000-0080-4425-6861-304c75382e24&ClickID=2'
ua=UserAgent()
headers={'User-Agent':ua.random}
resp=requests.get(url=url,headers=headers)
resp.close()
resp=resp.content.decode('utf-8')
with open('./58.html',mode='w',encoding='utf-8') as f:
f.write(resp)
print('写入成功')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xyislove/python-test.git
git@gitee.com:xyislove/python-test.git
xyislove
python-test
python-test
master

搜索帮助