fix Crunchyroll us unlock
fix AoD issues in edge cases
This commit is contained in:
hama3254 2021-05-01 13:56:48 +02:00
parent a4efe9fea0
commit 1b00b91dca
20 changed files with 156 additions and 33 deletions

Binary file not shown.

View File

@ -388,6 +388,8 @@ Public Class Anime_Add
End If
'My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\test.log", Main.WebbrowserText, False)
If CBool(InStr(Main.WebbrowserText, "/OmU/1080/hlsfirst/")) Then
Dim OmUStreamSplit() As String = Main.WebbrowserText.Split(New String() {"/OmU/1080/hlsfirst/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim OmUStreamSplitToken() As String = OmUStreamSplit(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
@ -396,6 +398,8 @@ Public Class Anime_Add
Dim OmUStreamSplitEpisodeIndex2() As String = OmUStreamSplitEpisodeIndex(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim m3u8Strings As String = Nothing
Dim VideoStreamUrls As String = "https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0)
VideoStreamUrls = VideoStreamUrls.Replace("/single", "")
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
@ -404,12 +408,13 @@ Public Class Anime_Add
client.Headers.Add("Accept-Encoding: gzip, deflate, br")
client.Headers.Add("X-Requested-With: XMLHttpRequest")
client.Headers.Add(AoD_Cookie) '+ WebBrowser1.Document.Cookie)
'MsgBox(OmUStreamSplitEpisodeIndex(1))
m3u8Strings = client.DownloadString("https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0))
'MsgBox("https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0))
m3u8Strings = client.DownloadString(VideoStreamUrls)
'("Sub: " + m3u8Strings)
End Using
Catch ex As Exception
MsgBox(ex.ToString + vbNewLine + "https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0))
MsgBox(ex.ToString + vbNewLine + VideoStreamUrls)
End Try
If m3u8Strings = Nothing Then
Else
@ -423,12 +428,14 @@ Public Class Anime_Add
End If
If CBool(InStr(Main.WebbrowserText, "/Dub/1080/hlsfirst/")) Then
Dim DubStreamSplit() As String = Main.WebbrowserText.Split(New String() {"/Dub/1080/hlsfirst/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DubStreamSplitToken() As String = DubStreamSplit(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DubStreamSplitEpisodeIndex() As String = DubStreamSplit(0).Split(New String() {"/videomaterialurl/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DubStreamSplitEpisodeIndex2() As String = DubStreamSplitEpisodeIndex(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DubStreamSplitEpisodeIndex2() As String = DubStreamSplitEpisodeIndex(DubStreamSplitEpisodeIndex.Count - 1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim m3u8Strings As String = Nothing
Dim VideoStreamUrls As String = "https://www.anime-on-demand.de/videomaterialurl/" + DubStreamSplitEpisodeIndex2(0) + "/Dub/1080/hlsfirst/" + DubStreamSplitToken(0)
VideoStreamUrls = VideoStreamUrls.Replace("/single", "")
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
@ -438,11 +445,11 @@ Public Class Anime_Add
client.Headers.Add("X-Requested-With: XMLHttpRequest")
client.Headers.Add(AoD_Cookie) '+ WebBrowser1.Document.Cookie)
'MsgBox(DubStreamSplitEpisodeIndex(1))
m3u8Strings = client.DownloadString("https://www.anime-on-demand.de/videomaterialurl/" + DubStreamSplitEpisodeIndex2(0) + "/Dub/1080/hlsfirst/" + DubStreamSplitToken(0))
m3u8Strings = client.DownloadString(VideoStreamUrls)
'MsgBox("Dub: " + m3u8Strings)
End Using
Catch ex As Exception
MsgBox(ex.ToString + vbNewLine + "https://www.anime-on-demand.de/videomaterialurl/" + DubStreamSplitEpisodeIndex2(0) + "/Dub/1080/hlsfirst/" + DubStreamSplitToken(0))
MsgBox(ex.ToString + vbNewLine + VideoStreamUrls)
End Try
If m3u8Strings = Nothing Then
Else
@ -456,19 +463,24 @@ Public Class Anime_Add
End If
AoD_Mode = True
'MsgBox(AoD_DubList.Count)
'MsgBox(AoD_OmUList.Count)
If AoD_DubList.Count And AoD_OmUList.Count > 0 Then
ComboBox1.Items.Clear()
ComboBox1.Text = Nothing
GroupBox3.Visible = False
groupBox2.Visible = True
groupBox1.Visible = False
ComboBox1.Enabled = True
comboBox3.Enabled = True
comboBox4.Enabled = True
comboBox3.Enabled = False
comboBox4.Enabled = False
ComboBox1.Items.Add("Dub")
ComboBox1.Items.Add("OmU")
FillAoDDropDown()
ElseIf AoD_DubList.Count Or AoD_OmUList.Count > 0 Then
ComboBox1.Items.Clear()
ComboBox1.Text = Nothing
GroupBox3.Visible = False
groupBox2.Visible = True
groupBox1.Visible = False
@ -543,11 +555,11 @@ Public Class Anime_Add
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)
comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
Next
For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
Next
ElseIf AoD_Mode = False Then
@ -581,6 +593,29 @@ Public Class Anime_Add
Next
'comboBox3.SelectedIndex = 0
'comboBox4.SelectedIndex = 0
ElseIf AoD_Mode = True Then
comboBox3.Items.Clear()
comboBox4.Items.Clear()
comboBox3.Enabled = True
comboBox4.Enabled = True
If ComboBox1.Text = "OmU" Then
For i As Integer = 0 To AoD_OmUList.Count - 1
Dim DropDownTitle As String() = AoD_OmUList(i).Split(New String() {My.Resources.AoD_Titel}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DropDownTitle2 As String() = DropDownTitle(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
comboBox3.Items.Add(DropDownTitle2(0))
comboBox4.Items.Add(DropDownTitle2(0))
Next
ElseIf ComboBox1.Text = "Dub" Then
For i As Integer = 0 To AoD_DubList.Count - 1
Dim DropDownTitle As String() = AoD_DubList(i).Split(New String() {My.Resources.AoD_Titel}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DropDownTitle2 As String() = DropDownTitle(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
comboBox3.Items.Add(DropDownTitle2(0))
comboBox4.Items.Add(DropDownTitle2(0))
Next
End If
End If
End Sub
@ -707,7 +742,14 @@ Public Class Anime_Add
HTMLString = client.DownloadString(Main.WebbrowserURL)
End Try
Dim Funimation_iFrame As String = Nothing
If InStr(HTMLString, My.Resources.Funimation_Player_ID) Then
Funimation_iFrame = My.Resources.Funimation_Player_ID
ElseIf InStr(HTMLString, My.Resources.Funimation_Player_ID_2) Then
Funimation_iFrame = My.Resources.Funimation_Player_ID_2
End If
If InStr(HTMLString, Funimation_iFrame) Then
Dim WebbrowserHeadTextSplit() As String = HTMLString.Split(New String() {"<head"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim WebbrowserHeadTextSplit2() As String = WebbrowserHeadTextSplit(1).Split(New String() {"</head>"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -962,11 +1004,17 @@ Public Class Anime_Add
Dim AoDTitle2() As String = AoDTitle1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDTitle As String = AoDTitle2(0)
Dim AoDMediaID1() As String = ProcessList.Item(i).Split(New String() {My.Resources.AoD_MediaID}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDMediaID2() As String = AoDMediaID1(1).Split(New String() {"},"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDMediaID As String = AoDMediaID2(0)
Try
If InStr(AoDHTML, My.Resources.AoD_HTML_Episode_Title) Then ' Serie
Dim AoDTitle0() As String = AoDHTML.Split(New String() {My.Resources.AoD_HTML_Episode_Title}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDTitleDivByMediaID() As String = AoDHTML.Split(New String() {AoDMediaID}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDTitle0() As String = AoDTitleDivByMediaID(1).Split(New String() {My.Resources.AoD_HTML_Episode_Title}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDTitle00() As String = AoDTitle0(ii + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoD_EpisodeSplit() As String = AoDTitle00(0).Split(New String() {" - "}, System.StringSplitOptions.RemoveEmptyEntries)
If AoD_EpisodeSplit.Count > 2 Then
@ -1101,6 +1149,8 @@ Public Class Anime_Add
Dim AoDThumbnail1() As String = ProcessList.Item(i).Split(New String() {My.Resources.AoD_Image}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDThumbnail2() As String = AoDThumbnail1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoDThumbnail As String = AoDThumbnail2(0)
Dim AoDTm3u8() As String = ProcessList.Item(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim m3u8_Master_url As String = AoDTm3u8(0).Replace("&amp;", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&")
Dim m3u8_list As New List(Of String)

View File

@ -536,6 +536,7 @@ Public Class CRD_List_Item
#End Region
Private Function GetFullUri(ByVal MainUri As String, ByVal CurrentPath As String)
Dim path As String = Nothing
If InStr(CurrentPath, "https://") Then
path = CurrentPath
@ -554,6 +555,7 @@ Public Class CRD_List_Item
For i3 As Integer = 0 To c.Count - 2
path = path + c(i3)
Next
path = path + CurrentPath
End If
Return path
@ -852,6 +854,7 @@ Public Class CRD_List_Item
WC_TS.DownloadFile(New Uri(DL_URL), DL_Pfad)
Catch ex As Exception
Debug.WriteLine("Download error #1: " + DL_Pfad)
Try
Dim wc_ts As New WebClient
@ -1330,7 +1333,7 @@ Public Class CRD_List_Item
Try
Dim logfile As String = DownloadPfad.Replace(Main.VideoFormat, ".log").Replace(Chr(34), "")
'If File.Exists(logfile) Then
Using sw As StreamWriter = File.AppendText(logfile)
sw.Write(LogText.Item(0))
sw.Write(vbNewLine)
@ -1340,12 +1343,21 @@ Public Class CRD_List_Item
Next
End Using
'Else
'File.WriteAllText(logfile, Date.Now + " " + e.Data)
'End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
If HybridMode = True Then
Try
Dim logfile As String = DownloadPfad.Replace(Main.VideoFormat, ".log").Replace(Chr(34), "")
File.WriteAllText(logfile, HybrideLog)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End If
End Sub
Private Sub LogTocClipboard_Click(sender As Object, e As EventArgs) Handles LogTocClipboard.Click

View File

@ -58,13 +58,17 @@ Public Class GeckoFX
Catch ex As Exception
If Main.LoginOnly = "US_UnBlock_Finsihed" And Main.UserBowser = False Then
Main.UserBowser = False
Me.Close()
End If
'MsgBox(ex.ToString)
End Try
End If
ElseIf Main.LoginOnly = "US_UnBlock_Finsihed" And Main.UserBowser = False Then
Main.UserBowser = False
Me.Close()
Else
@ -167,7 +171,7 @@ Public Class GeckoFX
ElseIf CBool(InStr(WebBrowser1.Url.ToString, "funimation.com")) Then
If Main.b = False Then
If InStr(WebBrowser1.Document.Body.OuterHtml, My.Resources.Funimation_Player_ID) Then
If CBool(InStr(WebBrowser1.Document.Body.OuterHtml, My.Resources.Funimation_Player_ID)) = True Or CBool(InStr(WebBrowser1.Document.Body.OuterHtml, My.Resources.Funimation_Player_ID_2)) = True Then
Main.WebbrowserURL = WebBrowser1.Url.ToString
Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml
Main.WebbrowserTitle = WebBrowser1.DocumentTitle
@ -519,6 +523,7 @@ Public Class GeckoFX
End If
If Main.UserBowser = False Then
If CBool(InStr(requesturl, ".jpg")) = True Or CBool(InStr(requesturl, ".bmp")) = True Or CBool(InStr(requesturl, ".gif")) = True Or CBool(InStr(requesturl, ".png")) = True Or CBool(InStr(requesturl, ".webp")) = True Then
e.Cancel = True

View File

@ -1223,10 +1223,7 @@ Public Class Main
CR_Anime_Staffel_int = RemoveExtraSpaces(CR_Anime_Staffel_int)
End If
Else
'Me.Invoke(New Action(Function()
' My.Computer.Clipboard.SetText(WebbrowserHeadText)
' Return Nothing
' End Function))
Debug.WriteLine("Not found?")
End If
@ -1295,7 +1292,9 @@ Public Class Main
End If
If CR_FilenName = Nothing Then
CR_FilenName = WebbrowserTitle
End If
CR_FilenName = String.Join(" ", CR_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ")
CR_FilenName = RemoveExtraSpaces(CR_FilenName)
@ -2769,7 +2768,13 @@ Public Class Main
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
Dim Funimation_m3u8_final As String = Nothing
Dim Player_ID() As String = WebbrowserText.Split(New String() {My.Resources.Funimation_Player_ID}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Funimation_iFrame As String = Nothing
If InStr(WebbrowserText, My.Resources.Funimation_Player_ID) Then
Funimation_iFrame = My.Resources.Funimation_Player_ID
ElseIf InStr(WebbrowserText, My.Resources.Funimation_Player_ID_2) Then
Funimation_iFrame = My.Resources.Funimation_Player_ID_2
End If
Dim Player_ID() As String = WebbrowserText.Split(New String() {Funimation_iFrame}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Player_ID2() As String = Player_ID(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
If SubsOnly = False Then
@ -3724,7 +3729,14 @@ Public Class Main
client.Headers.Add("Cookie:" + SystemWebBrowserCookie)
Dim HTMLString As String = DecompressString(client.DownloadData(WebbrowserURL))
Dim Funimation_iFrame As String = Nothing
If InStr(HTMLString, My.Resources.Funimation_Player_ID) Then
Funimation_iFrame = My.Resources.Funimation_Player_ID
ElseIf InStr(HTMLString, My.Resources.Funimation_Player_ID_2) Then
Funimation_iFrame = My.Resources.Funimation_Player_ID_2
End If
If InStr(HTMLString, Funimation_iFrame) Then
Dim WebbrowserHeadTextSplit() As String = HTMLString.Split(New String() {"<head"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim WebbrowserHeadTextSplit2() As String = WebbrowserHeadTextSplit(1).Split(New String() {"</head>"}, System.StringSplitOptions.RemoveEmptyEntries)

View File

@ -146,6 +146,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die &quot;mediaid&quot;: ähnelt.
'''</summary>
Friend ReadOnly Property AoD_MediaID() As String
Get
Return ResourceManager.GetString("AoD_MediaID", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die &quot;title&quot;:&quot; ähnelt.
'''</summary>
@ -367,6 +376,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die src=&quot;https://www.funimation.com/player/ ähnelt.
'''</summary>
Friend ReadOnly Property Funimation_Player_ID_2() As String
Get
Return ResourceManager.GetString("Funimation_Player_ID_2", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die &lt;a class=&quot;trackVideo ng-binding&quot; href=&quot; ähnelt.
'''</summary>

View File

@ -541,4 +541,10 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem
<data name="Funimation_Subtitle_String3" xml:space="preserve">
<value>", "kind": "subtitle", "type": "full", "language": "</value>
</data>
<data name="Funimation_Player_ID_2" xml:space="preserve">
<value>src="https://www.funimation.com/player/</value>
</data>
<data name="AoD_MediaID" xml:space="preserve">
<value>"mediaid":</value>
</data>
</root>

View File

@ -67,6 +67,11 @@ Crunchyroll Downloader
Sucht eine lokalisierte Zeichenfolge, die &quot;image&quot;:&quot; ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.AoD_MediaID">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &quot;mediaid&quot;: ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.AoD_Titel">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &quot;title&quot;:&quot; ähnelt.
@ -195,6 +200,11 @@ Video Position: 0
Sucht eine lokalisierte Zeichenfolge, die src=&quot;/player/ ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.Funimation_Player_ID_2">
<summary>
Sucht eine lokalisierte Zeichenfolge, die src=&quot;https://www.funimation.com/player/ ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.Funimation_Split_1">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &lt;a class=&quot;trackVideo ng-binding&quot; href=&quot; ähnelt.

View File

@ -16,7 +16,7 @@ Public Class Einstellungen
Private Sub Einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Beta-U2"
Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Beta-U3"
BackgroundWorker1.RunWorkerAsync()
@ -310,12 +310,12 @@ Public Class Einstellungen
rk.SetValue("ServerPort", Port, RegistryValueKind.String)
Main.StartServer = False
Catch ex As Exception
If MessageBox.Show("Resolution '[Auto]' and merge the subtitle with the video file will download all resolutions!" + vbNewLine + "Press 'Yes' to enable it anyway", "Prepare for unforeseen consequences.", MessageBoxButtons.YesNo) = DialogResult.Yes Then
'If MessageBox.Show("Resolution '[Auto]' and merge the subtitle with the video file will download all resolutions!" + vbNewLine + "Press 'Yes' to enable it anyway", "Prepare for unforeseen consequences.", MessageBoxButtons.YesNo) = DialogResult.Yes Then
Else
AAuto.Checked = False
A360p.Checked = True
End If
'Else
' AAuto.Checked = False
' A360p.Checked = True
'End If
MsgBox("The add-on support Port can only be numbers!", MsgBoxStyle.Exclamation)
Exit Sub
End Try
@ -830,7 +830,7 @@ Public Class Einstellungen
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
GeckoFX.Show()
Main.LoginOnly = "US_UnBlock"
Main.UserBowser = True
GeckoFX.WebBrowser1.Navigate("https://api.criater-stiftung.org/us-unlock.php")
End Sub

View File

@ -67,6 +67,11 @@ Crunchyroll Downloader
Sucht eine lokalisierte Zeichenfolge, die &quot;image&quot;:&quot; ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.AoD_MediaID">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &quot;mediaid&quot;: ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.AoD_Titel">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &quot;title&quot;:&quot; ähnelt.
@ -195,6 +200,11 @@ Video Position: 0
Sucht eine lokalisierte Zeichenfolge, die src=&quot;/player/ ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.Funimation_Player_ID_2">
<summary>
Sucht eine lokalisierte Zeichenfolge, die src=&quot;https://www.funimation.com/player/ ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.Funimation_Split_1">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &lt;a class=&quot;trackVideo ng-binding&quot; href=&quot; ähnelt.