提交 6f4661eb 作者: 薛凌堃

求是网领导讲话

上级 0a703aad
...@@ -119,17 +119,17 @@ if __name__=='__main__': ...@@ -119,17 +119,17 @@ if __name__=='__main__':
# or '中共' in author or '记者' in author or '新闻社' in author\ # or '中共' in author or '记者' in author or '新闻社' in author\
# or '党委' in author or '调研组' in author or '研究中心' in author\ # or '党委' in author or '调研组' in author or '研究中心' in author\
# or '委员会' in author or '博物' in author or '大学' in author or '联合会' in author : # or '委员会' in author or '博物' in author or '大学' in author or '联合会' in author :
# if '(' in author or '本刊' in author \ if '(' in author or '本刊' in author \
# or '记者' in author or '新闻社' in author \ or '记者' in author or '新闻社' in author \
# or '”' in author\ or '”' in author\
# or '大学' in author or '洛桑江村' in author: or '大学' in author or '洛桑江村' in author:
# continue
if '国资委党委' in author:
pass
else:
continue continue
# if '国资委党委' in author:
# pass
# else:
# continue
new_href = new.find('a')['href'] new_href = new.find('a')['href']
is_member = r.sismember('qiushileaderspeech_two::' + period_title, new_href) is_member = r.sismember('qiushileaderspeech::' + period_title, new_href)
if is_member: if is_member:
continue continue
new_title = new.find('a').text.replace('\u3000',' ').lstrip(' ').replace('——', '').replace('\xa0', '') new_title = new.find('a').text.replace('\u3000',' ').lstrip(' ').replace('——', '').replace('\xa0', '')
...@@ -165,7 +165,7 @@ if __name__=='__main__': ...@@ -165,7 +165,7 @@ if __name__=='__main__':
} }
log.info(dic_news) log.info(dic_news)
if sendKafka(dic_news): if sendKafka(dic_news):
r.sadd('qiushileaderspeech_two::' + period_title, new_href) r.sadd('qiushileaderspeech::' + period_title, new_href)
log.info(f'采集成功----{dic_news["sourceAddress"]}') log.info(f'采集成功----{dic_news["sourceAddress"]}')
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论