提交 1d2e0f39 作者: 薛凌堃

辽宁省人民政府

上级 98200599
import time import time
...@@ -16,7 +16,7 @@ policy = Policy() ...@@ -16,7 +16,7 @@ policy = Policy()
topic = 'policy' topic = 'policy'
webname = '天津市人民政府' webname = '辽宁省人民政府'
headers = { headers = {
'User_Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0' 'User_Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0'
} }
...@@ -73,8 +73,8 @@ def doJob(): ...@@ -73,8 +73,8 @@ def doJob():
'title': title, 'title': title,
'publishDate': publishDate, 'publishDate': publishDate,
'origin': '辽宁省人民政府', 'origin': '辽宁省人民政府',
'sourceAddress': url, 'sourceAddress': href,
'writtenDate': '', 'writtenDate': None,
'organ': '', 'organ': '',
'topicClassification': '', 'topicClassification': '',
'issuedNumber': pub_hao, 'issuedNumber': pub_hao,
...@@ -84,8 +84,8 @@ def doJob(): ...@@ -84,8 +84,8 @@ def doJob():
} }
try: try:
baseCore.sendkafka(dic_info, topic) baseCore.sendkafka(dic_info, topic)
baseCore.r.sadd('REITs::' + webname, url) baseCore.r.sadd('REITs::' + webname, href)
log.info(f'采集成功--{title}--{url}') log.info(f'采集成功--{title}--{href}')
except Exception as e: except Exception as e:
continue continue
num += 1 num += 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论