|
@@ -0,0 +1,32 @@
|
|
|
+"""
|
|
|
+@author: luojunhui
|
|
|
+账号联想---账号搜索任务
|
|
|
+"""
|
|
|
+from argparse import ArgumentParser
|
|
|
+from datetime import datetime
|
|
|
+
|
|
|
+from coldStartTasks.crawler.weixin_account_association_crawler import AccountAssociationCrawler
|
|
|
+
|
|
|
+
|
|
|
+def main():
|
|
|
+ """
|
|
|
+ 账号联想---账号搜索任务
|
|
|
+ :return:
|
|
|
+ """
|
|
|
+ parser = ArgumentParser()
|
|
|
+ parser.add_argument("--run-date",
|
|
|
+ help="Run only once for date in format of %Y-%m-%d. \
|
|
|
+ If no specified, run as daily jobs.")
|
|
|
+ args = parser.parse_args()
|
|
|
+
|
|
|
+ if args.run_date:
|
|
|
+ biz_date = datetime.strptime(args.run_date, "%Y-%m-%d")
|
|
|
+ else:
|
|
|
+ biz_date = datetime.today()
|
|
|
+
|
|
|
+ account_association_crawler = AccountAssociationCrawler()
|
|
|
+ account_association_crawler.run_account_association(biz_date=biz_date)
|
|
|
+
|
|
|
+
|
|
|
+if __name__ == '__main__':
|
|
|
+ main()
|