已采纳回答 / wateryang
class SpiderMain(object): def __init__(self):看下你的代码这个地方是不是用的 def __int__(self)
2017-09-07
最新回答 / Mr_nothing
在spider_main 函数中from urllib import request然后 把原来的 print 改成 print('count %d : %s'%(count , request.unquote(new_url)))
2017-09-05
最新回答 / 独孤翎竑
from selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECfrom selenium.common.exceptions import NoSuchElementExceptionfrom selenium.webdriver.common.by import By...
2017-09-01
最新回答 / freedom_X20A
def get_new_url(self):#从url管理器中获取一个新的带爬取得url new_url=self.new_urls.pop()#pop方法会从列表中获取url并会移除 self.old_urls.add(new_url)#将此url添加进old_url return new_url你多了个add
2017-08-31