问题3
[error 2] No such file or directory
原因,python安装的盘和写程序的盘不一样啊
问题2
ValueError: Unsupported or invalid CSS selector: "-"
titles = Soup.select('body > div.main - content > ul > li:nth - of - type(1) > div.article - info > h3 > a')
Process finished with exit code 1
原因,按照文本复制,才发现错了,所以将’-‘号全部紧凑起来
titles = Soup.select('body > div.main-content > ul > li:nth-of-type(1) > div.article-info > h3 > a')
问题3
如果有不支持的情况记得要看提示,增减空格,注意soup,select里面的缩进
代码4
本地网页的爬虫