01 2018 档案
摘要:BeautifulSoup 不支持XPath,lxml、Selenium、Scrapy 支持。 在XPath 语法中有四个重要概念。 根节点和非根节点 /div 选择 div 节点,只有当它是文档的根节点时 //div 选择文档中所有的 div 节点(包括非根节点) 通过属性选择节点 //@href
阅读全文
摘要:#python 3.5 from urllib.request import urlopen from urllib.request import urlretrieve from bs4 import BeautifulSoup import pymysql conn = pymysql.conn
阅读全文
摘要:app.py base.html index.html 结果:
阅读全文