0
$ scrapy版本:0.14 $導入錯誤:無法導入擴展名
$文件:settings.py $
EXTENSIONS = { 'myproject.extensions.MySQLManager': 500 }
$文件:pipeline.py $
# -- coding: utf-8 --
# Define your item pipelines here #
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: doc.scrapy.org/topics/item-pipeline.html
from scrapy.project import extensions
from urlparse import urlparse
import re
class MySQLStorePipeline(object):
def process_item(self, item, spider):
if self.is_allowed_domain(item['url'], spider) is True:
MySQLManager.cursor... #cannot load MySQLManager
導入錯誤:不能導入擴展名。 我找不到擴展類/scrapy/project.py
請編輯您的意見,這樣我可以更好地閱讀它。 – Haldir87