update CR code

update CR code
This commit is contained in:
hama3254 2022-10-21 20:25:48 +02:00
parent fad0adccb5
commit 18551f5d48
6 changed files with 342 additions and 258 deletions

Binary file not shown.

View File

@ -24,7 +24,7 @@ Public Class Anime_Add
Public Sub LoadBrowser(ByVal Url As String) Public Sub LoadBrowser(ByVal Url As String)
Main.LoadedUrl = Url 'Main.LoadedUrl = Url
' Dim locale As String = "en-US" ' Dim locale As String = "en-US"
' If CBool(InStr(Url, "beta.crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True And CBool(Main.CrBetaBasic = Nothing) = False Then ' If CBool(InStr(Url, "beta.crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True And CBool(Main.CrBetaBasic = Nothing) = False Then
@ -610,7 +610,7 @@ Public Class Anime_Add
CefSharp_Browser.WebBrowser1.LoadUrl(EpisodeJsonURL) 'CefSharp_Browser.WebBrowser1.LoadUrl(EpisodeJsonURL)
'Try 'Try
@ -626,6 +626,37 @@ Public Class Anime_Add
'End Try 'End Try
Dim EpisodeJson As String = Main.Curl(EpisodeJsonURL) 'localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "")
Main.CrBetaMassEpisodes = EpisodeJson
Dim EpisodeNameSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeNameSplit2() As String = EpisodeNameSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
If EpisodeSplit(i).Substring(0, 1) = Chr(34) Then
comboBox3.Items.Add(EpisodeNameSplit2(0))
comboBox4.Items.Add(EpisodeNameSplit2(0))
Else
comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
End If
Next
If comboBox3.Items.Count > 0 Then
comboBox3.SelectedIndex = 0
comboBox4.SelectedIndex = comboBox4.Items.Count - 1
End If
comboBox3.Enabled = True
comboBox4.Enabled = True
ElseIf CBool(InStr(Main.WebbrowserURL, "vrv.co")) = True Then ElseIf CBool(InStr(Main.WebbrowserURL, "vrv.co")) = True Then
comboBox3.Items.Clear() comboBox3.Items.Clear()

View File

@ -22,15 +22,15 @@ Public Class Main
Dim t As Thread Dim t As Thread
Dim HTML As String = Nothing Dim HTML As String = Nothing
Public CR_Cookies As String = "Cookie: " Public CR_Cookies As String = "Cookie: "
Public LoadedUrl As String = Nothing 'Public LoadedUrl As String = Nothing
Public CrBetaMass As String = Nothing Public CrBetaMass As String = Nothing
Public CrBetaMassEpisodes As String = Nothing Public CrBetaMassEpisodes As String = Nothing
Public CrBetaMassParameters As String = Nothing Public CrBetaMassParameters As String = Nothing
Public CrBetaMassBaseURL As String = Nothing Public CrBetaMassBaseURL As String = Nothing
Public CrBetaBasic As String = Nothing Public CrBetaBasic As String = Nothing
Public CrBetaObjects As String = Nothing 'Public CrBetaObjects As String = Nothing
Public CrBetaStreams As String = Nothing 'Public CrBetaStreams As String = Nothing
Public CrBetaStreamsUrl As String = Nothing 'Public CrBetaStreamsUrl As String = Nothing
Public BlockList As List(Of String) Public BlockList As List(Of String)
Public LoadedUrls As New List(Of String) Public LoadedUrls As New List(Of String)
@ -990,6 +990,48 @@ Public Class Main
End Function End Function
#End Region #End Region
#Region "curl"
Function Curl(ByVal Url As String) As String
Dim exepath As String = "curl.exe"
Dim startinfo As New System.Diagnostics.ProcessStartInfo
Dim sr As StreamReader
Dim cmd As String = "--no-alpn -fsSLm 15 -A " + My.Resources.ffmpeg_user_agend.Replace("User-Agent: ", "") + " " + Chr(34) + Url + Chr(34)
Dim Proc As New Process
'MsgBox(cmd)
Dim CurlOutput As String = Nothing
' all parameters required to run the process
startinfo.FileName = exepath
startinfo.Arguments = cmd
startinfo.UseShellExecute = False
startinfo.WindowStyle = ProcessWindowStyle.Normal
startinfo.RedirectStandardError = True
startinfo.RedirectStandardOutput = True
startinfo.CreateNoWindow = True
Proc.StartInfo = startinfo
Proc.Start() ' start the process
sr = Proc.StandardOutput 'standard error is used by ffmpeg
'sw = proc.StandardInput
Do
CurlOutput = CurlOutput + sr.ReadToEnd
'ffmpegOutput2 = sr.ReadLine
Debug.WriteLine(CurlOutput)
Loop Until Proc.HasExited
Return CurlOutput
End Function
#End Region
#Region "CR-Beta" #Region "CR-Beta"
Public Async Sub DownloadBetaSeasons() Public Async Sub DownloadBetaSeasons()
@ -997,14 +1039,14 @@ Public Class Main
Dim ListOfEpisodes As New List(Of String) Dim ListOfEpisodes As New List(Of String)
Dim EpisodeSplit() As String = CrBetaMassEpisodes.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeSplit() As String = CrBetaMassEpisodes.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
My.Computer.FileSystem.WriteAllText("D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\bin\x64\Debug\WebInterface\EpisodeSplit.txt", CrBetaMassEpisodes, False) 'My.Computer.FileSystem.WriteAllText("D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\bin\x64\Debug\WebInterface\EpisodeSplit.txt", CrBetaMassEpisodes, False)
'"slug_title":" '"slug_title":"
For i As Integer = 1 To EpisodeSplit.Count - 1 For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeSplit3() As String = EpisodeSplit(i).Split(New String() {Chr(34) + "slug_title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeSplit3() As String = EpisodeSplit(i).Split(New String() {Chr(34) + "slug_title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeSplit4() As String = EpisodeSplit3(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeSplit4() As String = EpisodeSplit3(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
MsgBox("https://www.crunchyroll.com/watch/" + EpisodeSplit2(0) + "/" + EpisodeSplit4(0) + "/") 'MsgBox("https://www.crunchyroll.com/watch/" + EpisodeSplit2(0) + "/" + EpisodeSplit4(0) + "/")
ListOfEpisodes.Add("https://www.crunchyroll.com/watch/" + EpisodeSplit2(0) + "/" + EpisodeSplit4(0) + "/") ListOfEpisodes.Add("https://www.crunchyroll.com/watch/" + EpisodeSplit2(0) + "/" + EpisodeSplit4(0) + "/")
Next Next
Dim First As Integer = 0 Dim First As Integer = 0
@ -1083,7 +1125,7 @@ Public Class Main
Anime_Add.btn_dl.Text = "Download" 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default Anime_Add.btn_dl.Text = "Download" 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default
End Sub End Sub
Public Sub GetBetaSeasons(ByVal JsonUrl As String, ByVal SeasonJson As String) Public Sub GetBetaSeasons(ByVal JsonUrl As String) ', ByVal SeasonJson As String)
Anime_Add.groupBox2.Visible = True Anime_Add.groupBox2.Visible = True
Anime_Add.bt_Cancel_mass.Enabled = True Anime_Add.bt_Cancel_mass.Enabled = True
Anime_Add.bt_Cancel_mass.Visible = True Anime_Add.bt_Cancel_mass.Visible = True
@ -1097,7 +1139,7 @@ Public Class Main
Anime_Add.ComboBox1.Enabled = True Anime_Add.ComboBox1.Enabled = True
Anime_Add.comboBox3.Enabled = True Anime_Add.comboBox3.Enabled = True
Anime_Add.comboBox4.Enabled = True Anime_Add.comboBox4.Enabled = True
'Dim SeasonJson As String = Nothing Dim SeasonJson As String = Nothing
'Try 'Try
' Using client As New WebClient() ' Using client As New WebClient()
' client.Encoding = System.Text.Encoding.UTF8 ' client.Encoding = System.Text.Encoding.UTF8
@ -1107,6 +1149,7 @@ Public Class Main
'Catch ex As Exception 'Catch ex As Exception
' Debug.WriteLine("error- getting SeasonJson data") ' Debug.WriteLine("error- getting SeasonJson data")
'End Try 'End Try
SeasonJson = Curl(JsonUrl)
SeasonJson = CleanJSON(SeasonJson) SeasonJson = CleanJSON(SeasonJson)
Dim ParameterSplit() As String = JsonUrl.Split(New String() {"&locale="}, System.StringSplitOptions.RemoveEmptyEntries) Dim ParameterSplit() As String = JsonUrl.Split(New String() {"&locale="}, System.StringSplitOptions.RemoveEmptyEntries)
CrBetaMassParameters = ParameterSplit(1) CrBetaMassParameters = ParameterSplit(1)
@ -1120,20 +1163,20 @@ Public Class Main
Next Next
End Sub End Sub
Public Sub GetBetaVideoProxy(ByVal requesturl As String, ByVal WebsiteURL As String, ByVal ObjectJson As String, ByVal VideoJson As String) Public Sub GetBetaVideoProxy(ByVal requesturl As String, ByVal WebsiteURL As String) ', ByVal ObjectJson As String, ByVal VideoJson As String)
Dim Evaluator = New Thread(Sub() Me.GetBetaVideo(requesturl, WebsiteURL, ObjectJson, VideoJson)) Dim Evaluator = New Thread(Sub() Me.GetBetaVideo(requesturl, WebsiteURL)) ', ObjectJson, VideoJson))
Evaluator.Start() Evaluator.Start()
End Sub End Sub
Public Sub GetBetaVideo(ByVal Streams As String, ByVal WebsiteURL As String, ByVal ObjectJson As String, ByVal VideoJson As String) ' Public Sub GetBetaVideo(ByVal Streams As String, ByVal WebsiteURL As String) ', ByVal ObjectJson As String, ByVal VideoJson As String) '
'Debug.WriteLine(Streams) Debug.WriteLine(Streams)
' Debug.WriteLine(vbCrLf) Debug.WriteLine(vbCrLf)
' Debug.WriteLine("Website: " + WebsiteURL) Debug.WriteLine("Website: " + WebsiteURL)
CrBetaStreams = Nothing 'CrBetaStreams = Nothing
CrBetaObjects = Nothing 'CrBetaObjects = Nothing
CrBetaStreamsUrl = Nothing 'CrBetaStreamsUrl = Nothing
LoadedUrl = Nothing 'LoadedUrl = Nothing
'My.Computer.FileSystem.WriteAllText("D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\bin\x64\Debug\WebInterface\debugObjects.txt", ObjectJson, False) 'My.Computer.FileSystem.WriteAllText("D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\bin\x64\Debug\WebInterface\debugObjects.txt", ObjectJson, False)
@ -1163,7 +1206,7 @@ Public Class Main
Dim Pfad2 As String Dim Pfad2 As String
Dim TextBox2_Text As String = Nothing Dim TextBox2_Text As String = Nothing
Dim CR_FilenName As String = Nothing Dim CR_FilenName As String = Nothing
'Dim ObjectJson As String = Nothing Dim ObjectJson As String = Nothing
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
TextBox2_Text = Anime_Add.TextBox2.Text TextBox2_Text = Anime_Add.TextBox2.Text
Return Nothing Return Nothing
@ -1177,7 +1220,10 @@ Public Class Main
Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1) Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1)
'Debug.WriteLine(ObjectsURL) Debug.WriteLine(ObjectsURL)
ObjectJson = Curl(ObjectsURL)
'Try 'Try
' Using client As New WebClient() ' Using client As New WebClient()
' client.Encoding = System.Text.Encoding.UTF8 ' client.Encoding = System.Text.Encoding.UTF8
@ -1378,16 +1424,22 @@ Public Class Main
Dim ChaptersUrl As String = "https://static.crunchyroll.com/datalab-intro-v2/" + ObjectsURLBuilder4(0) + ".json" Dim ChaptersUrl As String = "https://static.crunchyroll.com/datalab-intro-v2/" + ObjectsURLBuilder4(0) + ".json"
Dim ChaptersJson As String = Nothing Dim ChaptersJson As String = Nothing
Try 'Try
Using client As New WebClient() ' Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8 ' client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) ' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
ChaptersJson = client.DownloadString(ChaptersUrl) ' ChaptersJson = client.DownloadString(ChaptersUrl)
End Using ' End Using
Catch ex As Exception 'Catch ex As Exception
Debug.WriteLine("no Chapter data... ignoring") ' Debug.WriteLine("no Chapter data... ignoring")
'End Try
'ChaptersJson = Curl(ChaptersUrl)
'Debug.WriteLine("ChaptersJson: " + ChaptersJson)
'Debug.WriteLine("ChaptersUrl: " + ChaptersUrl)
End Try
'MsgBox(ChaptersJson) 'MsgBox(ChaptersJson)
Dim Mdata_File As String = Application.StartupPath + "\" + ObjectsURLBuilder4(0) + "-mdata.txt" Dim Mdata_File As String = Application.StartupPath + "\" + ObjectsURLBuilder4(0) + "-mdata.txt"
If ChaptersJson IsNot Nothing Then If ChaptersJson IsNot Nothing Then
@ -1449,7 +1501,12 @@ Public Class Main
#End Region #End Region
#Region "VideoJson" #Region "VideoJson"
'Dim VideoJson As String = Nothing Dim VideoJson As String = Nothing
VideoJson = Curl(Streams)
Debug.WriteLine("VideoJson: " + VideoJson)
Debug.WriteLine("VideoStreams: " + Streams)
'Try 'Try
' Using client As New WebClient() ' Using client As New WebClient()
' client.Encoding = System.Text.Encoding.UTF8 ' client.Encoding = System.Text.Encoding.UTF8
@ -1460,23 +1517,7 @@ Public Class Main
' Debug.WriteLine("error- getting stream data") ' Debug.WriteLine("error- getting stream data")
' Exit Sub ' Exit Sub
'End Try 'End Try
'Dim hls_type As String = Nothing
'If CBool(InStr(VideoJson, Chr(34) + "adaptive_hls")) = True Then
' hls_type = "adaptive_hls"
'ElseIf CBool(InStr(VideoJson, Chr(34) + "multitrack_adaptive_hls_v2")) = True Then
' hls_type = "multitrack_adaptive_hls_v2"
'ElseIf CBool(InStr(VideoJson, Chr(34) + "vo_adaptive_hls")) = True Then
' hls_type = "vo_adaptive_hls"
'Else
' MsgBox("No download stream avalible", MsgBoxStyle.Critical)
' Exit Sub
'End If
'Me.Invoke(New Action(Function() As Object
' My.Computer.Clipboard.SetText(VideoJson)
' Return Nothing
' End Function))
'MsgBox(SubSprache)
Dim LangNew As String = ConvertCC(SubSprache) Dim LangNew As String = ConvertCC(SubSprache)
#End Region #End Region
#Region "Download softsub file or build ffmpeg cmd" #Region "Download softsub file or build ffmpeg cmd"
@ -1561,6 +1602,7 @@ Public Class Main
VideoJson = CleanJSON(VideoJson) VideoJson = CleanJSON(VideoJson)
Dim VideoJObject As JObject = JObject.Parse(VideoJson) Dim VideoJObject As JObject = JObject.Parse(VideoJson)
Dim VideoData As List(Of JToken) = VideoJObject.Children().ToList Dim VideoData As List(Of JToken) = VideoJObject.Children().ToList
For Each item As JProperty In VideoData For Each item As JProperty In VideoData
@ -1897,7 +1939,7 @@ Public Class Main
TextBox2_Text = Anime_Add.TextBox2.Text TextBox2_Text = Anime_Add.TextBox2.Text
Return Nothing Return Nothing
End Function)) End Function))
#Region "Name von Crunchyroll" #Region "Name von VRV"
Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -3937,63 +3979,71 @@ Public Class Main
Dim localHTML As String = document Dim localHTML As String = document
Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString) Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString)
Debug.WriteLine(Address) Debug.WriteLine(Address)
If CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "streams?")) Then 'If CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "streams?")) Then
Debug.WriteLine("Streams") ' Debug.WriteLine("Streams")
CrBetaStreamsUrl = Address ' My.Computer.FileSystem.WriteAllText("D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\bin\x64\Debug\WebInterface\CrBetaStreams.txt", CrBetaStreams, False)
CrBetaStreams = localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "")
Dim ObjectsURLBuilder() As String = Address.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries) ' CrBetaStreamsUrl = Address
Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries) ' CrBetaStreams = localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "")
Dim ObjectsURLBuilder3() As String = LoadedUrl.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1)
Debug.WriteLine(ObjectsURL)
CefSharp_Browser.WebBrowser1.LoadUrl(ObjectsURL)
ElseIf CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "objects")) Then ' Dim ObjectsURLBuilder() As String = Address.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
CrBetaObjects = localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "") ' Dim ObjectsURLBuilder3() As String = LoadedUrl.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
GetBetaVideoProxy(CrBetaStreamsUrl, LoadedUrl, CrBetaObjects, CrBetaStreams) ' Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1)
' Debug.WriteLine(ObjectsURL)
ElseIf CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "seasons?series_id=")) Then
GetBetaSeasons(Address, localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, ""))
ElseIf CBool(InStr(Address, CrBetaMassBaseURL + "episodes?season_id=")) Then
Dim EpisodeJson As String = localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "")
' CefSharp_Browser.WebBrowser1.LoadUrl(ObjectsURL)
'ElseIf CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "objects")) Then
' CrBetaObjects = localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "")
' GetBetaVideoProxy(CrBetaStreamsUrl, LoadedUrl, CrBetaObjects, CrBetaStreams)
'Else
'If CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "seasons?series_id=")) Then
' GetBetaSeasons(Address, localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, ""))
'Else
'If CBool(InStr(Address, CrBetaMassBaseURL + "episodes?season_id=")) Then
CrBetaMassEpisodes = EpisodeJson ' Dim EpisodeJson As String = localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace(My.Resources.htmlReplace, "")
Dim EpisodeNameSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) ' CrBetaMassEpisodes = EpisodeJson
For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeNameSplit2() As String = EpisodeNameSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
If EpisodeSplit(i).Substring(0, 1) = Chr(34) Then
Anime_Add.comboBox3.Items.Add(EpisodeNameSplit2(0))
Anime_Add.comboBox4.Items.Add(EpisodeNameSplit2(0))
Else
Anime_Add.comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
Anime_Add.comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
End If
Next ' Dim EpisodeNameSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
If Anime_Add.comboBox3.Items.Count > 0 Then
Anime_Add.comboBox3.SelectedIndex = 0
Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox4.Items.Count - 1
End If
Anime_Add.comboBox3.Enabled = True ' Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Anime_Add.comboBox4.Enabled = True ' For i As Integer = 1 To EpisodeSplit.Count - 1
' Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim EpisodeNameSplit2() As String = EpisodeNameSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
' If EpisodeSplit(i).Substring(0, 1) = Chr(34) Then
' Anime_Add.comboBox3.Items.Add(EpisodeNameSplit2(0))
' Anime_Add.comboBox4.Items.Add(EpisodeNameSplit2(0))
' Else
' Anime_Add.comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
' Anime_Add.comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
' End If
ElseIf CBool(InStr(Address, "title-api.prd.funimationsvc.com")) Then ' Next
' If Anime_Add.comboBox3.Items.Count > 0 Then
' Anime_Add.comboBox3.SelectedIndex = 0
' Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox4.Items.Count - 1
' End If
' Anime_Add.comboBox3.Enabled = True
' Anime_Add.comboBox4.Enabled = True
' Else
If CBool(InStr(Address, "title-api.prd.funimationsvc.com")) Then
If FunimationJsonBrowser = "EpisodeJson" Then If FunimationJsonBrowser = "EpisodeJson" Then
Anime_Add.FillFunimationEpisodes(localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace("<html><head></head><pre style=" + Chr(34) + "word-wrap: break-word; white-space: pre-wrap;" + Chr(34) + ">", "")) ' Anime_Add.FillFunimationEpisodes(localHTML.Replace("<body>", "").Replace("</body>", "").Replace("<pre>", "").Replace("</pre>", "").Replace("</html>", "").Replace("<html><head></head><pre style=" + Chr(34) + "word-wrap: break-word; white-space: pre-wrap;" + Chr(34) + ">", "")) '
FunimationJsonBrowser = Nothing FunimationJsonBrowser = Nothing
@ -4135,10 +4185,10 @@ Public Class Main
Dim requesturl As String = LoadedUrls.Item(i) Dim requesturl As String = LoadedUrls.Item(i)
If CBool(InStr(requesturl, "crunchyroll.com/")) And CBool(InStr(requesturl, "streams?")) Then If CBool(InStr(requesturl, "crunchyroll.com/")) And CBool(InStr(requesturl, "streams?")) Then
If b = False Then If b = False Then
'GetBetaVideoProxy(requesturl, WebbrowserURL) GetBetaVideoProxy(requesturl, WebbrowserURL)
b = True b = True
CefSharp_Browser.WebBrowser1.LoadUrl(requesturl) 'CefSharp_Browser.WebBrowser1.LoadUrl(requesturl)
LoadedUrls.Clear() LoadedUrls.Clear()
@ -4147,8 +4197,8 @@ Public Class Main
End If End If
ElseIf CBool(InStr(requesturl, "crunchyroll.com/")) And CBool(InStr(requesturl, "seasons?series_id=")) Then ElseIf CBool(InStr(requesturl, "crunchyroll.com/")) And CBool(InStr(requesturl, "seasons?series_id=")) Then
If b = False Then If b = False Then
'GetBetaSeasons(requesturl) GetBetaSeasons(requesturl)
CefSharp_Browser.WebBrowser1.LoadUrl(requesturl) 'CefSharp_Browser.WebBrowser1.LoadUrl(requesturl)
b = True b = True
LoadedUrls.Clear() LoadedUrls.Clear()
Me.Text = "Crunchyroll Downloader" Me.Text = "Crunchyroll Downloader"
@ -4831,7 +4881,10 @@ Public Class Main
End Sub End Sub
Private Sub CRCookieToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CRCookieToolStripMenuItem.Click Private Sub CRCookieToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CRCookieToolStripMenuItem.Click
MsgBox(CR_Cookies)
MsgBox(Curl(InputBox("test", "test")))
'MsgBox(CR_Cookies)
End Sub End Sub

View File

@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.8.9.3")> <Assembly: AssemblyVersion("3.9.1")>
<Assembly: AssemblyFileVersion("3.8.9.3")> <Assembly: AssemblyFileVersion("3.9.1")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@ -379,7 +379,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die &quot;User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0&quot; ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die &quot;User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0&quot; ähnelt.
'''</summary> '''</summary>
Friend ReadOnly Property ffmpeg_user_agend() As String Friend ReadOnly Property ffmpeg_user_agend() As String
Get Get

View File

@ -392,7 +392,7 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem
<value>..\Resources\crdSettings_Button_SafeExit_hover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\crdSettings_Button_SafeExit_hover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="ffmpeg_user_agend" xml:space="preserve"> <data name="ffmpeg_user_agend" xml:space="preserve">
<value>"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"</value> <value>"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0"</value>
</data> </data>
<data name="crdSettings_Button_SafeExit" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="crdSettings_Button_SafeExit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\crdSettings_Button_SafeExit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\crdSettings_Button_SafeExit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>