Imports Gecko.Events Imports Gecko Imports System.IO Imports Gecko.Cache Imports System.ComponentModel Imports System.Threading Imports System.Net Imports System.Net.WebUtility Imports System.IO.Compression Imports System.Text Public Class GeckoFX Public keks As String = Nothing 'Public c As Boolean = True Dim t As Thread Public ScanTrue As Boolean = False Public ScanTime As Integer = 0 Private Sub GeckoWebBrowser1_DocumentCompleted(sender As Object, e As EventArgs) Handles WebBrowser1.DocumentCompleted Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString) 'MsgBox("loaded!") If ScanTrue = False Then Button2.Enabled = True End If If Main.LoginOnly = "US_UnBlock" Then Main.LoginOnly = "US_UnBlock_Wait" If CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "waiting for reCAPTCHA . . .")) Then Pause(4) Main.LoginOnly = "US_UnBlock" Else Try If CBool(InStr(WebBrowser1.Document.Uri, "https://api.crunchyroll.com/login.0.json")) Then Main.LoginOnly = "US_UnBlock_Finsihed" Else Dim cookieGrapp As String = WebBrowser1.Document.Body.OuterHtml '.Replace(vbTab, "").Replace(" ", "") If Main.Debug2 = True Then MsgBox(cookieGrapp) End If Dim cookieGrapp2() As String = cookieGrapp.Split(New String() {""}, System.StringSplitOptions.RemoveEmptyEntries) Dim cookieGrapp3() As String = cookieGrapp2(1).Split(New String() {""}, System.StringSplitOptions.RemoveEmptyEntries) keks = cookieGrapp3(0) If Main.Debug2 = True Then MsgBox(keks) End If WebBrowser1.Navigate("https://www.crunchyroll.com/logout") Pause(5) WebBrowser1.Navigate("javascript:document.cookie =" + Chr(34) + "session_id=" + keks + "; expires=Thu, 04 Jan 2022 00:00:00 UTC; path=/;" + Chr(34) + ";") Pause(1) WebBrowser1.Navigate("javascript:document.cookie =" + Chr(34) + "sess_id=" + keks + "; expires=Thu, 04 Jan 2022 00:00:00 UTC; path=/;" + Chr(34) + ";") Pause(1) WebBrowser1.Navigate("https://www.crunchyroll.com/") Main.LoginOnly = "US_UnBlock_Finsihed" End If 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 If CBool(InStr(WebBrowser1.Url.ToString, "beta.crunchyroll.com")) Then Main.WebbrowserURL = WebBrowser1.Url.ToString Exit Sub ElseIf CBool(InStr(WebBrowser1.Url.ToString, "crunchyroll.com")) Then If Main.b = False Then Try If WebBrowser1.Url.ToString = "https://www.crunchyroll.com/" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/en-gb" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/es" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/es-es" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/pt-br" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/pt-pt" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/fr" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/de" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/ar" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/it" Then Main.b = True ElseIf WebBrowser1.Url.ToString = "https://www.crunchyroll.com/ru" Then Main.b = True ElseIf CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "hardsub_lang")) Then Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml Main.b = True t = New Thread(AddressOf Main.GrappURL) t.Priority = ThreadPriority.Normal t.IsBackground = True t.Start() ElseIf CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "season-dropdown content-menu block")) Then Main.b = True Anime_Add.textBox2.Text = "Name of the Anime" Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml Main.SeasonDropdownGrapp() ElseIf CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "wrapper container-shadow hover-classes")) Then Main.b = True Anime_Add.textBox2.Text = "Name of the Anime" Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml Main.MassGrapp() Else Main.b = True MsgBox(Main.No_Stream, MsgBoxStyle.OkOnly) Anime_Add.StatusLabel.Text = "Status: idle" End If Catch ex As Exception MsgBox(ex.ToString) Anime_Add.StatusLabel.Text = "Status: idle" End Try ElseIf Main.c = False Then If CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "hardsub_lang")) Then Main.c = True Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml 'SoftSub.DownloadSubs() Me.Close() End If End If If Main.UserBowser = False Then Try Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml Catch ex As Exception End Try Me.Close() End If ElseIf CBool(InStr(WebBrowser1.Url.ToString, "funimation.com")) Then If Main.b = False 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 Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml Main.WebbrowserCookie = WebBrowser1.Document.Cookie Main.b = True t = New Thread(AddressOf Main.Funitmation_Grapp) t.Priority = ThreadPriority.Normal t.IsBackground = True t.Start() Else Main.Text = "Status: no video found" Anime_Add.StatusLabel.Text = "fail?" End If End If ElseIf CBool(InStr(WebBrowser1.Url.ToString, "anime-on-demand.de")) Then If Main.b = False Then Main.b = True Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle Anime_Add.AoDHTML = WebBrowser1.Document.Body.OuterHtml Anime_Add.ProcessAoD() Exit Sub End If Else If Main.b = False Then Main.m3u8List.Clear() Main.mpdList.Clear() Main.txtList.Clear() Button2.Enabled = False ScanTrue = True Main.LogBrowserData = True NetworkScanEnd() End If End If End If If Main.UserBowser = False Then If Main.b = True Then Anime_Add.StatusLabel.Text = "Status: idle" Me.Close() End If End If 'End If End Sub Private Sub GeckoFX_Load(sender As Object, e As EventArgs) Handles MyBase.Load If Me.Width > My.Computer.Screen.Bounds.Width Then Me.Width = My.Computer.Screen.Bounds.Width WebBrowser1.Width = Me.Size.Width - 15 ', Me.Size.Height - 69) WebBrowser1.Location = New Point(0, 30) TextBox1.Width = My.Computer.Screen.Bounds.Width - 435 End If If Me.Size.Height > My.Computer.Screen.Bounds.Height Then Me.Height = My.Computer.Screen.Bounds.Height WebBrowser1.Height = Me.Size.Height - 69 WebBrowser1.Location = New Point(0, 30) End If If Main.Debug2 = True Then Debug_Mode.Show() Debug_Mode.Location = New Point(Me.Location.X + Me.Width - 15, Me.Location.Y) End If If WebBrowser1.Url.ToString = "about:blank" Then If Main.LoginOnly = "US_UnBlock" Then WebBrowser1.Navigate("https://www.crunchyroll.com/login") Else WebBrowser1.Navigate(Main.Startseite) End If End If Try Me.Icon = My.Resources.icon Catch ex As Exception End Try 'Main.UserBowser = True 'Main.Pause(15) 'For ii As Integer = 19 To 46 ' WebBrowser1.Navigate("https://proxer.me/read/22459/" + ii.ToString + "/en/1") ' Main.Pause(15) ' Main.WebbrowserURL = WebBrowser1.Url.ToString ' Dim NameDLFinal As String = Nothing ' Dim NameDL As String() = WebBrowser1.Document.Body.OuterHtml.Split(New String() {"