fixed sinastock_spider issue
@@ -11,12 +11,6 @@ from sinastock.items import NewsItem
class SinastockSpiderSpider(scrapy.Spider):
name = 'sinastock_spider'
allowed_domains = ['finance.sina.com.cn']
- mongo = MongoClient(
- host=os.environ.get('MONGO_HOST') or 'localhost',
- port=int(os.environ.get('MONGO_PORT') or 27017)
- )
- db = mongo[os.environ.get('MONGO_DB') or 'crawlab_test']
- col = db.get_collection(os.environ.get('CRAWLAB_COLLECTION') or 'stock_news')
def start_requests(self):
col = self.db['stocks']
