diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 34c2082..09dd541 100644 Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ 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