From 39c01e5deebddb733ed8731e8073197520fca079 Mon Sep 17 00:00:00 2001 From: phimw839l <1289375846@qq.com> Date: Tue, 10 Sep 2024 18:23:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E5=8A=9F=E8=83=BD=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=90=9C=E7=B4=A2=E2=80=9C=E5=B7=B4=E9=BB=8E2024?= =?UTF-8?q?=E5=A5=A5=E8=BF=90=E4=BC=9A=E2=80=9D=E7=BB=BC=E5=90=88=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=89=8D300=E7=9A=84=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- biliworm.py | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 biliworm.py diff --git a/biliworm.py b/biliworm.py new file mode 100644 index 0000000..2087e3a --- /dev/null +++ b/biliworm.py @@ -0,0 +1,82 @@ +import requests +import re +import time + +myheaders = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0", + "Origin": "https://www.bilibili.com", + "Referer": "https://www.bilibili.com/video/", +} + +cookies = { + 'buvid3': 'DDA86D9C-4064-261D-2976-D4E63AD730A564738infoc', + 'b_nut': '1695170764', + 'i-wanna-go-back': '-1', + 'b_ut': '7', + '_uuid': '2810F1671-99DE-10A66-C9AE-5B61019F2216163877infoc', + 'buvid4': '87467447-EE1D-BC09-85DF-5A5E3F25BE7165649-023092008-b1nz50QSFWB7BaPFTf2tYA%3D%3D', + 'buvid_fp': '266cc042522c26ce1e2557f010fbed18', + 'rpdid': '|(JlRYJ)|~~k0J\'uYmlu~|)um', + 'LIVE_BUVID': 'AUTO1216952190745314', + 'hit-dyn-v2': '1', + 'CURRENT_BLACKGAP': '0', + 'FEED_LIVE_VERSION': 'V8', + 'enable_web_push': 'DISABLE', + 'header_theme_version': 'CLOSE', + 'is-2022-channel': '1', + 'fingerprint': '3e0ba62f2ede9954c9a3360a332ed3fe', + 'home_feed_column': '5', + 'browser_resolution': '1659-802', + 'CURRENT_QUALITY': '112', + 'PVID': '1', + 'CURRENT_FNVAL': '4048', + 'bili_ticket': 'eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjYxMzQ2MTcsImlhdCI6MTcyNTg3NTM1NywicGx0IjotMX0.0n5Yc4s1FwV1pzKnXIF2zfaxXNMWhOmLaJUn7BWcasY', + 'bili_ticket_expires': '1726134557', + 'b_lsid': '1010CFED5E_191D69F70D6', + 'bp_t_offset_37785435': '975157412430348288', + 'SESSDATA': 'faf21f25%2C1741437012%2Cc737f%2A92CjDRWap9qwrZzKXpPNWrsaDeI2PgC401HL-Krx6I2bhuhDGbh9sHwhaTc74Y5D6KA8QSVnV1bUdYQlE0RnNLRnVRVzdueFZRRlB6S2h5Rm04bEZMVUQ5TmF6eWhkeTVnbzUwZHEtMDBQU3JudmNnSnJyYmFMeGdnUVVMUjFDbXhfQ1FSVHRDR1pBIIEC', + 'bili_jct': 'ce951c956d19b9d35b1dc373f2beb814', + 'DedeUserID': '37785435', + 'DedeUserID__ckMd5': '3bf0222f80269ba5', + 'sid': '580krxex' +} + +param1 = { + "__refresh__": "true", + "page": "1", + "page_size": "42", + "pubtime_begin_s": "0", + "pubtime_end_s": "0", + "from_spmid": "333.337", + "platform": "pc", + "highlight": "1", + "single_column": "0", + "keyword": "2024巴黎奥运会", +} + +url = "https://api.bilibili.com/x/web-interface/search/all" + +obj1 = re.compile(r'{"type":"video".*?","arcurl":"(?P