diff --git a/.vs/Crunchyroll Downloader/v15/.suo b/.vs/Crunchyroll Downloader/v15/.suo index b720455..52cf494 100644 Binary files a/.vs/Crunchyroll Downloader/v15/.suo and b/.vs/Crunchyroll Downloader/v15/.suo differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide index 1ff38a3..a373ded 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm index 7506203..05af633 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal index 69d03e9..11e8aa9 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Crunchyroll Downloader/GeckoFX.vb b/Crunchyroll Downloader/GeckoFX.vb index 12b67d8..0db7dbd 100644 --- a/Crunchyroll Downloader/GeckoFX.vb +++ b/Crunchyroll Downloader/GeckoFX.vb @@ -161,9 +161,15 @@ Public Class GeckoFX 'ElseIf CBool(InStr(WebBrowser1.Url.ToString, "https://www.anime-on-demand.de/anime/")) Then ElseIf CBool(InStr(WebBrowser1.Url.ToString, "funimation.com/player")) Then 'todo softsub download - Dim SubTitle1() As String = WebBrowser1.Document.Body.OuterHtml.Split(New String() {".srt"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim SubTitle2() As String = SubTitle1(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) - Main.WebbrowserSoftSubURL = SubTitle2(SubTitle2.Count - 1) + ".srt" + 'MsgBox(WebBrowser1.Document.Body.OuterHtml) + If InStr(WebBrowser1.Document.Body.OuterHtml, ".srt") Then + Dim SubTitle1() As String = WebBrowser1.Document.Body.OuterHtml.Split(New String() {".srt"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim SubTitle2() As String = SubTitle1(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + Main.WebbrowserSoftSubURL = SubTitle2(SubTitle2.Count - 1) + ".srt" + Else + Main.WebbrowserSoftSubURL = Nothing + End If + 'MsgBox(Main.WebbrowserSoftSubURL) ' Anime_Add.StatusLabel.Text = ElseIf CBool(InStr(WebBrowser1.Url.ToString, "funimation.com")) Then @@ -174,6 +180,7 @@ Public Class GeckoFX Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml + Main.WebbrowserCookie = WebBrowser1.Document.Cookie Main.b = True t = New Thread(AddressOf Main.Funitmation_Grapp) @@ -404,7 +411,7 @@ Public Class GeckoFX 'Main.GrappURL() Try My.Computer.Clipboard.SetText(WebBrowser1.Url.ToString) - 'My.Computer.Clipboard.SetText(WebBrowser1.Document.Head.InnerHtml) + 'My.Computer.Clipboard.SetText(WebBrowser1.Document.Cookie) MsgBox("copied: " + Chr(34) + WebBrowser1.Url.ToString + Chr(34)) Catch ex As Exception @@ -629,34 +636,34 @@ Public Class GeckoFX Next End If - If Main.txtList.Count > 0 Then 'InStr(HTMLString, ".mpd?") Then - HTMLString = Main.mpdList.Item(0) - 'Button2.Text = "found mpd!" - Main.LogBrowserData = False + 'If Main.txtList.Count > 0 Then 'InStr(HTMLString, ".mpd?") Then + ' HTMLString = Main.mpdList.Item(0) + ' 'Button2.Text = "found mpd!" + ' Main.LogBrowserData = False - GeckoPreferences.Default("logging.config.LOG_FILE") = "gecko-network.txt" - GeckoPreferences.Default("logging.nsHttp") = 0 - Dim URL As String = Nothing - Dim HTMLSplit() As String = HTMLString.Split(New String() {vbNewLine}, System.StringSplitOptions.RemoveEmptyEntries) - For i As Integer = 0 To HTMLSplit.Count - 1 - If InStr(HTMLSplit(i), ".mpd?") Then - Dim URLPart2() As String = HTMLSplit(i).Split(New String() {" GET "}, System.StringSplitOptions.RemoveEmptyEntries) - Dim URLPart2Split2() As String = URLPart2(1).Split(New String() {" HTTP/"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim URLPart1() As String = HTMLSplit(i + 1).Split(New String() {" Host: "}, System.StringSplitOptions.RemoveEmptyEntries) - Main.NonCR_URL = "https://" + URLPart1(1) + URLPart2Split2(0) - 'MsgBox(Main.NonCR_URL) - 'RichTextBox1.Text = RichTextBox1.Text + vbNewLine + URL_Final - Main.FFMPEG_Reso(Main.NonCR_URL) - t = New Thread(AddressOf Main.Grapp_non_CR) - t.Priority = ThreadPriority.Normal - t.IsBackground = True - t.Start() - Button2.Text = "Start network scan" - Exit For - End If - Next + ' GeckoPreferences.Default("logging.config.LOG_FILE") = "gecko-network.txt" + ' GeckoPreferences.Default("logging.nsHttp") = 0 + ' Dim URL As String = Nothing + ' Dim HTMLSplit() As String = HTMLString.Split(New String() {vbNewLine}, System.StringSplitOptions.RemoveEmptyEntries) + ' For i As Integer = 0 To HTMLSplit.Count - 1 + ' If InStr(HTMLSplit(i), ".mpd?") Then + ' Dim URLPart2() As String = HTMLSplit(i).Split(New String() {" GET "}, System.StringSplitOptions.RemoveEmptyEntries) + ' Dim URLPart2Split2() As String = URLPart2(1).Split(New String() {" HTTP/"}, System.StringSplitOptions.RemoveEmptyEntries) + ' Dim URLPart1() As String = HTMLSplit(i + 1).Split(New String() {" Host: "}, System.StringSplitOptions.RemoveEmptyEntries) + ' Main.NonCR_URL = "https://" + URLPart1(1) + URLPart2Split2(0) + ' 'MsgBox(Main.NonCR_URL) + ' 'RichTextBox1.Text = RichTextBox1.Text + vbNewLine + URL_Final + ' Main.FFMPEG_Reso(Main.NonCR_URL) + ' t = New Thread(AddressOf Main.Grapp_non_CR) + ' t.Priority = ThreadPriority.Normal + ' t.IsBackground = True + ' t.Start() + ' Button2.Text = "Start network scan" + ' Exit For + ' End If + ' Next - End If + 'End If ScanTrue = False Button2.Enabled = True Catch ex As Exception diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index f43fcf8..56be4aa 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -62,6 +62,7 @@ Public Class Main Public WebbrowserURL As String = Nothing Public WebbrowserText As String = Nothing Public WebbrowserTitle As String = Nothing + Public WebbrowserCookie As String = Nothing Public UserBowser As Boolean = False #Region "Sprachen Vairablen" Public URL_Invaild As String = "invalid URL, this Downloader is only for crunchyroll.com" @@ -1852,6 +1853,10 @@ Public Class Main Dim client0 As New WebClient client0.Encoding = Encoding.UTF8 + If WebbrowserCookie = Nothing Then + Else + client0.Headers.Add(HttpRequestHeader.Cookie, WebbrowserCookie) + End If Dim str0 As String = client0.DownloadString("https://www.funimation.com/api/showexperience/" + Player_ID2(0) + "/?pinst_id=fzQc9p9f") Dim Funimation_m3u8() As String = str0.Split(New String() {My.Resources.Funimation_src_string}, System.StringSplitOptions.RemoveEmptyEntries) Dim Funimation_m3u8_final As String = Nothing @@ -1863,6 +1868,25 @@ Public Class Main Exit For End If Next + If Funimation_m3u8_Main = Nothing Then + + If MessageBox.Show("No media found in:" + vbNewLine + str0, "No media", MessageBoxButtons.RetryCancel) = DialogResult.Retry Then + Me.Invoke(New Action(Function() + GeckoFX.WebBrowser1.Navigate(WebbrowserURL) + Try + Anime_Add.StatusLabel.Text = "retrying Funimation" + Catch ex As Exception + End Try + Return Nothing + End Function)) + Exit Sub + Else + Funimation_Grapp_RDY = True + Exit Sub + End If + Else + 'MsgBox(Funimation_m3u8_Main) + End If Dim str1 As String = client0.DownloadString(Funimation_m3u8_Main.Replace(Chr(34), "")) Dim textLenght() As String = str1.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries) @@ -1875,6 +1899,24 @@ Public Class Main End If Next + If Funimation_m3u8_final = Nothing Then + Me.Invoke(New Action(Function() + DialogTaskString = "Funimation_Resolution" + ResoNotFoundString = str1 + Reso.ShowDialog() + Return Nothing + End Function)) + + For i As Integer = 0 To textLenght.Length - 1 + If InStr(textLenght(i), "https") Then + If InStr(textLenght(i - 1), ResoBackString) Then + Funimation_m3u8_final = textLenght(i) + Exit For + End If + End If + Next + + End If ' 'MsgBox(FunimationName3) 'MsgBox(Funimation_m3u8_final) @@ -1895,6 +1937,7 @@ Public Class Main #End Region If WebbrowserSoftSubURL = Nothing Then Else + 'MsgBox(WebbrowserSoftSubURL) Dim str2 As String = client0.DownloadString(WebbrowserSoftSubURL) Dim Pfad3 As String = DownloadPfad.Replace(Chr(34), "") Dim Pfad4 As String = Pfad3.Replace(".mp4", ".srt") diff --git a/Crunchyroll Downloader/Reso.vb b/Crunchyroll Downloader/Reso.vb index 506d309..0ff69cf 100644 --- a/Crunchyroll Downloader/Reso.vb +++ b/Crunchyroll Downloader/Reso.vb @@ -66,6 +66,26 @@ Catch ex As Exception End Try + ElseIf Main.DialogTaskString = "Funimation_Resolution" Then + StatusLabel.Text = Main.LabelResoNotFoundText + Dim ResoList As New List(Of String) + Dim m3u8_split As String() = Main.ResoNotFoundString.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries) + For i As Integer = 0 To m3u8_split.Count - 1 + If InStr(m3u8_split(i), "RESOLUTION=") Then + ResoList.Add(m3u8_split(i)) + End If + Next + + Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) + For i As Integer = 0 To ResoList.Count - 1 + Dim Reso_avaible As String() = ResoList.Item(i).Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) + ComboBox1.Items.Add(Reso_avaible(1)) + Next + SurroundingSub() + Try + ComboBox1.SelectedIndex = 0 + Catch ex As Exception + End Try End If End Sub diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe index d28397d..5262312 100644 Binary files a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe and b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe differ diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb index 33aa7ff..0768865 100644 Binary files a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb and b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb differ diff --git a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.exe b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.exe index d28397d..5262312 100644 Binary files a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.exe and b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.exe differ diff --git a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.pdb b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.pdb index 33aa7ff..0768865 100644 Binary files a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.pdb and b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.pdb differ diff --git a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache index cb8aea8..d9466ea 100644 Binary files a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache and b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache differ diff --git a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll_Downloader.Resources.resources b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll_Downloader.Resources.resources index 4582239..24ce458 100644 Binary files a/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll_Downloader.Resources.resources and b/Crunchyroll Downloader/obj/x86/Debug/Crunchyroll_Downloader.Resources.resources differ