From 412555184c8f57019c05dc4dc00fe863d25281bb Mon Sep 17 00:00:00 2001 From: hama3254 Date: Fri, 21 Apr 2023 17:03:00 +0200 Subject: [PATCH] replace fixed user agent string with webview user agent strring replace fixed user agent string with webview user agent strring --- .vs/Crunchyroll Downloader/v17/.suo | Bin 209920 -> 190464 bytes Crunchyroll Downloader/Anime_Add.vb | 4 ++-- Crunchyroll Downloader/App.config | 3 +++ Crunchyroll Downloader/Browser.vb | 4 +++- Crunchyroll Downloader/CRD_List_Item.vb | 10 +++++----- Crunchyroll Downloader/GetData.vb | 6 +++--- Crunchyroll Downloader/Main.vb | 18 +++++++++--------- .../My Project/AssemblyInfo.vb | 4 ++-- .../My Project/Resources.Designer.vb | 9 --------- .../My Project/Resources.resx | 3 --- .../My Project/Settings.Designer.vb | 13 +++++++++++++ .../My Project/Settings.settings | 3 +++ Crunchyroll Downloader/einstellungen.vb | 2 +- Crunchyroll Downloader/queue.vb | 2 +- 14 files changed, 45 insertions(+), 36 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 34c2082a0376782e5fbc52b8e4d4e5681e0453f9..09dd541113ada8d6cf1ee826a6d0ac120ca96b92 100644 GIT binary patch delta 9435 zcmeI1dt8*&y2s~P+%EzmHxYG2Lgdzf+&9X|P0Txz84}91G*Q$+MN!5wvn{2}GM1Gh zO$k$8Kky(@=~Ak$A0;I=UMN%zt4Ks zvo2^qch$DLtV`}6q);gAK}Tn2Cxn8)-9Q7T@iRpOca*Ot9h>bo!+YDM0?miC90>{o zU&5BqU-(5B9e$x-j5G{q zAY-i0&kVzowt^`X4}mp+yE-eYYYmfIT2JkG;SF60A2yFf;M0TJHcyU z7uXG62mb-y0B-^l*aP;0ePBP(<#}&RYEf7!O$8Wqsiz$e!m@U1fb(qLYx9BK#*Jw>{teR9FGlTO#$a4E@wbc;1~h*vDGri1+A z;_*)AS@FQnDm%a{DlG|e;&r#{BJCX!^5LC{`@3uQGS|$t?n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7*7N5{p-+Ty3w?J{!@r59orCtnzu z&U@g@-A1lf^W$P#0$S3;r871b{4+ME&45~r|d8~2HQd+tgYf_ z!su`ze7o@P>AyZ6X_M3EjK%e9G^}6HukC$Q?Abj&f)jXm?fF2tE4$^6QmLg0DtV41 zS{)~ge^jcIrVo|C-_j%{9}K$v;VaSS_|{~E3E=Mw z0b4E8!#Z`R{QGt>EMQO-7_es`aQ5;o~lAHFew z4(u?rogFQ<3hBXgacW-#drGoeHJL%5;8CdgiZVICarqGNr!VhNXuq{-r3j!i&ATL9 zlfSF|@8mpEtx3nN!RAmf>$*&=$LW1bbgy6<2k%3i;YHF-( z@@}nu=p9kqZIjr(c-_NV3^bc?-tDiSQuFeL~Byk44|MhE;3 z`*3=kGF6$ORK{l{$<*pNc~Xo-5_k9M)?}S)0-*`NI}!udxA&N2K6{3)H+Qpb2gVHj z^@XxYO*0-uU{nEA)kR<)nOOWgt>WZM@&>FO__FUDe`6AyXdIDIA0mWf%20dkOc_h9 z4(8z=)VIIo<5c)oJ_o+FeoD~sp$+fvK_j^C1*+3ui-ZpyQU$qi99;nKIo0sdcs^u> zH*CD^d74UE7zwXzkit9PM_9N6%N~_w%oe09^Gx3tjWQlsN0t2>-h;0R4yAR^CTciFX~QZi>?ylcvzwRhqCz9QPaY&> Q(w2{yBum0i|D6u{A3Vf6*8l(j diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index d7e669e..fecb4b7 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -192,7 +192,7 @@ Public Class Anime_Add Try Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) v1Json = client.DownloadString(v1JsonUrl) End Using Main.WebbrowserURL = textBox1.Text @@ -489,7 +489,7 @@ Public Class Anime_Add Try Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) EpisodeJson = client.DownloadString(EpisodeJsonURL) End Using Catch ex As Exception diff --git a/Crunchyroll Downloader/App.config b/Crunchyroll Downloader/App.config index 6c7cc59..642dc02 100644 --- a/Crunchyroll Downloader/App.config +++ b/Crunchyroll Downloader/App.config @@ -162,6 +162,9 @@ False + + "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.34" + diff --git a/Crunchyroll Downloader/Browser.vb b/Crunchyroll Downloader/Browser.vb index 9c0978a..46efc58 100644 --- a/Crunchyroll Downloader/Browser.vb +++ b/Crunchyroll Downloader/Browser.vb @@ -26,7 +26,9 @@ Public Class Browser AddHandler WebView2.CoreWebView2.WebResourceResponseReceived, AddressOf ObserveResponse AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp - WebView2.CoreWebView2.Settings.UserAgent = My.Resources.ffmpeg_user_agend.Replace(Chr(34), "").Replace("User-Agent: ", "") + 'WebView2.CoreWebView2.Settings.UserAgent = My.Settings.User_Agend.Replace(Chr(34), "").Replace("User-Agent: ", "") + My.Settings.User_Agend = Chr(34) + "User-Agent: " + WebView2.CoreWebView2.Settings.UserAgent + Chr(34) + 'MsgBox(My.Settings.User_Agend) If WebView2.CoreWebView2.Source = "about:blank" Or WebView2.CoreWebView2.Source = Nothing Then 'TextBox1.Text = Main.Startseite WebView2.CoreWebView2.Navigate(Main.Startseite) diff --git a/Crunchyroll Downloader/CRD_List_Item.vb b/Crunchyroll Downloader/CRD_List_Item.vb index baa3127..b829459 100644 --- a/Crunchyroll Downloader/CRD_List_Item.vb +++ b/Crunchyroll Downloader/CRD_List_Item.vb @@ -744,7 +744,7 @@ Public Class CRD_List_Item Dim Request As HttpWebRequest = CType(WebRequest.Create(DL_URL), HttpWebRequest) Dim Bytes(NewBytes) As Byte - Request.UserAgent = My.Resources.ffmpeg_user_agend.Replace(Chr(34), "").Replace("User-Agent: ", "") + Request.UserAgent = My.Settings.User_Agend.Replace(Chr(34), "").Replace("User-Agent: ", "") Request.Timeout = 30000 Request.Method = "GET" Request.AddRange(CurrentSize, CurrentSize + NewBytes) @@ -1203,8 +1203,8 @@ Public Class CRD_List_Item RaiseEvent UpdateUI(100, di, PauseTime) - If CBool(InStr(DL_URL, " -headers " + My.Resources.ffmpeg_user_agend)) = True And CBool(InStr(DL_URL, "https:\\")) = False Then - DL_URL = DL_URL.Replace(" -headers " + My.Resources.ffmpeg_user_agend, "") + If CBool(InStr(DL_URL, " -headers " + My.Settings.User_Agend)) = True And CBool(InStr(DL_URL, "https:\\")) = False Then + DL_URL = DL_URL.Replace(" -headers " + My.Settings.User_Agend, "") End If 'MsgBox(DL_URL) @@ -1252,7 +1252,7 @@ Public Class CRD_List_Item Dim exepath As String = Application.StartupPath + "\ffmpeg.exe" Dim startinfo As New System.Diagnostics.ProcessStartInfo - Dim cmd As String = "-user_agent " + My.Resources.ffmpeg_user_agend.Replace("User-Agent: ", "") + " -headers " + Chr(34) + "ACCEPT-ENCODING: *" + Chr(34) + " " + DLCommand + " " + DL_Pfad 'start ffmpeg with command strFFCMD string + Dim cmd As String = "-user_agent " + My.Settings.User_Agend.Replace("User-Agent: ", "") + " -headers " + Chr(34) + "ACCEPT-ENCODING: *" + Chr(34) + " " + DLCommand + " " + DL_Pfad 'start ffmpeg with command strFFCMD string LogText.Add(Date.Now.ToString + " " + cmd) If Debug2 = True Then MsgBox(cmd) @@ -1464,7 +1464,7 @@ Public Class CRD_List_Item 'MsgBox(BaseURL + SiteList(i) + vbNewLine + Pfad_DL + "\" + SiteList(i)) Dim iWert As Integer = i Using client As New WebClient() - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) client.Headers.Add(HttpRequestHeader.AcceptEncoding, "*") client.DownloadFile(BaseURL + SiteList(i), Pfad_DL + "\" + SiteList(i)) Pause(1) diff --git a/Crunchyroll Downloader/GetData.vb b/Crunchyroll Downloader/GetData.vb index 87c6f6c..5caa5ec 100644 --- a/Crunchyroll Downloader/GetData.vb +++ b/Crunchyroll Downloader/GetData.vb @@ -15,7 +15,7 @@ Module GetData If Main.Curl_insecure = True Then cmd = "--insecure " End If - cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Resources.ffmpeg_user_agend.Replace("User-Agent: ", "") + " " + Chr(34) + Url + Chr(34) + cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Settings.User_Agend.Replace("User-Agent: ", "") + " " + Chr(34) + Url + Chr(34) Dim Proc As New Process 'MsgBox(cmd) Dim CurlOutput As String = Nothing @@ -84,7 +84,7 @@ Module GetData If Main.Curl_insecure = True Then cmd = "--insecure " End If - cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Resources.ffmpeg_user_agend.Replace("User-Agent: ", "") + Cookies + Auth + Post + " " + Chr(34) + Url + Chr(34) + cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Settings.User_Agend.Replace("User-Agent: ", "") + Cookies + Auth + Post + " " + Chr(34) + Url + Chr(34) Dim Proc As New Process 'Debug.WriteLine("CurlPost: " + cmd) Dim CurlOutput As String = Nothing @@ -154,7 +154,7 @@ Module GetData If Main.Curl_insecure = True Then cmd = "--insecure " End If - cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Resources.ffmpeg_user_agend.Replace("User-Agent: ", "") + Cookies + Auth + " " + Chr(34) + Url + Chr(34) + cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Settings.User_Agend.Replace("User-Agent: ", "") + Cookies + Auth + " " + Chr(34) + Url + Chr(34) Dim Proc As New Process 'MsgBox(cmd) Dim CurlOutput As String = Nothing diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index b934681..a7de826 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -2249,7 +2249,7 @@ Public Class Main Try Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) SeasonJson = client.DownloadString(JsonUrl) End Using Catch ex As Exception @@ -2426,7 +2426,7 @@ Public Class Main Try Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) v1Json = client.DownloadString(v1JsonUrl) End Using WebbrowserURL = ListOfEpisodes(i) @@ -2542,7 +2542,7 @@ Public Class Main 'Throw New Exception("TEst") Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) v1Json = client.DownloadString(v1JsonUrl) End Using Catch ex As Exception @@ -2773,7 +2773,7 @@ Public Class Main Dim EpisodeJsonString As String = Nothing Dim PlayerClient As New WebClient PlayerClient.Encoding = Encoding.UTF8 - PlayerClient.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + PlayerClient.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) PlayerClient.Headers.Add(HttpRequestHeader.Accept, "application/json, text/plain, */*") PlayerClient.Headers.Add("origin: https://www.funimation.com/") PlayerClient.Headers.Add(HttpRequestHeader.Referer, "https://www.funimation.com/") @@ -2964,7 +2964,7 @@ Public Class Main Dim FunimationAudio() As String = str1.Split(New String() {"# AUDIO groups"}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationAudio2() As String = FunimationAudio(1).Split(New String() {"URI=" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationAudio3() As String = FunimationAudio2(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) - FunimationAudioMap = " -headers " + My.Resources.ffmpeg_user_agend + " -i " + Chr(34) + FunimationAudio3(0) + Chr(34) + FunimationAudioMap = " -headers " + My.Settings.User_Agend + " -i " + Chr(34) + FunimationAudio3(0) + Chr(34) End If Dim str2() As String = str1.Split(New String() {"# keyframes"}, System.StringSplitOptions.RemoveEmptyEntries) @@ -3157,9 +3157,9 @@ Public Class Main DispositionIndex = MapCount End If If SoftSubMergeURLs = Nothing Then - SoftSubMergeURLs = " -headers " + My.Resources.ffmpeg_user_agend + " -i " + Chr(34) + SoftSub(0) + Chr(34) + SoftSubMergeURLs = " -headers " + My.Settings.User_Agend + " -i " + Chr(34) + SoftSub(0) + Chr(34) Else - SoftSubMergeURLs = SoftSubMergeURLs + " -headers " + My.Resources.ffmpeg_user_agend + " -i " + Chr(34) + SoftSub(0) + Chr(34) + SoftSubMergeURLs = SoftSubMergeURLs + " -headers " + My.Settings.User_Agend + " -i " + Chr(34) + SoftSub(0) + Chr(34) End If If FunimationAudioMap = Nothing Then SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (MapCount + 1).ToString @@ -3231,7 +3231,7 @@ Public Class Main If FunimationAudioMap = Nothing Then Funimation_m3u8_final = "-i " + Chr(34) + Funimation_m3u8_final + Chr(34) + DubMetatata + " " + ffmpeg_command_temp Else - Funimation_m3u8_final = FunimationAudioMap.Replace(" -headers " + My.Resources.ffmpeg_user_agend + " ", "") + DubMetatata + " " + ffmpeg_command_temp + Funimation_m3u8_final = FunimationAudioMap.Replace(" -headers " + My.Settings.User_Agend + " ", "") + DubMetatata + " " + ffmpeg_command_temp End If Else Funimation_m3u8_final = "-i " + Chr(34) + Funimation_m3u8_final + Chr(34) + FunimationAudioMap + DubMetatata + " " + ffmpeg_command @@ -3335,7 +3335,7 @@ Public Class Main Try Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) Dim SaveName As String = System.Text.RegularExpressions.Regex.Replace(DocumentTitle.Replace(" - Schaue legal auf Wakanim.TV", ""), "[^\w\\-]", " ").Replace(":", "") SaveName = RemoveExtraSpaces(SaveName) client.DownloadFile(WakanimSub2(0), Pfad + "\" + SaveName + ".vtt") diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb index 41ec737..df9933a 100644 --- a/Crunchyroll Downloader/My Project/AssemblyInfo.vb +++ b/Crunchyroll Downloader/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Crunchyroll Downloader/My Project/Resources.Designer.vb b/Crunchyroll Downloader/My Project/Resources.Designer.vb index 8ad1361..661faa3 100644 --- a/Crunchyroll Downloader/My Project/Resources.Designer.vb +++ b/Crunchyroll Downloader/My Project/Resources.Designer.vb @@ -398,15 +398,6 @@ Namespace My.Resources End Get End Property - ''' - ''' Sucht eine lokalisierte Zeichenfolge, die "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0" ähnelt. - ''' - Friend ReadOnly Property ffmpeg_user_agend() As String - Get - Return ResourceManager.GetString("ffmpeg_user_agend", resourceCulture) - End Get - End Property - ''' ''' Sucht eine lokalisierte Zeichenfolge, die src="/player/ ähnelt. ''' diff --git a/Crunchyroll Downloader/My Project/Resources.resx b/Crunchyroll Downloader/My Project/Resources.resx index cea9ca7..f6bfe99 100644 --- a/Crunchyroll Downloader/My Project/Resources.resx +++ b/Crunchyroll Downloader/My Project/Resources.resx @@ -391,9 +391,6 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem ..\Resources\crdSettings_Button_SafeExit_hover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0" - ..\Resources\crdSettings_Button_SafeExit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Crunchyroll Downloader/My Project/Settings.Designer.vb b/Crunchyroll Downloader/My Project/Settings.Designer.vb index 61cc299..c4947e8 100644 --- a/Crunchyroll Downloader/My Project/Settings.Designer.vb +++ b/Crunchyroll Downloader/My Project/Settings.Designer.vb @@ -617,6 +617,19 @@ Namespace My Me("Captions") = value End Set End Property + + _ + Public Property User_Agend() As String + Get + Return CType(Me("User_Agend"),String) + End Get + Set + Me("User_Agend") = value + End Set + End Property End Class End Namespace diff --git a/Crunchyroll Downloader/My Project/Settings.settings b/Crunchyroll Downloader/My Project/Settings.settings index f58ab39..8ffd73c 100644 --- a/Crunchyroll Downloader/My Project/Settings.settings +++ b/Crunchyroll Downloader/My Project/Settings.settings @@ -143,5 +143,8 @@ False + + "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.34" + \ No newline at end of file diff --git a/Crunchyroll Downloader/einstellungen.vb b/Crunchyroll Downloader/einstellungen.vb index e104284..9e1ab44 100644 --- a/Crunchyroll Downloader/einstellungen.vb +++ b/Crunchyroll Downloader/einstellungen.vb @@ -973,7 +973,7 @@ Public Class Einstellungen Try Dim client0 As New WebClient client0.Encoding = Encoding.UTF8 - client0.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client0.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) Dim str0 As String = client0.DownloadString("https://api.github.com/repos/hama3254/Crunchyroll-Downloader-v3.0/releases") diff --git a/Crunchyroll Downloader/queue.vb b/Crunchyroll Downloader/queue.vb index c6d2395..4e7aff3 100644 --- a/Crunchyroll Downloader/queue.vb +++ b/Crunchyroll Downloader/queue.vb @@ -96,7 +96,7 @@ Public Class Queue Try Using client As New WebClient() client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + client.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), "")) v1Json = client.DownloadString(v1JsonUrl) End Using Main.Funimation_Grapp_RDY = False