提交 21cfc35e 作者: 薛凌堃

税务局

上级 9a1b6239
...@@ -155,7 +155,7 @@ def getProcessitem(bdetail): ...@@ -155,7 +155,7 @@ def getProcessitem(bdetail):
nowDate=getNowDate() nowDate=getNowDate()
content=bdetail['content'] content=bdetail['content']
if content!='': if content!='':
sid='1706193555675926530' sid='1534600788921110530'
processitem={ processitem={
"sid":sid, "sid":sid,
"source":"18", "source":"18",
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
pageSize: 10 pageSize: 10
} }
""" """
import datetime
import json import json
import time import time
from urllib import parse from urllib import parse
...@@ -31,6 +32,15 @@ r = redis.Redis(host="114.115.236.206", port=6379, password='clbzzsn', db=0) ...@@ -31,6 +32,15 @@ r = redis.Redis(host="114.115.236.206", port=6379, password='clbzzsn', db=0)
import urllib3 import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
taskType = '企业负面新闻' taskType = '企业负面新闻'
#获取当前时间
def getNowDate():
# 获取当前时间
current_time = datetime.datetime.now()
# 将时间转换为字符串
currentdate = current_time.strftime("%Y-%m-%d %H:%M:%S")
return currentdate
def sendKafka(dic_news): def sendKafka(dic_news):
start_time = time.time() start_time = time.time()
try: # 114.116.116.241 try: # 114.116.116.241
...@@ -293,15 +303,19 @@ def abnormal(headers,com_name,social_code): ...@@ -293,15 +303,19 @@ def abnormal(headers,com_name,social_code):
return url,list_abhormal return url,list_abhormal
def dic_data(com_name,listData,type,detailurl): def dic_data(com_name,listData,type,detailurl):
nowDate = getNowDate()
dic_news = { dic_news = {
'title':com_name + type, 'title':com_name + type,
'structuredData':listData[:1], 'structuredData':listData[:1],
'ynStructure':1, 'ynStructure':1,
'content': '', 'content': '',
'contentHtml': '', 'contentHtml': '',
'source': '信用中国', 'source': 17,
'origin':'信用中国',
'publishtime': '', 'publishtime': '',
'detailurl': detailurl, 'detailurl': detailurl,
'sid':'1684760229991882754',
'createDate':nowDate
} }
return dic_news return dic_news
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论