摘要:
# xpath: XPath 是一门在 XML 文档中查找信息的语言 # / :从根节点选取。 # // :不管位置,直接找 # /@属性名 # /text() 案例: doc=''' <html> <head> <base href='http://example.com/' /> <title> 阅读全文
摘要:
代理池搭建 # github,下载免费代理池开源代码(建议读一下别人的代码) # git clone git@github.com:jhao104/proxy_pool.git # pycharm打开,修改配置文件(reids地址修改) # 启动爬虫: python proxyPool.py sch 阅读全文
摘要:
bs4的使用 # 遍历文档树 # 搜索文档树(5种过滤规则) # limit和recursive参数 import requests # pip3 install beautifulsoup4 解析html和xml,修改html和xml from bs4 import BeautifulSoup # 阅读全文