最赞回答 / qq_只会helloworld_0426
其实主要是改变你的output.html解析格式(eclipse workspace默认是gbk——就是说你的内容是按照utf-8记录,可是eclipse给改成gbk解析)————一般把文件改成utf-8就行 而且最好把workspace全都改成utf-8 实际开发都是utf-8
2016-11-03
最新回答 / 宇娃
find_all是beautifulsoup里面的一个模块cmd安装方法:C:\Python27\Scripts>pip install Beautifulsoup
2016-11-01
最新回答 / 慕粉4289539
运行以后是这样的C:\Python27\python.exe D:/pycharm/xiexie/baike_spider/spider_main.pycraw 1 : Nonecraw failed Process finished with exit code 0
2016-10-27
最新回答 / 宇娃
# coding:utf8from bs4 import BeautifulSoupimport rehtml_doc = """<html><head><title>The Dormouse's story</title></head><body><p class="title"><b>The Dormouse's story</b></p><p class="story">...
2016-10-27
最新回答 / qq_江仔_0
def _get_new_urls(self, curr_url, soup): new_urls = set() links = soup.find_all('a', href=re.compile(r"/item/*"))正则表达式的内容改下就行,网页格式变了
2016-10-24