fixes funimation

fix name with illegal characters
added backup sub formats .vtt and .dfxp
This commit is contained in:
hama3254 2020-07-19 21:57:56 +02:00
parent 87d2c682fb
commit c99ee236c8
17 changed files with 236 additions and 3 deletions

Binary file not shown.

View File

@ -140,6 +140,12 @@
<Compile Include="Debug_Mode.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
</Compile>
<Compile Include="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="GeckoFX.Designer.vb">
<DependentUpon>GeckoFX.vb</DependentUpon>
</Compile>
@ -203,6 +209,9 @@
<EmbeddedResource Include="Debug_Mode.resx">
<DependentUpon>Debug_Mode.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GeckoFX.resx">
<DependentUpon>GeckoFX.vb</DependentUpon>
</EmbeddedResource>

72
Crunchyroll Downloader/Form1.Designer.vb generated Normal file
View File

@ -0,0 +1,72 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'RichTextBox1
'
Me.RichTextBox1.Location = New System.Drawing.Point(23, 24)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(1269, 685)
Me.RichTextBox1.TabIndex = 0
Me.RichTextBox1.Text = ""
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(39, 798)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(1240, 20)
Me.TextBox1.TabIndex = 1
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(81, 739)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(75, 23)
Me.Button1.TabIndex = 2
Me.Button1.Text = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1332, 843)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.RichTextBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents RichTextBox1 As RichTextBox
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Button1 As Button
End Class

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,11 @@
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If InStr(RichTextBox1.Text, ".srt") Then
Dim SubTitle1() As String = RichTextBox1.Text.Split(New String() {".srt"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SubTitle2() As String = SubTitle1(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
TextBox1.Text = SubTitle2(SubTitle2.Count - 1) + ".srt"
Else
TextBox1.Text = "nope"
End If
End Sub
End Class

View File

@ -166,6 +166,14 @@ Public Class GeckoFX
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"
ElseIf InStr(WebBrowser1.Document.Body.OuterHtml, ".vtt") Then
Dim SubTitle1() As String = WebBrowser1.Document.Body.OuterHtml.Split(New String() {".vtt"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SubTitle2() As String = SubTitle1(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Main.WebbrowserSoftSubURL = SubTitle2(SubTitle2.Count - 1) + ".vtt"
ElseIf InStr(WebBrowser1.Document.Body.OuterHtml, ".dfxp") Then
Dim SubTitle1() As String = WebBrowser1.Document.Body.OuterHtml.Split(New String() {".dfxp"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SubTitle2() As String = SubTitle1(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Main.WebbrowserSoftSubURL = SubTitle2(SubTitle2.Count - 1) + ".dfxp"
Else
Main.WebbrowserSoftSubURL = Nothing
End If

View File

@ -1838,6 +1838,8 @@ Public Class Main
Dim FunimationName() As String = WebbrowserText.Split(New String() {"</h1>"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim FunimationName2() As String = FunimationName(0).Split(New String() {Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim FunimationName3 As String = FunimationName2(FunimationName2.Count - 1).Replace("</a>", "")
FunimationName3 = System.Text.RegularExpressions.Regex.Replace(FunimationName3, "[^\w\\-]", " ")
FunimationName3 = RemoveExtraSpaces(FunimationName3)
#End Region
#Region "m3u8 URL"
@ -1917,7 +1919,7 @@ Public Class Main
Next
End If
'
'MsgBox(FunimationName3)
'MsgBox(Funimation_m3u8_final)
#Region "thumbnail"
@ -1939,8 +1941,14 @@ Public Class Main
Else
'MsgBox(WebbrowserSoftSubURL)
Dim str2 As String = client0.DownloadString(WebbrowserSoftSubURL)
Dim SubtitelFormat As String = ".srt"
If InStr(WebbrowserSoftSubURL, ".vtt") Then
SubtitelFormat = ".vtt"
ElseIf InStr(WebbrowserSoftSubURL, ".dfxp") Then
SubtitelFormat = ".dfxp"
End If
Dim Pfad3 As String = DownloadPfad.Replace(Chr(34), "")
Dim Pfad4 As String = Pfad3.Replace(".mp4", ".srt")
Dim Pfad4 As String = Pfad3.Replace(".mp4", SubtitelFormat)
File.WriteAllText(Pfad4, str2, Encoding.UTF8)
End If
Catch ex As Exception
@ -1949,4 +1957,8 @@ Public Class Main
End Try
Funimation_Grapp_RDY = True
End Sub
Private Sub Main_Click(sender As Object, e As EventArgs) Handles Me.Click
'Form1.Show()
End Sub
End Class

View File

@ -1 +1 @@
0db4032339f4d8d75cab06e12a54a2b08d757c23
348eb56a763eaa729d1b1d6687372d0a26db13f4

View File

@ -65,3 +65,4 @@ D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Ko
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Kopie\Crunchyroll Downloader\bin\x86\Debug\Geckofx-Core.dll
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Kopie\Crunchyroll Downloader\bin\x86\Debug\Geckofx-Winforms.dll
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Kopie\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.vbproj.CopyComplete
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Form1.resources