【bug修复】去除掉了两个模块,让项目能够启动不报错
This commit is contained in:
@@ -52,7 +52,7 @@ def run_script():
|
||||
|
||||
if __name__ == '__main__':
|
||||
scheduler = BackgroundScheduler(timezone=utc)
|
||||
scheduler.add_job(run_script, 'interval', minutes=1)
|
||||
scheduler.add_job(run_script, 'interval', hours=5)
|
||||
scheduler.start()
|
||||
|
||||
try:
|
||||
|
||||
+1510
File diff suppressed because it is too large
Load Diff
+7363
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -2,7 +2,7 @@ import os
|
||||
from sqlalchemy import create_engine
|
||||
import pandas as pd
|
||||
from spiderDataPackage.settings import articleAddr,commentsAddr
|
||||
from model.topicDefine import *
|
||||
# from ..model.topicDefine import *
|
||||
|
||||
engine = create_engine('mysql+pymysql://XiaoXueQi:XiaoXueQi@47.92.235.6/Weibo_PublicOpinion_AnalysisSystem?charset=utf8mb4')
|
||||
|
||||
@@ -29,7 +29,7 @@ def saveData():
|
||||
|
||||
os.remove(articleAddr)
|
||||
os.remove(commentsAddr)
|
||||
update_data()
|
||||
# update_data()
|
||||
|
||||
if __name__ == '__main__':
|
||||
saveData()
|
||||
@@ -9,7 +9,7 @@ def spiderData():
|
||||
print('正在爬取导航栏数据')
|
||||
spiderNav()
|
||||
print('正在爬取文章数据')
|
||||
spiderContent(1,1)
|
||||
spiderContent(14,3)
|
||||
print('正在爬取文章评论数据')
|
||||
spiderComments()
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ def readJson(response,type):
|
||||
isVip
|
||||
])
|
||||
|
||||
def start(typeNum=1,pageNum=1):
|
||||
def start(typeNum=14,pageNum=3):
|
||||
articleUrl = 'https://weibo.com/ajax/feed/hottimeline'
|
||||
init()
|
||||
typeList = getTypeList()
|
||||
|
||||
Reference in New Issue
Block a user