|
@@ -223,7 +223,7 @@ class GZXHAuthor:
|
|
|
article_url = article.get("url", "")
|
|
|
video_id = wechat_gh + str(int(date_time_obj.timestamp()))
|
|
|
cover_url = article.get("head_pic", "")
|
|
|
- video_url = self.get_video_url(article_url)
|
|
|
+ # video_url = self.get_video_url(article_url)
|
|
|
video_dict = {
|
|
|
"user_name": user_name,
|
|
|
"video_id": video_id,
|
|
@@ -241,7 +241,7 @@ class GZXHAuthor:
|
|
|
"share_cnt": 0,
|
|
|
"user_id": self.user_dict["uid"],
|
|
|
"cover_url": cover_url,
|
|
|
- "video_url": video_url,
|
|
|
+ "video_url": article_url,
|
|
|
"width": 0,
|
|
|
"height": 0,
|
|
|
"duration": 0,
|
|
@@ -261,7 +261,7 @@ class GZXHAuthor:
|
|
|
data=video_dict,
|
|
|
)
|
|
|
pipeline = PiaoQuanPipeline(
|
|
|
- platform=self.platform,
|
|
|
+ platform='gongzhonghao',
|
|
|
mode=self.mode,
|
|
|
item=video_dict,
|
|
|
rule_dict=self.rule_dict,
|
|
@@ -270,6 +270,12 @@ class GZXHAuthor:
|
|
|
)
|
|
|
if not pipeline.repeat_video():
|
|
|
return True
|
|
|
+ if not pipeline.download_rule_flag():
|
|
|
+ return True
|
|
|
+ if not pipeline.title_flag():
|
|
|
+ return True
|
|
|
+ if not pipeline.publish_time_flag():
|
|
|
+ return True
|
|
|
else:
|
|
|
current_time = datetime.now()
|
|
|
timestamp = current_time.strftime("%Y-%m-%d %H:%M:%S")
|
|
@@ -308,10 +314,10 @@ class GZXHAuthor:
|
|
|
if __name__ == "__main__":
|
|
|
GZ = GZXHAuthor(
|
|
|
|
|
|
- platform="gongzhongxinhao",
|
|
|
+ platform="gongzhonghao",
|
|
|
mode="author",
|
|
|
user_dict={"uid": "123456", "link": "https://mp.weixin.qq.com/s/Cwc2D3RUNDk30zv_s0IxTA", "user_id": "1234565"},
|
|
|
- rule_dict={},
|
|
|
+ rule_dict={"rule": "{period:{min:1,max:1}}"},
|
|
|
env="dev",
|
|
|
)
|
|
|
|