Loading

摘要: BeautifulSoup 不支持XPath,lxml、Selenium、Scrapy 支持。 在XPath 语法中有四个重要概念。 根节点和非根节点 /div 选择 div 节点,只有当它是文档的根节点时 //div 选择文档中所有的 div 节点(包括非根节点) 通过属性选择节点 //@href 阅读全文
posted @ 2018-01-19 14:42 江雪独钓翁 阅读(228) 评论(0) 推荐(0) 编辑
摘要: #python 3.5 from urllib.request import urlopen from urllib.request import urlretrieve from bs4 import BeautifulSoup import pymysql conn = pymysql.conn 阅读全文
posted @ 2018-01-19 13:39 江雪独钓翁 阅读(6029) 评论(0) 推荐(0) 编辑