mirror of
https://github.com/hama3254/Crunchyroll-Downloader-v3.0.git
synced 2025-01-11 15:59:16 +01:00
removed vrv support; added direct api access CR
removed vrv support added direct api access CR
This commit is contained in:
parent
18551f5d48
commit
2928d06ae6
Binary file not shown.
2
Crunchyroll Downloader/Anime_Add.Designer.vb
generated
2
Crunchyroll Downloader/Anime_Add.Designer.vb
generated
@ -392,9 +392,9 @@ Partial Class Anime_Add
|
||||
Me.Controls.Add(Me.btn_dl)
|
||||
Me.Controls.Add(Me.Btn_min)
|
||||
Me.Controls.Add(Me.Btn_Close)
|
||||
Me.Controls.Add(Me.groupBox2)
|
||||
Me.Controls.Add(Me.groupBox1)
|
||||
Me.Controls.Add(Me.GroupBox3)
|
||||
Me.Controls.Add(Me.groupBox2)
|
||||
Me.Font = New System.Drawing.Font("Arial", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Name = "Anime_Add"
|
||||
Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20)
|
||||
|
@ -127,7 +127,7 @@
|
||||
<data name="Btn_min.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABoAAAAhCAYAAADH97ugAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAAAd0SU1FB+QMDQ03N1b5UIAAAAApSURBVEhL7cyxCQAwDASx339pZ4EUcTC4keDa
|
||||
wAAADsABataJCQAAAAd0SU1FB+QMDQ03N1b5UIAAAAApSURBVEhL7cyxCQAwDASx339pZ4EUcTC4keDa
|
||||
CwDMqs/abpOXAGBZcgDKSBvlblfsRgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
|
@ -9,6 +9,7 @@ Imports MetroFramework
|
||||
Imports MetroFramework.Components
|
||||
Imports CefSharp
|
||||
Imports System.Text
|
||||
Imports System.Runtime.InteropServices.ComTypes
|
||||
|
||||
Public Class Anime_Add
|
||||
Public Mass_DL_Cancel As Boolean = False
|
||||
@ -26,154 +27,168 @@ Public Class Anime_Add
|
||||
|
||||
'Main.LoadedUrl = Url
|
||||
|
||||
' 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
|
||||
'#Region "Get Cookies"
|
||||
' Dim Cookies As String = Main.CR_Cookies '"Cookie: "
|
||||
' 'Try
|
||||
' ' Dim Collector As New TaskCookieVisitor
|
||||
' ' Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager
|
||||
' ' CM.VisitAllCookies(Collector)
|
||||
' ' Dim DeviceRegion As String = Nothing
|
||||
' ' Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result()
|
||||
' ' For i As Integer = 0 To list.Count - 1
|
||||
' ' 'MsgBox(list.Item(i).Name + ":" + vbNewLine + list.Item(i).Value)
|
||||
' ' If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "_evidon_suppress")) = False Then
|
||||
' ' Cookies = Cookies + list.Item(i).Name + "=" + list.Item(i).Value + ";"
|
||||
' ' End If
|
||||
' ' If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "c_locale")) Then
|
||||
' ' locale = list.Item(i).Value
|
||||
Dim locale As String = "en-US"
|
||||
If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True And CBool(Main.CrBetaBasic = Nothing) = False Then
|
||||
#Region "Get Cookies"
|
||||
Dim Cookies As String = Main.CR_Cookies '"Cookie: "
|
||||
Try
|
||||
Dim Collector As New TaskCookieVisitor
|
||||
Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager
|
||||
CM.VisitAllCookies(Collector)
|
||||
Dim DeviceRegion As String = Nothing
|
||||
Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result()
|
||||
For i As Integer = 0 To list.Count - 1
|
||||
|
||||
' ' End If
|
||||
' ' Next
|
||||
' 'Catch ex As Exception
|
||||
' ' CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
' ' Exit Sub
|
||||
' 'End Try
|
||||
If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "_evidon_suppress")) = False Then
|
||||
Cookies = Cookies + list.Item(i).Name + "=" + list.Item(i).Value + ";"
|
||||
End If
|
||||
If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "c_locale")) Then
|
||||
locale = list.Item(i).Value
|
||||
|
||||
'#End Region
|
||||
' Dim CRBetaBearer As String = "Bearer "
|
||||
' Try
|
||||
End If
|
||||
If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "etp_rt")) Then
|
||||
'MsgBox(list.Item(i).Domain + ":" + list.Item(i).Name + ":" + vbNewLine + list.Item(i).Value)
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
' Dim Request As HttpWebRequest = CType(WebRequest.Create("https://www.crunchyroll.com/auth/v1/token"), HttpWebRequest)
|
||||
' Request.Method = "POST"
|
||||
' Request.ContentType = "application/x-www-form-urlencoded"
|
||||
' Request.Accept = "application/json, text/plain, */*"
|
||||
' 'Request.Headers.Add("Accept-Language: de,en-US;q=0.7,en;q=0.3")
|
||||
' Request.Headers.Add("Accept-Encoding: gzip, deflate, br") 'identity")
|
||||
' Request.Headers.Add("Authorization: " + Main.CrBetaBasic)
|
||||
' 'Request.Headers.Add("Referer: " + Url)
|
||||
' Request.Referer = Url
|
||||
' Request.Headers.Add("Origin: https://www.crunchyroll.com")
|
||||
' Request.Headers.Add(Cookies)
|
||||
' Dim Post As String = "grant_type=etp_rt_cookie"
|
||||
' Dim byteArray() As Byte = Encoding.UTF8.GetBytes(Post)
|
||||
' Request.ContentLength = byteArray.Length
|
||||
' Dim DataStream As Stream = Request.GetRequestStream()
|
||||
' DataStream.Write(byteArray, 0, byteArray.Length)
|
||||
' DataStream.Close()
|
||||
' Dim Response As HttpWebResponse = CType(Request.GetResponse(), HttpWebResponse)
|
||||
' DataStream = Response.GetResponseStream()
|
||||
' Dim reader As New StreamReader(DataStream)
|
||||
' Dim ServerResponseString As String = reader.ReadToEnd()
|
||||
' reader.Close()
|
||||
' DataStream.Close()
|
||||
' Response.Close()
|
||||
' 'Debug.WriteLine(ServerResponseString)
|
||||
' Dim Token() As String = ServerResponseString.Split(New String() {Chr(34) + "access_token" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim Token2() As String = Token(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' CRBetaBearer = CRBetaBearer + Token2(0)
|
||||
' Catch ex As Exception
|
||||
' Debug.WriteLine(ex.ToString)
|
||||
' CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
' Exit Sub
|
||||
' End Try
|
||||
'MsgBox(Cookies)
|
||||
Cookies = " -H " + Chr(34) + Cookies + Chr(34)
|
||||
|
||||
' Dim ObjectsUrl As String = Nothing
|
||||
#End Region
|
||||
Dim Auth As String = " -H " + Chr(34) + "Authorization: " + Main.CrBetaBasic + Chr(34)
|
||||
Dim Post As String = " -d " + Chr(34) + "grant_type=etp_rt_cookie" + Chr(34) + " -X POST"
|
||||
|
||||
' 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("ACCEPT: application/json, text/javascript, */*; q=0.01")
|
||||
' client.Headers.Add("Accept-Encoding: identity")
|
||||
' client.Headers.Add("Referer: " + Url)
|
||||
' client.Headers.Add("Authorization: " + CRBetaBearer)
|
||||
' client.Headers.Add(Cookies) '+ WebBrowser1.Document.Cookie)
|
||||
' 'MsgBox(OmUStreamSplitEpisodeIndex(1))
|
||||
' Dim v2Content As String = client.DownloadString("https://www.crunchyroll.com/index/v2")
|
||||
' 'Debug.WriteLine(v2Content)
|
||||
Dim CRBetaBearer As String = "Bearer "
|
||||
|
||||
' Dim v2ContentBeta() As String = v2Content.Split(New String() {Chr(34) + "cms_beta" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim v1Token As String = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Cookies, Auth, Post)
|
||||
|
||||
If CBool(InStr(v1Token, "curl:")) = True Then
|
||||
v1Token = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Cookies, Auth, Post)
|
||||
End If
|
||||
|
||||
If CBool(InStr(v1Token, "curl:")) = True Then
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'MsgBox(v1Token)
|
||||
|
||||
Dim Token() As String = v1Token.Split(New String() {Chr(34) + "access_token" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Token2() As String = Token(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
CRBetaBearer = CRBetaBearer + Token2(0)
|
||||
|
||||
Dim ObjectsUrl As String = Nothing
|
||||
|
||||
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("ACCEPT: application/json, text/javascript, */*; q=0.01")
|
||||
' client.Headers.Add("Accept-Encoding: identity")
|
||||
' client.Headers.Add("Referer: " + Url)
|
||||
' client.Headers.Add("Authorization: " + CRBetaBearer)
|
||||
' client.Headers.Add(Cookies) '+ WebBrowser1.Document.Cookie)
|
||||
'MsgBox(OmUStreamSplitEpisodeIndex(1))
|
||||
Dim Auth2 As String = " -H " + Chr(34) + "Authorization: " + CRBetaBearer + Chr(34)
|
||||
Dim v2Content As String = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Cookies, Auth2) 'client.DownloadString("https://www.crunchyroll.com/index/v2")
|
||||
'Debug.WriteLine(v2Content)
|
||||
'MsgBox("v2: " + v2Content)
|
||||
|
||||
If CBool(InStr(v2Content, "curl:")) = True Then
|
||||
v2Content = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Cookies, Auth2)
|
||||
End If
|
||||
|
||||
If CBool(InStr(v2Content, "curl:")) = True Then
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
' Dim bucket() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "bucket" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim bucket2() As String = bucket(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' Dim policy() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "policy" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim policy2() As String = policy(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' Dim signature() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "signature" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim signature2() As String = signature(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' Dim key_pair_id() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "key_pair_id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim key_pair_id2() As String = key_pair_id(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' Dim ObjectsURLBuilder3() As String = Url.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim v2ContentBeta() As String = v2Content.Split(New String() {Chr(34) + "cms_web" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
|
||||
' ObjectsUrl = "https://www.crunchyroll.com/cms/v2" + bucket2(0) + "/objects/" + ObjectsURLBuilder4(0) + "?locale=" + locale + "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
|
||||
' End Using
|
||||
Dim bucket() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "bucket" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim bucket2() As String = bucket(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim policy() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "policy" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim policy2() As String = policy(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim signature() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "signature" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim signature2() As String = signature(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim key_pair_id() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "key_pair_id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim key_pair_id2() As String = key_pair_id(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim ObjectsURLBuilder3() As String = Url.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
|
||||
' 'Debug.WriteLine(ObjectsUrl)
|
||||
|
||||
' Catch ex As Exception
|
||||
' CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
' Exit Sub
|
||||
' End Try
|
||||
|
||||
' Dim StreamsUrl As String = Nothing
|
||||
' Dim ObjectJson As String
|
||||
' Try
|
||||
' Try
|
||||
' Using client As New WebClient()
|
||||
' client.Encoding = System.Text.Encoding.UTF8
|
||||
' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
|
||||
' ObjectJson = client.DownloadString(ObjectsUrl)
|
||||
' End Using
|
||||
' Catch ex As Exception
|
||||
' Debug.WriteLine("error- getting name data")
|
||||
' Exit Sub
|
||||
' End Try
|
||||
|
||||
' Catch ex As Exception
|
||||
' CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
' Exit Sub
|
||||
' End Try
|
||||
|
||||
' Try
|
||||
' Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' Dim StreamsUrlBuilder3() As String = ObjectsUrl.Split(New String() {"objects/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim StreamsUrlBuilder4() As String = StreamsUrlBuilder3(1).Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
' StreamsUrl = StreamsUrlBuilder3(0) + "videos/" + StreamsUrlBuilder2(0) + "/streams?" + StreamsUrlBuilder4(1)
|
||||
|
||||
' ' Debug.WriteLine(StreamsUrl)
|
||||
' Catch ex As Exception
|
||||
' CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
' Exit Sub
|
||||
' End Try
|
||||
|
||||
' Main.GetBetaVideoProxy(StreamsUrl, Url)
|
||||
ObjectsUrl = "https://www.crunchyroll.com/cms/v2" + bucket2(0) + "/objects/" + ObjectsURLBuilder4(0) + "?locale=" + locale + "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
|
||||
'End Using
|
||||
|
||||
|
||||
' Else
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
'End If
|
||||
'Debug.WriteLine(ObjectsUrl)
|
||||
|
||||
Catch ex As Exception
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
Dim StreamsUrl As String = Nothing
|
||||
Dim ObjectJson As String
|
||||
Try
|
||||
ObjectJson = Main.Curl(ObjectsUrl)
|
||||
|
||||
If CBool(InStr(ObjectJson, "curl:")) = True Then
|
||||
ObjectJson = Main.Curl(ObjectsUrl)
|
||||
End If
|
||||
|
||||
If CBool(InStr(ObjectJson, "curl:")) = True Then
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Try
|
||||
' Using client As New WebClient()
|
||||
' client.Encoding = System.Text.Encoding.UTF8
|
||||
' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
|
||||
' ObjectJson = client.DownloadString(ObjectsUrl)
|
||||
' End Using
|
||||
'Catch ex As Exception
|
||||
' Debug.WriteLine("error- getting name data")
|
||||
' Exit Sub
|
||||
'End Try
|
||||
|
||||
Catch ex As Exception
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
Try
|
||||
Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim StreamsUrlBuilder3() As String = ObjectsUrl.Split(New String() {"objects/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim StreamsUrlBuilder4() As String = StreamsUrlBuilder3(1).Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
StreamsUrl = StreamsUrlBuilder3(0) + "videos/" + StreamsUrlBuilder2(0) + "/streams?" + StreamsUrlBuilder4(1)
|
||||
|
||||
' Debug.WriteLine(StreamsUrl)
|
||||
Catch ex As Exception
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
Main.GetBetaVideoProxy(StreamsUrl, Url)
|
||||
|
||||
|
||||
Else
|
||||
CefSharp_Browser.WebBrowser1.Load(Url)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
@ -347,7 +362,7 @@ Public Class Anime_Add
|
||||
If groupBox1.Visible = True Then
|
||||
' Main.LoadedUrls.Clear()
|
||||
Try
|
||||
If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Or CBool(InStr(textBox1.Text, "vrv.co/series/")) Or CBool(InStr(textBox1.Text, "vrv.co/watch/")) Then
|
||||
If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then
|
||||
|
||||
|
||||
'If StatusLabel.Text = "Status: waiting for episode selection" Then
|
||||
@ -410,17 +425,6 @@ Public Class Anime_Add
|
||||
|
||||
ElseIf CBool(InStr(textBox1.Text, "Test=true")) Then
|
||||
LoadBrowser(textBox1.Text)
|
||||
'Else 'If CBool(InStr(textBox1.Text, "vrv.co")) Then
|
||||
ElseIf CBool(InStr(textBox1.Text, "https://")) Then
|
||||
If MessageBox.Show("This in NOT a Crunchyroll URL, try anyway?", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
|
||||
Main.b = False
|
||||
LoadBrowser(textBox1.Text)
|
||||
StatusLabel.Text = "Status: looking for non CR video file"
|
||||
|
||||
Else
|
||||
Exit Sub
|
||||
btn_dl.Enabled = True
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgBox(Main.URL_Invaild, MsgBoxStyle.OkOnly)
|
||||
@ -470,19 +474,7 @@ Public Class Anime_Add
|
||||
comboBox4.Enabled = False
|
||||
comboBox3.Enabled = False
|
||||
ComboBox1.Enabled = False
|
||||
ElseIf CBool(InStr(Main.WebbrowserURL, "vrv.co")) = True Then
|
||||
|
||||
StatusLabel.Text = "Status: idle"
|
||||
'btn_dl.BackgroundImage = My.Resources.add_mass_running_cancel
|
||||
btn_dl.Text = "Cancel"
|
||||
Mass_DL_Cancel = True
|
||||
bt_Cancel_mass.Enabled = False
|
||||
bt_Cancel_mass.Visible = False
|
||||
|
||||
Main.Download_VRV_Seasons()
|
||||
comboBox4.Enabled = False
|
||||
comboBox3.Enabled = False
|
||||
ComboBox1.Enabled = False
|
||||
|
||||
End If
|
||||
|
||||
@ -658,57 +650,7 @@ Public Class Anime_Add
|
||||
|
||||
|
||||
|
||||
ElseIf CBool(InStr(Main.WebbrowserURL, "vrv.co")) = True Then
|
||||
comboBox3.Items.Clear()
|
||||
comboBox4.Items.Clear()
|
||||
comboBox3.Enabled = True
|
||||
comboBox4.Enabled = True
|
||||
comboBox3.Text = Nothing
|
||||
comboBox4.Text = Nothing
|
||||
Dim SeasonSplit() As String = Main.VRVMass.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim SeasonSplit2() As String = SeasonSplit(ComboBox1.SelectedIndex + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Dim EpisodeJsonURL As String = Main.VRVMassBaseURL + "episodes?season_id=" + SeasonSplit2(0) + "&Policy=" + Main.VRVMassParameters
|
||||
Dim EpisodeJson As String = Nothing
|
||||
Debug.WriteLine(EpisodeJsonURL)
|
||||
|
||||
Try
|
||||
Using client As New WebClient()
|
||||
client.Encoding = System.Text.Encoding.UTF8
|
||||
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
|
||||
EpisodeJson = client.DownloadString(EpisodeJsonURL)
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine("error- getting EpisodeJson data")
|
||||
Debug.WriteLine(ex.ToString)
|
||||
Exit Sub
|
||||
End Try
|
||||
Main.VRVMassEpisodes = 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
|
||||
|
||||
ElseIf Main.WebbrowserURL = "https://funimation.com/js" Then
|
||||
comboBox3.Items.Clear()
|
||||
|
@ -389,24 +389,6 @@ Public Class CefSharp_Browser
|
||||
Exit Sub
|
||||
End If
|
||||
Debug.WriteLine(e.Request.Url)
|
||||
ElseIf CBool(InStr(e.Request.Url, "https://api.vrv.co")) And CBool(InStr(e.Request.Url, "streams?")) Then
|
||||
If (Me.InvokeRequired) Then
|
||||
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Url))
|
||||
Exit Sub
|
||||
Else
|
||||
Main.LoadedUrls.Add(e.Request.Url)
|
||||
Exit Sub
|
||||
End If
|
||||
Debug.WriteLine(e.Request.Url)
|
||||
ElseIf CBool(InStr(e.Request.Url, "https://api.vrv.co")) And CBool(InStr(e.Request.Url, "seasons?series_id=")) Then
|
||||
If (Me.InvokeRequired) Then
|
||||
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Url))
|
||||
Exit Sub
|
||||
Else
|
||||
Main.LoadedUrls.Add(e.Request.Url)
|
||||
Exit Sub
|
||||
End If
|
||||
Debug.WriteLine(e.Request.Url)
|
||||
|
||||
End If
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.9.1")>
|
||||
<Assembly: AssemblyFileVersion("3.9.1")>
|
||||
<Assembly: AssemblyVersion("3.9.2")>
|
||||
<Assembly: AssemblyFileVersion("3.9.2")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
Loading…
x
Reference in New Issue
Block a user