From 597b6146c109eb6412a3154dec8d58145a67a747 Mon Sep 17 00:00:00 2001 From: WindowsMEMZ Date: Sat, 19 Oct 2024 22:45:20 +0800 Subject: [PATCH 1/2] fix: Some requests were banned --- Localizable.xcstrings | 34 +------------------ MeowBili/InMain/ContentView.swift | 1 + MeowBili/InMain/MainView.swift | 5 +-- .../PersonalCenter/PersonAccountView.swift | 5 +-- MeowBili/PersonalCenter/UserDetailView.swift | 1 + 5 files changed, 9 insertions(+), 37 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index a41fe8e90..3155f3909 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -4732,35 +4732,6 @@ } } }, - "Home.update.%@.%@" : { - "extractionState" : "stale", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "v%1$@ build %2$@ had released" - } - }, - "ja" : { - "stringUnit" : { - "state" : "translated", - "value" : "v%1$@ ビルド %2$@がリリースされました" - } - }, - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "v%1$@ Build %2$@已推出" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "v%1$@ Build %2$@已經推出" - } - } - } - }, "Home.update.skip" : { "localizations" : { "en" : { @@ -9731,7 +9702,7 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "MeowBili\nBuild Beta. Build %1$@.xc_verd.%2$@" + "value" : "MeowBili\nDebug Build. Build %1$@.xc_verd.%2$@" } }, "zh-Hans" : { @@ -10256,9 +10227,6 @@ } } } - }, - "手记建议" : { - }, "扩展的触感反馈" : { "localizations" : { diff --git a/MeowBili/InMain/ContentView.swift b/MeowBili/InMain/ContentView.swift index 6ab0bc95d..86eced988 100644 --- a/MeowBili/InMain/ContentView.swift +++ b/MeowBili/InMain/ContentView.swift @@ -125,6 +125,7 @@ struct ContentView: View { getBuvid(url: "https://api.bilibili.com/x/space/wbi/acc/info".urlEncoded()) { buvid3, buvid4, _uuid, _ in let headers: HTTPHeaders = [ "cookie": "SESSDATA=\(sessdata); innersign=0; buvid3=\(buvid3); b_nut=1704873471; i-wanna-go-back=-1; b_ut=7; b_lsid=9910433CB_18CF260AB89; _uuid=\(_uuid); enable_web_push=DISABLE; header_theme_version=undefined; home_feed_column=4; browser_resolution=3440-1440; buvid4=\(buvid4);", + "referer": "https://message.bilibili.com/", // rdar://gh/SocialSisterYi/bilibili-API-collect/issues/631#issuecomment-2099276628 "User-Agent": "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" ] biliWbiSign(paramEncoded: "mid=\(dedeUserID)".base64Encoded()) { signed in diff --git a/MeowBili/InMain/MainView.swift b/MeowBili/InMain/MainView.swift index 795fe2728..acc5fb31a 100644 --- a/MeowBili/InMain/MainView.swift +++ b/MeowBili/InMain/MainView.swift @@ -113,7 +113,8 @@ struct MainView: View { .onAppear { if username == "" { let headers: HTTPHeaders = [ - "cookie": "SESSDATA=\(sessdata); innersign=0; buvid3=\(globalBuvid3); b_nut=1704873471; i-wanna-go-back=-1; b_ut=7; b_lsid=9910433CB_18CF260AB89; enable_web_push=DISABLE; header_theme_version=undefined; home_feed_column=4; browser_resolution=3440-1440; buvid4=\(globalBuvid4); bili_ticket=\(cachedBiliTicket)", + "cookie": "SESSDATA=\(sessdata)", + "referer": "https://message.bilibili.com/", // rdar://gh/SocialSisterYi/bilibili-API-collect/issues/631#issuecomment-2099276628 "User-Agent": "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" ] biliWbiSign(paramEncoded: "mid=\(dedeUserID)".base64Encoded()) { signed in @@ -179,7 +180,7 @@ struct MainView: View { Section { if debug { Button(action: { - + tipWithText("Test") }, label: { Text("Home.debug") }) diff --git a/MeowBili/PersonalCenter/PersonAccountView.swift b/MeowBili/PersonalCenter/PersonAccountView.swift index 5dd82ac62..ce5fa0cc1 100644 --- a/MeowBili/PersonalCenter/PersonAccountView.swift +++ b/MeowBili/PersonalCenter/PersonAccountView.swift @@ -210,15 +210,16 @@ struct PersonAccountView: View { } } .onAppear { - getAccountInfos() + getAccountInfo() } .sheet(isPresented: $isNetworkFixPresented, content: { NetworkFixView() }) } - func getAccountInfos() { + func getAccountInfo() { if username == "" { getBuvid(url: "https://api.bilibili.com/x/space/wbi/acc/info".urlEncoded()) { buvid3, buvid4, _uuid, _ in let headers: HTTPHeaders = [ "cookie": "SESSDATA=\(sessdata); innersign=0; buvid3=\(buvid3); b_nut=1704873471; i-wanna-go-back=-1; b_ut=7; b_lsid=9910433CB_18CF260AB89; _uuid=\(_uuid); enable_web_push=DISABLE; header_theme_version=undefined; home_feed_column=4; browser_resolution=3440-1440; buvid4=\(buvid4);", + "referer": "https://message.bilibili.com/", // rdar://gh/SocialSisterYi/bilibili-API-collect/issues/631#issuecomment-2099276628 "User-Agent": "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" ] biliWbiSign(paramEncoded: "mid=\(dedeUserID)".base64Encoded()) { signed in diff --git a/MeowBili/PersonalCenter/UserDetailView.swift b/MeowBili/PersonalCenter/UserDetailView.swift index d52702e0c..9b4c14a47 100644 --- a/MeowBili/PersonalCenter/UserDetailView.swift +++ b/MeowBili/PersonalCenter/UserDetailView.swift @@ -330,6 +330,7 @@ struct UserDetailView: View { .onAppear { let headers: HTTPHeaders = [ "cookie": "SESSDATA=\(sessdata); buvid3=\(globalBuvid3); bili_ticket=\(cachedBiliTicket)", + "referer": "https://message.bilibili.com/", // rdar://gh/SocialSisterYi/bilibili-API-collect/issues/631#issuecomment-2099276628 "User-Agent": "Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" ] biliWbiSign(paramEncoded: "mid=\(uid)".base64Encoded()) { signed in From 9374530c8de82a4accc79cd090bea5914474e4f6 Mon Sep 17 00:00:00 2001 From: WindowsMEMZ Date: Sat, 19 Oct 2024 22:46:24 +0800 Subject: [PATCH 2/2] fix: Unexpected DS_Store file --- .github/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .github/.DS_Store diff --git a/.github/.DS_Store b/.github/.DS_Store deleted file mode 100644 index a5329412a193726bea3511e203e97f7611d7d5bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!Ac`R5Uoz4nL&gc6x>_GUc+vTB8ZnUn>~1SL>FAiW}K*llj)F2m_rE6T@U*e z{=@#jUcK#q_ytwdz(^s%QR{%KTAxG)`OH;VJcwl!}9y-3^YTUe>9teNoA% z8zsG=PKd%DhI~JXl2BzWHBQ1*=lW*Abse`;`!Ja_x0_paxwW%1t;@-7vr(7ZyUpp; zb=E(A-aG7E$Nfaz=!XY^AFGyCi!-=IqkxR~a??Lo{ecOK?uw)Os@=8(IPv|rhtAn= zqOD-Qz6$>_a&R@j@=x;s+%f~q05kAv2JA8Dth{