Ver código fonte

11-21 自动回复新文章

luojunhui 5 meses atrás
pai
commit
c16c508a4a
2 arquivos alterados com 614 adições e 1 exclusões
  1. 612 0
      applications/function.py
  2. 2 1
      deal/ArticleRank.py

+ 612 - 0
applications/function.py

@@ -0,0 +1,612 @@
+"""
+@author: luojunhui
+"""
+import json
+
+import requests
+
+ARTICLE_URL = {
+    "gh_b181786a6c8c": {
+        "title": "武汉一女教师,新婚不久怀孕,孩子出生后,丈夫竟脸色大变,扭头就走再也没回来",
+        "coverUrl": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/ibXsPafGBbCFrvlLcKoAg0tLelW3dwC9A8jXibxfuy57smOv3f1qPrteWUBh0yXbIgxu3CHmicq7BvTBYZztUBK4g/640?wx_fmt=jpeg",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "newsDescription": "在一个美丽的夏天,武汉一家幼儿师范学校的女教师邹翃燕与她相恋多年的男友正式结婚,并在蜜月期间怀孕。对于即将到来的新生命,夫妻二人充满了期待。然而,幸福的表面下,却暗藏着即将爆发的危机。",
+        "msgType": 2,
+        "miniVideoId": None,
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=MzkzMjczNDAwNQ==&mid=2247486513&idx=2&sn=55e084d04b89b0431c2818b5c5de4e06&chksm=c36cd45672253a2f917c876bf96a922c401397c28c7906bc2b232b199ef57b558b1499cfeb1d&scene=126&sessionid=1732181447#rd"
+    },
+    "gh_68e7fdc09fe4": {
+        "title": "吉林大爷挖地窖突遇毒蛇,正要挥锄头猛砸,却发现毒蛇一动不动,仔细一看愣住了",
+        "coverUrl": "https://mmbiz.qpic.cn/sz_mmbiz_png/Y3FEhQujOMcTHVRPOlMHfGgvVrCemtOyv0k2R4LvacEFGvicNU7WKbllJXGzUCLNcp31XViayxSAgHYPy6qI2kvg/640?wx_fmt=png&from=appmsg",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "newsDescription": "吉林古村落的一个凛冽寒冬清晨,老王爷挑着锄头,准备去后山的一块地里挖地窖,以储备粮食过冬。天空阴沉,冷风凛冽。",
+        "msgType": 2,
+        "miniVideoId": None,
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=MzkzNDcyMzU5NA==&mid=2247487353&idx=4&sn=f7f76d71ccadfe4d6314be543b65c21c&chksm=c3290771a15f41c744ce0ed170ccb20184a072eccf202954ba55e94dc48733f4998e70b60ecb&scene=126&sessionid=1732181448#rd"
+    },
+    "gh_93e00e187787": {
+        "title": "上海第一批女光棍进了养老院,如今的生活再次印证了费翔所说的话",
+        "coverUrl": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/cxdiaJictvhMIaTeCqnibicYZ3WmaYcKt4FzmyJVL2OY9HiaOahtppYoKkJYdIpq97ZiblKUK1iaib6MNSS6jIc0iaDbicaQ/640?wx_fmt=jpeg&quot",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "msgType": 2,
+        "newsDescription": "随着社会的不断发展,越来越多的人开始重新审视婚姻的意义与价值。尤其是在经济发达的大城市,诸如上海,许多女性选择了不婚的生活方式。",
+        "miniVideoId": None,
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=MzkwNTYxNDQ3Ng==&mid=2247490818&idx=6&sn=764d76c364bc8f84ba4d5d31166d0ceb&chksm=c146798be24c7eabad21f771a802d4b49dcbf783fd7ded00081d5e3bb36ad83960581b45f39d&scene=126&sessionid=1732181449#rd"
+    },
+    "gh_ac43e43b253b": {
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=MzkwNjYxMjM1Mg==&mid=2247493665&idx=6&sn=4ce57ab8b0f95f61f29982bc10a9c783&chksm=c143b9560e3b58ce2709891ef85978b4b16bdcce27eb64bf075d20a8fda39a70b62c37ebecac&scene=126&sessionid=1732181450#rd",
+        "title": "上海第一批女光棍进了养老院,如今的生活再次印证了费翔所说的话",
+        "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/3KjSicS7TR1CnuV8biapgTkw9PbmDqpPpJ5Xia4YtSPpbso4yplxrzurKLCgoIcOL09dEJZ87RUgic2uica1D40qFkQ/640?wx_fmt=jpeg&quot",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "msgType": 2,
+        "newsDescription": "随着社会的不断发展,越来越多的人开始重新审视婚姻的意义与价值。尤其是在经济发达的大城市,诸如上海,许多女性选择了不婚的生活方式。这一代女性在年轻时,追求个人自由和发展,躲避传统婚姻可能带来的复杂家庭关系和经济负担。然而,当这些女性逐渐步入老年时,她们的生活状况引发了社会的广泛关注。",
+        "miniVideoId": None,
+    },
+    "gh_77f36c109fb1": {
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=Mzk0OTcyNjYxNg==&mid=2247487671&idx=6&sn=46972f502826ae78b49d38cb8b5734a7&chksm=c21cb24d85eb69df13f601fae1c79b648eb965bbd15202bae09ad45f2e13c090eaded8201ec2&scene=126&sessionid=1732181451#rd",
+        "title": "上海第一批女光棍进了养老院,如今的生活再次印证了费翔所说的话",
+        "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/3KjSicS7TR1CnuV8biapgTkw9PbmDqpPpJ5Xia4YtSPpbso4yplxrzurKLCgoIcOL09dEJZ87RUgic2uica1D40qFkQ/640?wx_fmt=jpeg&quot",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "newsDescription": "随着社会的不断发展,越来越多的人开始重新审视婚姻的意义与价值。尤其是在经济发达的大城市,诸如上海,许多女性选择了不婚的生活方式。",
+        "msgType": 2,
+        "miniVideoId": None,
+    },
+    "gh_1ee2e1b39ccf": {
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=MzkzNTUwNzYzMQ==&mid=2247494791&idx=6&sn=3621cd0b0a0e70f242269912280c4e87&chksm=c315ab4535a9286da842c60585367bd5993c44b68a8b14680514f63bb2e0194d73ca6d93a720&scene=126&sessionid=1732181452#rd",
+        "title": "上海第一批女光棍进了养老院,如今的生活再次印证了费翔所说的话",
+        "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/3KjSicS7TR1CnuV8biapgTkw9PbmDqpPpJ5Xia4YtSPpbso4yplxrzurKLCgoIcOL09dEJZ87RUgic2uica1D40qFkQ/640?wx_fmt=jpeg&quot",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "newsDescription": "随着社会的不断发展,越来越多的人开始重新审视婚姻的意义与价值。尤其是在经济发达的大城市,诸如上海,许多女性选择了不婚的生活方式。",
+        "msgType": 2,
+        "miniVideoId": None
+    },
+    "gh_d3f039c9db2b": {
+        "newsUrl": "http://mp.weixin.qq.com/s?__biz=Mzk0Mjg2NTY3Ng==&mid=2247483897&idx=1&sn=3922ba195db859c985e8b59977d493fb&chksm=c26535cc46d0353ba80be15b3be9af41825c3d80bb8a2ae5572aa7a166fc1b8876ca95e109f8&scene=126&sessionid=1732181453#rd",
+        "title": "孙中山和宋庆铃的一张真实合影!真是太美了,注意看宋庆龄的鞋子",
+        "coverUrl": "https://mmbiz.qpic.cn/mmbiz_jpg/NsW3mRgdmsjOzxnAnV5AJ2C1ZGInEaZppglccorr9icnfzrquO0kYmiaVPLBZDI3Wo98q05jXlsZncIIIxdOdkOg/640?wx_fmt=jpeg&quot",
+        "miniAppId": "",
+        "miniPagePath": "",
+        "newsDescription": "孙中山和宋庆龄是中国近代史上备受瞩目的历史人物,他们不仅在政治领域有着深远的影响,也因其特殊的个人关系而广为人知。",
+        "msgType": 2,
+        "miniVideoId": None
+    }
+}
+
+ACCOUNT_VIDEO = {
+    "gh_93e00e187787": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26shareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26rootSourceId%3Dtouliu_tencentgzh_20240909_13724870_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20463342",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20463342%26su%3D66857951%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_93e00e187787_c6fa160eead7e53bcf2fb783f0369b9e"
+                }
+            ]
+        },
+        {
+            "groupIndex": 1,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26shareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26rootSourceId%3Dtouliu_tencentgzh_20240909_13724870_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20463342",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20463342%26su%3D66857951%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_93e00e187787_c6fa160eead7e53bcf2fb783f0369b9e"
+                }
+            ]
+        },
+        {
+            "groupIndex": 2,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26shareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26rootSourceId%3Dtouliu_tencentgzh_20240909_13724870_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20463342",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20463342%26su%3D66857951%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_93e00e187787_c6fa160eead7e53bcf2fb783f0369b9e"
+                }
+            ]
+        },
+        {
+            "groupIndex": 3,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26shareId%3Dcadfd934-f3ad-4266-812f-7a693bf079e8%26rootSourceId%3Dtouliu_tencentgzh_20240909_13724870_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20463342",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20463342%26su%3D66857951%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_93e00e187787_c6fa160eead7e53bcf2fb783f0369b9e"
+                }
+            ]
+        },
+        {
+            "groupIndex": 4,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13817005",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13817005%26su%3D3087312%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_93e00e187787_4c4b5ce43d988f7cb524b4dff8c01b9f"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D4135f63d-a35b-4081-e012-744d85426dd5%26shareId%3D4135f63d-a35b-4081-e012-744d85426dd5%26rootSourceId%3Dtouliu_tencentgzh_20240911_26348326_1"
+                }
+            ]
+        }
+    ],
+    "gh_ac43e43b253b": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "23177732",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23177732%26fromGzh%3D1%26rootShareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26shareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26rootSourceId%3Dtouliu_tencentgzh_20240812_23177732_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "23231548",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23231548%26fromGzh%3D1%26rootShareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26shareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26rootSourceId%3Dtouliu_tencentgzh_20240812_23231548_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 1,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "23177732",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23177732%26fromGzh%3D1%26rootShareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26shareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26rootSourceId%3Dtouliu_tencentgzh_20240812_23177732_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "23231548",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23231548%26fromGzh%3D1%26rootShareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26shareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26rootSourceId%3Dtouliu_tencentgzh_20240812_23231548_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 2,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "23177732",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23177732%26fromGzh%3D1%26rootShareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26shareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26rootSourceId%3Dtouliu_tencentgzh_20240812_23177732_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "23231548",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23231548%26fromGzh%3D1%26rootShareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26shareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26rootSourceId%3Dtouliu_tencentgzh_20240812_23231548_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 3,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "23177732",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23177732%26fromGzh%3D1%26rootShareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26shareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26rootSourceId%3Dtouliu_tencentgzh_20240812_23177732_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "23231548",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23231548%26fromGzh%3D1%26rootShareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26shareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26rootSourceId%3Dtouliu_tencentgzh_20240812_23231548_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 4,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "23177732",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23177732%26fromGzh%3D1%26rootShareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26shareId%3D13315928-351b-44f5-c7b9-c8734235df9c%26rootSourceId%3Dtouliu_tencentgzh_20240812_23177732_1"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "23231548",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D23231548%26fromGzh%3D1%26rootShareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26shareId%3Da7cfdbcb-43d6-4c6c-cd4c-aafc6e979426%26rootSourceId%3Dtouliu_tencentgzh_20240812_23231548_1"
+                }
+            ]
+        }
+    ],
+    "gh_68e7fdc09fe4": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "15527307",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D15527307%26fromGzh%3D1%26rootShareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26shareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26rootSourceId%3Dtouliu_tencentgzh_20240927_15527307_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D616c3fe4-5dd8-4d2a-9567-4e14d344773d%26shareId%3D616c3fe4-5dd8-4d2a-9567-4e14d344773d%26rootSourceId%3Dtouliu_tencentgzh_20240924_26348326_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 1,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "15527307",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D15527307%26fromGzh%3D1%26rootShareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26shareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26rootSourceId%3Dtouliu_tencentgzh_20240927_15527307_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12794884",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12794884%26fromGzh%3D1%26rootShareId%3D9f1851c8-c663-461f-bfc5-5fbe611289b2%26shareId%3D9f1851c8-c663-461f-bfc5-5fbe611289b2%26rootSourceId%3Dtouliu_tencentgzh_20241020_12794884_1516c852"
+                }
+            ]
+        },
+        {
+            "groupIndex": 2,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "15527307",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D15527307%26fromGzh%3D1%26rootShareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26shareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26rootSourceId%3Dtouliu_tencentgzh_20240927_15527307_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12794884",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12794884%26fromGzh%3D1%26rootShareId%3D9f1851c8-c663-461f-bfc5-5fbe611289b2%26shareId%3D9f1851c8-c663-461f-bfc5-5fbe611289b2%26rootSourceId%3Dtouliu_tencentgzh_20241020_12794884_1516c852"
+                }
+            ]
+        },
+        {
+            "groupIndex": 3,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "15527307",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D15527307%26fromGzh%3D1%26rootShareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26shareId%3Da9c0837d-ffc1-47a4-8150-36cc3bada3b7%26rootSourceId%3Dtouliu_tencentgzh_20240927_15527307_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12794884",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12794884%26fromGzh%3D1%26rootShareId%3D9f1851c8-c663-461f-bfc5-5fbe611289b2%26shareId%3D9f1851c8-c663-461f-bfc5-5fbe611289b2%26rootSourceId%3Dtouliu_tencentgzh_20241020_12794884_1516c852"
+                }
+            ]
+        },
+        {
+            "groupIndex": 4,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "1275943",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D1275943%26su%3D6457928%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_68e7fdc09fe4_87aa757fa00fd1d9d1b77a3d93fd0d95"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D616c3fe4-5dd8-4d2a-9567-4e14d344773d%26shareId%3D616c3fe4-5dd8-4d2a-9567-4e14d344773d%26rootSourceId%3Dtouliu_tencentgzh_20240924_26348326_1"
+                }
+            ]
+        }
+    ],
+    "gh_77f36c109fb1": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "20463342",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20463342%26su%3D66857951%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_77f36c109fb1_93c9eae581f8f26ecd3fb4348e8a3c42"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12794884",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12794884%26fromGzh%3D1%26rootShareId%3D7e3482bf-0ee2-493c-8857-b603dbd8c19f%26shareId%3D7e3482bf-0ee2-493c-8857-b603dbd8c19f%26rootSourceId%3Dtouliu_tencentgzh_20241012_12794884_6"
+                }
+            ]
+        },
+        {
+            "groupIndex": 1,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "20463342",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20463342%26su%3D66857951%26fromGzh%3D1%26index%3D1%26publishType%3D1%26rootSourceId%3DGzhTouLiu_Articles_gh_77f36c109fb1_93c9eae581f8f26ecd3fb4348e8a3c42"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12794884",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12794884%26fromGzh%3D1%26rootShareId%3D7e3482bf-0ee2-493c-8857-b603dbd8c19f%26shareId%3D7e3482bf-0ee2-493c-8857-b603dbd8c19f%26rootSourceId%3Dtouliu_tencentgzh_20241012_12794884_6"
+                }
+            ]
+        },
+        {
+            "groupIndex": 2,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "12177006",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12177006%26fromGzh%3D1%26rootShareId%3Db65f7dcd-a048-4f2d-bffd-b19d78d3e369%26shareId%3Db65f7dcd-a048-4f2d-bffd-b19d78d3e369%26rootSourceId%3Dtouliu_tencentgzh_20241011_12177006_4"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3D955afc67-1424-4e0c-9ef7-a15da2dc5b85%26shareId%3D955afc67-1424-4e0c-9ef7-a15da2dc5b85%26rootSourceId%3Dtouliu_tencentgzh_20241025_20657746_afb516f7"
+                }
+            ]
+        },
+        {
+            "groupIndex": 3,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "12177006",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12177006%26fromGzh%3D1%26rootShareId%3Db65f7dcd-a048-4f2d-bffd-b19d78d3e369%26shareId%3Db65f7dcd-a048-4f2d-bffd-b19d78d3e369%26rootSourceId%3Dtouliu_tencentgzh_20241011_12177006_4"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3D955afc67-1424-4e0c-9ef7-a15da2dc5b85%26shareId%3D955afc67-1424-4e0c-9ef7-a15da2dc5b85%26rootSourceId%3Dtouliu_tencentgzh_20241025_20657746_afb516f7"
+                }
+            ]
+        },
+        {
+            "groupIndex": 4,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "12177006",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12177006%26fromGzh%3D1%26rootShareId%3Db65f7dcd-a048-4f2d-bffd-b19d78d3e369%26shareId%3Db65f7dcd-a048-4f2d-bffd-b19d78d3e369%26rootSourceId%3Dtouliu_tencentgzh_20241011_12177006_4"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12028615",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12028615%26fromGzh%3D1%26rootShareId%3D67720b37-0553-4332-9455-370c7fb72b6c%26shareId%3D67720b37-0553-4332-9455-370c7fb72b6c%26rootSourceId%3Dtouliu_tencentgzh_20241025_12028615_d2b55a5c"
+                }
+            ]
+        }
+    ],
+    "gh_b181786a6c8c": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13817005",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13817005%26fromGzh%3D1%26rootShareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26shareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26rootSourceId%3Dtouliu_tencentgzh_20240925_13817005_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26shareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26rootSourceId%3Dtouliu_tencentgzh_20240731_20657746_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 1,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13817005",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13817005%26fromGzh%3D1%26rootShareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26shareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26rootSourceId%3Dtouliu_tencentgzh_20240925_13817005_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26shareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26rootSourceId%3Dtouliu_tencentgzh_20240731_20657746_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 2,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13817005",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13817005%26fromGzh%3D1%26rootShareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26shareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26rootSourceId%3Dtouliu_tencentgzh_20240925_13817005_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26shareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26rootSourceId%3Dtouliu_tencentgzh_20240731_20657746_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 3,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13817005",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13817005%26fromGzh%3D1%26rootShareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26shareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26rootSourceId%3Dtouliu_tencentgzh_20240925_13817005_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26shareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26rootSourceId%3Dtouliu_tencentgzh_20240731_20657746_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 4,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13817005",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13817005%26fromGzh%3D1%26rootShareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26shareId%3Dfd539b5c-8f28-49a9-c6dd-a9ecb57d8582%26rootSourceId%3Dtouliu_tencentgzh_20240925_13817005_2"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "20657746",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D20657746%26fromGzh%3D1%26rootShareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26shareId%3Df73b12db-d0d8-4af4-9935-f9888ce6b7bd%26rootSourceId%3Dtouliu_tencentgzh_20240731_20657746_1"
+                }
+            ]
+        }
+    ],
+    "gh_1ee2e1b39ccf": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26shareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26rootSourceId%3Dtouliu_tencentgzh_20241008_13724870_7"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26shareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26rootSourceId%3Dtouliu_tencentgzh_20241008_26348326_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 1,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26shareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26rootSourceId%3Dtouliu_tencentgzh_20241008_13724870_7"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26shareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26rootSourceId%3Dtouliu_tencentgzh_20241008_26348326_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 2,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26shareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26rootSourceId%3Dtouliu_tencentgzh_20241008_13724870_7"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26shareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26rootSourceId%3Dtouliu_tencentgzh_20241008_26348326_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 3,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26shareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26rootSourceId%3Dtouliu_tencentgzh_20241008_13724870_7"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26shareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26rootSourceId%3Dtouliu_tencentgzh_20241008_26348326_1"
+                }
+            ]
+        },
+        {
+            "groupIndex": 4,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "13724870",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D13724870%26fromGzh%3D1%26rootShareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26shareId%3D0d8768d3-d325-4eb7-da0a-083eedeb729d%26rootSourceId%3Dtouliu_tencentgzh_20241008_13724870_7"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "26348326",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D26348326%26fromGzh%3D1%26rootShareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26shareId%3D21456cd7-8554-473c-8ad3-a7ea4b361071%26rootSourceId%3Dtouliu_tencentgzh_20241008_26348326_1"
+                }
+            ]
+        }
+    ],
+    "gh_d3f039c9db2b": [
+        {
+            "groupIndex": 0,
+            "groupVideoList": [
+                {
+                    "videoIndex": 1,
+                    "videoId": "1275943",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D1275943%26fromGzh%3D1%26rootShareId%3D6c9858d5-2445-4ea5-cf6c-34c8dc189c6a%26shareId%3D6c9858d5-2445-4ea5-cf6c-34c8dc189c6a%26rootSourceId%3Dtouliu_tencentgzh_20241111_1275943_20474657"
+                },
+                {
+                    "videoIndex": 2,
+                    "videoId": "12794884",
+                    "pagePath": "pages/category?jumpPage=pages%2Fuser-videos%3Fid%3D12794884%26fromGzh%3D1%26rootShareId%3D640cb363-8b6e-43be-d861-f366e1e8d6fb%26shareId%3D640cb363-8b6e-43be-d861-f366e1e8d6fb%26rootSourceId%3Dtouliu_tencentgzh_20241111_12794884_e53224ff"
+                }
+            ]
+        }
+    ]
+}
+
+
+def get_pq_video_detail(video_id):
+    """
+    获取票圈视频详情信息
+    :return:
+    """
+    url = "https://longvideoapi.piaoquantv.com/longvideoapi/openapi/video/batchSelectVideoInfo"
+    data = {
+        "videoIdList": [video_id]
+    }
+    header = {
+        "Content-Type": "application/json",
+    }
+    response = requests.post(url,json=data, headers=header)
+    return response.json()
+
+
+def generate_response(gh_id):
+    """
+    输入gh_id, 通过配置文件, 返回结果
+    :param gh_id:
+    :return:
+
+    """
+    msg_list = ACCOUNT_VIDEO[gh_id]
+    response_list = []
+    for msg in msg_list:
+        item = {
+            "groupIndex": msg['groupIndex'],
+            "msgDataList": []
+        }
+        video_info_list = sorted(msg['groupVideoList'], key=lambda x: x['videoIndex'])
+        for video in video_info_list:
+            video_id = video['videoId']
+            video_detail = get_pq_video_detail(video_id)['data'][0]
+            obj = {
+                "msgType": 1,
+                "title": video_detail['title'],
+                "coverUrl": video_detail['shareImgPath'],
+                "miniAppId": "wxbdd2a2e93d9a6e25",
+                "miniPagePath": video['pagePath'],
+                "newsUrl": "",
+                "newsDescription": "",
+                "miniVideoId": video_id
+            }
+            item['msgDataList'].append(obj)
+        article_obj = ARTICLE_URL[gh_id]
+        item['msgDataList'].append(article_obj)
+        response_list.append(item)
+    return response_list

+ 2 - 1
deal/ArticleRank.py

@@ -1,6 +1,7 @@
 """
 @author: luojunhui
 """
+from applications.function import generate_response
 
 
 class tempServer(object):
@@ -1121,5 +1122,5 @@ class tempServer(object):
 
         :return:
         """
-        info_obj = self.accountInfoDict[self.gh_id]
+        info_obj = generate_response(gh_id=self.gh_id)
         return info_obj