mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
fixed sinastock_spider issue
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user