python
蝶衣_疯魔
日拱一卒无有尽,功不唐捐终入海!
蝶衣_疯魔--来自《霸王别姬》人物程蝶衣--不疯魔不成活
展开
-
BeautifulSoup爬虫实战
4.https://www.gushiwen.cn/default_1.aspx 故事文网 下载每一页面古诗并写入文本文件。使用BeautifulSoup完成 import requests from bs4 import BeautifulSoup # 定义请求url url = 'https://so.gushiwen.cn/shiwen/' # 定义请求头 headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x原创 2020-09-19 22:23:27 · 144 阅读 · 0 评论 -
Python爬虫实战
实战编码 1:爬取百度指定词条对应的搜索结果页面(简易网页采集器) import requests #step1:指定url headers = { 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36' } url = 'https://www.baidu.com/s?wd=' wd = '王锐原创 2020-09-17 21:34:41 · 224 阅读 · 0 评论 -
Python pip配置国内源
清华大学:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 豆瓣:http://pypi.douban.com/simple/ 原始使用方法: pip install lxml 使用国内源: pip install lxml -i https://pypi.tuna.tsinghua.edu.cn/simple 永久配置 ...原创 2020-09-17 12:43:34 · 261 阅读 · 0 评论