We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f34ae8 commit cddb415Copy full SHA for cddb415
moumoubaimifan/cosplay/cosplay.py
@@ -25,6 +25,9 @@ def main(last_id):
25
for item in res_json["data"]["list"]:
26
post_id = item["post"]["post_id"]
27
detail(post_id)
28
+
29
+ if res_json["data"]["last_id"] != "":
30
+ return main(res_json["data"]["last_id"])
31
32
def detail(post_id):
33
url = f"https://bbs-api.mihoyo.com/post/wapi/getPostFull?gids=5&post_id={post_id}&read=1"
@@ -48,18 +51,5 @@ def save_image(image_src):
48
51
49
52
50
53
-if __name__ == '__main__':
- main(18136074)
-
54
-def main(last_id):
55
- url = f"https://bbs-api.mihoyo.com/post/wapi/getForumPostList?forum_id=47&gids=5&is_good=false&last_id={last_id}&is_hot=false&page_size=20&sort_type=2"
56
- res_json = request_get(url, "json")
57
- if res_json["retcode"] == 0:
58
- for item in res_json["data"]["list"]:
59
- detail(item["post"]["post_id"])
60
61
- if res_json["data"]["last_id"] != "":
62
- return main(res_json["data"]["last_id"])
63
64
if __name__ == '__main__':
65
main(18136074)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments