提交 4956d261 作者: 薛凌堃

企业动态内容小于300过滤掉

上级 35396c0b
......@@ -158,6 +158,8 @@ def beinWork(tyc_code, social_code,start_time):
contentText = smart.extract_by_url(link).text
#不带标签正文
content = smart.extract_by_url(link).cleaned_text
if len(content) < 300:
continue
# time.sleep(3)
except Exception as e:
contentText = ''
......
......@@ -49,6 +49,7 @@ def getSourceInfo(infoSourceCode):
sql = f"SELECT site_uri,id,site_name,info_source_code from info_source where info_source_code = '{infoSourceCode}' "
cursor.execute(sql)
row = cursor.fetchone()
cnx.commit()
dic_url = {
'url_': row[0],
'sid': row[1],
......@@ -143,6 +144,7 @@ def updateCookieToken(token,cookies):
def getToken():
cursor_.execute(f"select token,cookies from weixin_tokenCookies where fenghao_time < DATE_SUB(NOW(), INTERVAL 2 HOUR) order by update_time asc limit 1")
row = cursor_.fetchall()
cnx_.commit()
if row:
pass
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论