mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-11-10 05:35:25 +00:00
Compare commits
2 Commits
2026.2.14.
...
2026.5.13.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ba78d2fa0 | ||
|
|
be97752b7c |
43
Changelog.md
43
Changelog.md
@@ -2,13 +2,52 @@
|
|||||||
- [ffmpeg](https://github.com/AAndyProgram/SCrawler/wiki/Settings#ffmpeg)
|
- [ffmpeg](https://github.com/AAndyProgram/SCrawler/wiki/Settings#ffmpeg)
|
||||||
- x64 version - [release](https://github.com/GyanD/codexffmpeg/releases/tag/5.1.2); [zip](https://github.com/GyanD/codexffmpeg/releases/download/5.1.2/ffmpeg-5.1.2-full_build.zip); **version `5.1.2-full_build-www.gyan.dev`**
|
- x64 version - [release](https://github.com/GyanD/codexffmpeg/releases/tag/5.1.2); [zip](https://github.com/GyanD/codexffmpeg/releases/download/5.1.2/ffmpeg-5.1.2-full_build.zip); **version `5.1.2-full_build-www.gyan.dev`**
|
||||||
- x86 version - [release](https://github.com/yt-dlp/FFmpeg-Builds/releases/tag/autobuild-2022-11-30-12-57); [zip](https://github.com/yt-dlp/FFmpeg-Builds/releases/download/autobuild-2022-11-30-12-57/ffmpeg-N-109274-gd7a5f068c2-win32-gpl.zip); **version `N-109457-geeb280f351-20221226`**
|
- x86 version - [release](https://github.com/yt-dlp/FFmpeg-Builds/releases/tag/autobuild-2022-11-30-12-57); [zip](https://github.com/yt-dlp/FFmpeg-Builds/releases/download/autobuild-2022-11-30-12-57/ffmpeg-N-109274-gd7a5f068c2-win32-gpl.zip); **version `N-109457-geeb280f351-20221226`**
|
||||||
- [Gallery-dl](https://github.com/AAndyProgram/SCrawler/wiki/Settings#gallery-dl) - **1.31.6**
|
- [Gallery-dl](https://github.com/AAndyProgram/SCrawler/wiki/Settings#gallery-dl) - **1.32.0**
|
||||||
- [YT-DLP](https://github.com/AAndyProgram/SCrawler/wiki/Settings#yt-dlp) - **2026.02.04.233607**
|
- [YT-DLP](https://github.com/AAndyProgram/SCrawler/wiki/Settings#yt-dlp) - **2026.03.17**
|
||||||
- [Deno](https://github.com/AAndyProgram/SCrawler/wiki/Settings#deno) - latest *(`2.0.0` or higher)*
|
- [Deno](https://github.com/AAndyProgram/SCrawler/wiki/Settings#deno) - latest *(`2.0.0` or higher)*
|
||||||
- [OF-Scraper](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper) - **3.12.9** ([release](https://github.com/datawhores/OF-Scraper/releases/tag/3.12.9))
|
- [OF-Scraper](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper) - **3.12.9** ([release](https://github.com/datawhores/OF-Scraper/releases/tag/3.12.9))
|
||||||
|
|
||||||
# 2026
|
# 2026
|
||||||
|
|
||||||
|
## 2026.5.13.0
|
||||||
|
|
||||||
|
*2026-05-13*
|
||||||
|
|
||||||
|
- Added
|
||||||
|
- Sites
|
||||||
|
- ThisVid: download undownloaded videos
|
||||||
|
- Feed: the most frequently used buttons are added to the top
|
||||||
|
- Minor improvements
|
||||||
|
- Updated
|
||||||
|
- gallery-dl up to version **1.32.0**
|
||||||
|
- Fixed
|
||||||
|
- Sites:
|
||||||
|
- **Instagram: data is not downloading**
|
||||||
|
- OnlyFans: cookies error
|
||||||
|
- PornHub: subscriptions are not downloading
|
||||||
|
- Minor bugs
|
||||||
|
|
||||||
|
## 2026.3.23.0
|
||||||
|
|
||||||
|
*2026-03-23*
|
||||||
|
|
||||||
|
- Added
|
||||||
|
- Sites:
|
||||||
|
- Bluesky:
|
||||||
|
- download models (user options), like in Twitter
|
||||||
|
- `did` handle for recognizing
|
||||||
|
- PornHub: `M3U8` download functionality update
|
||||||
|
- xHamster: add `webm` to `jpg` correct conversion
|
||||||
|
- Minor improvements
|
||||||
|
- Updated
|
||||||
|
- gallery-dl up to version **1.31.9**
|
||||||
|
- yt-dlp up to version **2026.03.17**
|
||||||
|
- Fixed
|
||||||
|
- Sites:
|
||||||
|
- TikTok: gallery-dl downloads stories slowly when the user has no stories
|
||||||
|
- Twitter: downloading a single media file (standalone downloader) fails
|
||||||
|
- Minor bugs
|
||||||
|
|
||||||
## 2026.2.14.0
|
## 2026.2.14.0
|
||||||
|
|
||||||
*2026-02-14*
|
*2026-02-14*
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ Imports PersonalUtilities.Forms
|
|||||||
Imports PersonalUtilities.Functions.RegularExpressions
|
Imports PersonalUtilities.Functions.RegularExpressions
|
||||||
Namespace API.Base
|
Namespace API.Base
|
||||||
Friend Module Declarations
|
Friend Module Declarations
|
||||||
|
Friend Interface IThumbList
|
||||||
|
Property Thumbs As List(Of String)
|
||||||
|
End Interface
|
||||||
Friend Const UserLabelName As String = "User"
|
Friend Const UserLabelName As String = "User"
|
||||||
Friend Const SearchRequestLabelName As String = "Search request"
|
Friend Const SearchRequestLabelName As String = "Search request"
|
||||||
Friend ReadOnly LNC As New ListAddParams(LAP.NotContainsOnly)
|
Friend ReadOnly LNC As New ListAddParams(LAP.NotContainsOnly)
|
||||||
|
|||||||
@@ -42,5 +42,9 @@ Namespace API.Base
|
|||||||
u.DownloadTextSpecialFolder = DownloadTextSpecialFolder
|
u.DownloadTextSpecialFolder = DownloadTextSpecialFolder
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Friend Overridable Sub Apply(ByRef u As UserDataBase)
|
||||||
|
ApplyBase(u)
|
||||||
|
If TypeOf u Is IPSite And TypeOf Me Is IPSite Then DirectCast(u, IPSite).QueryString = DirectCast(Me, IPSite).QueryString
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
@@ -31,10 +31,6 @@ Namespace API.Base
|
|||||||
MyBase.New(s)
|
MyBase.New(s)
|
||||||
DisableBase()
|
DisableBase()
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overridable Sub Apply(ByRef u As IPSite)
|
|
||||||
ApplyBase(u)
|
|
||||||
u.QueryString = QueryString
|
|
||||||
End Sub
|
|
||||||
Protected Overridable Sub DisableBase()
|
Protected Overridable Sub DisableBase()
|
||||||
_ApplyBase_Name = False
|
_ApplyBase_Name = False
|
||||||
_ApplyBase_Text = False
|
_ApplyBase_Text = False
|
||||||
|
|||||||
@@ -360,8 +360,8 @@ Namespace API.Base
|
|||||||
Me._UserSiteName = _UserSiteName
|
Me._UserSiteName = _UserSiteName
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Protected Sub UserSiteNameUpdate(ByVal NewName As String)
|
Protected Sub UserSiteNameUpdate(ByVal NewName As String, Optional ByVal Force As Boolean = False)
|
||||||
If Not NewName.IsEmptyString And (UserSiteName.IsEmptyString Or Settings.UpdateUserSiteNameEveryTime) Then UserSiteName = NewName
|
If Not NewName.IsEmptyString And (UserSiteName.IsEmptyString Or Settings.UpdateUserSiteNameEveryTime Or Force) Then UserSiteName = NewName
|
||||||
End Sub
|
End Sub
|
||||||
Friend ReadOnly Property UserModel As UsageModel Implements IUserData.UserModel
|
Friend ReadOnly Property UserModel As UsageModel Implements IUserData.UserModel
|
||||||
Get
|
Get
|
||||||
@@ -1030,7 +1030,7 @@ BlockNullPicture:
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub UpdateUserInformation_Ex()
|
Private Sub UpdateUserInformation_Ex()
|
||||||
If _ForceSaveUserInfoOnException Then UpdateUserInformation()
|
If _ForceSaveUserInfo Then UpdateUserInformation()
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overridable Overloads Sub UpdateUserInformation() Implements IUserData.UpdateUserInformation
|
Friend Overridable Overloads Sub UpdateUserInformation() Implements IUserData.UpdateUserInformation
|
||||||
UpdateUserInformation(False)
|
UpdateUserInformation(False)
|
||||||
@@ -1207,7 +1207,6 @@ BlockNullPicture:
|
|||||||
Protected UseClientTokens As Boolean = False
|
Protected UseClientTokens As Boolean = False
|
||||||
Protected _ForceSaveUserData As Boolean = False
|
Protected _ForceSaveUserData As Boolean = False
|
||||||
Protected _ForceSaveUserInfo As Boolean = False
|
Protected _ForceSaveUserInfo As Boolean = False
|
||||||
Protected _ForceSaveUserInfoOnException As Boolean = False
|
|
||||||
Private _DownloadInProgress As Boolean = False
|
Private _DownloadInProgress As Boolean = False
|
||||||
Private _EnvirUserExists As Boolean
|
Private _EnvirUserExists As Boolean
|
||||||
Private _EnvirUserSuspended As Boolean
|
Private _EnvirUserSuspended As Boolean
|
||||||
@@ -1227,7 +1226,6 @@ BlockNullPicture:
|
|||||||
_DescriptionEveryTime = Settings.UpdateUserDescriptionEveryTime
|
_DescriptionEveryTime = Settings.UpdateUserDescriptionEveryTime
|
||||||
_ForceSaveUserData = False
|
_ForceSaveUserData = False
|
||||||
_ForceSaveUserInfo = False
|
_ForceSaveUserInfo = False
|
||||||
_ForceSaveUserInfoOnException = False
|
|
||||||
_EnvirUserExists = UserExists
|
_EnvirUserExists = UserExists
|
||||||
_EnvirUserSuspended = UserSuspended
|
_EnvirUserSuspended = UserSuspended
|
||||||
_EnvirCreatedByChannel = CreatedByChannel
|
_EnvirCreatedByChannel = CreatedByChannel
|
||||||
@@ -1244,8 +1242,8 @@ BlockNullPicture:
|
|||||||
Select Case Caller
|
Select Case Caller
|
||||||
Case NameOf(UserExists) : If Not _EnvirUserExists = CBool(NewValue) Then _EnvirChanged = True : _EnvirInvokeUserUpdated = True
|
Case NameOf(UserExists) : If Not _EnvirUserExists = CBool(NewValue) Then _EnvirChanged = True : _EnvirInvokeUserUpdated = True
|
||||||
Case NameOf(UserSuspended) : If Not _EnvirUserSuspended = CBool(NewValue) Then _EnvirChanged = True : _EnvirInvokeUserUpdated = True
|
Case NameOf(UserSuspended) : If Not _EnvirUserSuspended = CBool(NewValue) Then _EnvirChanged = True : _EnvirInvokeUserUpdated = True
|
||||||
Case NameOf(NameTrue) : _EnvirChanged = True : _ForceSaveUserInfo = True : _ForceSaveUserInfoOnException = True
|
Case NameOf(NameTrue) : _EnvirChanged = True : _ForceSaveUserInfo = True
|
||||||
Case NameOf(ID) : _EnvirChanged = True : _ForceSaveUserInfo = True : _ForceSaveUserInfoOnException = True
|
Case NameOf(ID) : _EnvirChanged = True : _ForceSaveUserInfo = True
|
||||||
Case Else : _EnvirChanged = True
|
Case Else : _EnvirChanged = True
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
@@ -1552,6 +1550,12 @@ BlockNullPicture:
|
|||||||
''' </summary>
|
''' </summary>
|
||||||
Protected Overridable Sub ReparseMissing(ByVal Token As CancellationToken)
|
Protected Overridable Sub ReparseMissing(ByVal Token As CancellationToken)
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub ReparseMissing_ClearList(ByRef rList As List(Of Integer))
|
||||||
|
If rList.Count > 0 Then
|
||||||
|
For i% = rList.Count - 1 To 0 Step -1 : _ContentList.RemoveAt(rList(i)) : Next
|
||||||
|
rList.Clear()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "MD5 support"
|
#Region "MD5 support"
|
||||||
Private Const VALIDATE_MD5_ERROR As String = "VALIDATE_MD5_ERROR"
|
Private Const VALIDATE_MD5_ERROR As String = "VALIDATE_MD5_ERROR"
|
||||||
@@ -1843,7 +1847,8 @@ BlockNullPicture:
|
|||||||
|
|
||||||
updateDownCount(False)
|
updateDownCount(False)
|
||||||
|
|
||||||
v.File = DownloadContentDefault_ConvertWebp(ChangeFileNameByProvider(f, v), postProcessWebp)
|
v.File = ChangeFileNameByProvider(f, v)
|
||||||
|
v.File = DownloadContentDefault_ConvertWebp(v, postProcessWebp)
|
||||||
v.State = UStates.Downloaded
|
v.State = UStates.Downloaded
|
||||||
DownloadContentDefault_PostProcessing(v, f, Token)
|
DownloadContentDefault_PostProcessing(v, f, Token)
|
||||||
If UseMD5Comparison And (v.Type = UTypes.GIF Or v.Type = UTypes.Picture) Then
|
If UseMD5Comparison And (v.Type = UTypes.GIF Or v.Type = UTypes.Picture) Then
|
||||||
@@ -1943,7 +1948,11 @@ stxt:
|
|||||||
End Function
|
End Function
|
||||||
Protected Overridable Sub DownloadContentDefault_PostProcessing(ByRef m As UserMedia, ByVal File As SFile, ByVal Token As CancellationToken)
|
Protected Overridable Sub DownloadContentDefault_PostProcessing(ByRef m As UserMedia, ByVal File As SFile, ByVal Token As CancellationToken)
|
||||||
End Sub
|
End Sub
|
||||||
Protected Overridable Function DownloadContentDefault_ConvertWebp(ByVal WebpFile As SFile, ByVal Process As Boolean) As SFile
|
Protected Overridable Function DownloadContentDefault_ConvertWebp(ByVal m As UserMedia, ByVal Process As Boolean) As SFile
|
||||||
|
Return DownloadContentDefault_ConvertWebp_Impl(m, Process)
|
||||||
|
End Function
|
||||||
|
Protected Overridable Function DownloadContentDefault_ConvertWebp_Impl(ByVal m As UserMedia, ByVal Process As Boolean) As SFile
|
||||||
|
Dim WebpFile As SFile = m.File
|
||||||
Dim f As SFile = WebpFile
|
Dim f As SFile = WebpFile
|
||||||
If Process AndAlso f.Exists Then
|
If Process AndAlso f.Exists Then
|
||||||
f.Path = $"{f.PathWithSeparator}Sources"
|
f.Path = $"{f.PathWithSeparator}Sources"
|
||||||
@@ -1959,6 +1968,24 @@ stxt:
|
|||||||
End If
|
End If
|
||||||
Return f
|
Return f
|
||||||
End Function
|
End Function
|
||||||
|
Protected Function DownloadContentDefault_ConvertWebp_TestImg(ByVal m As UserMedia, ByVal Process As Boolean) As SFile
|
||||||
|
If m.Type = UTypes.Picture And Settings.DownloadNativeImageFormat Then
|
||||||
|
Using testImg As New UserImage.ImageRenderer2(m.File, EDP.ReturnValue)
|
||||||
|
If testImg.IsWebP Then
|
||||||
|
Dim f As SFile = m.File
|
||||||
|
If f.Extension.IsEmptyString OrElse Not f.Extension = UserImage.ExtWebp Then
|
||||||
|
f.Extension = UserImage.ExtWebp
|
||||||
|
f = SFile.Rename(m.File, f,, EDP.ReturnValue).IfNullOrEmpty(m.File)
|
||||||
|
End If
|
||||||
|
m.File = f
|
||||||
|
Return DownloadContentDefault_ConvertWebp_Impl(m, True).IfNullOrEmpty(f)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
ElseIf Process Then
|
||||||
|
Return DownloadContentDefault_ConvertWebp_Impl(m, Process)
|
||||||
|
End If
|
||||||
|
Return m.File
|
||||||
|
End Function
|
||||||
Protected Overridable Function DownloadContentDefault_ProcessDownloadException() As Boolean
|
Protected Overridable Function DownloadContentDefault_ProcessDownloadException() As Boolean
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
44
SCrawler/API/Bluesky/EditorExchangeOptions.vb
Normal file
44
SCrawler/API/Bluesky/EditorExchangeOptions.vb
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
' Copyright (C) Andy https://github.com/AAndyProgram
|
||||||
|
' This program is free software: you can redistribute it and/or modify
|
||||||
|
' it under the terms of the GNU General Public License as published by
|
||||||
|
' the Free Software Foundation, either version 3 of the License, or
|
||||||
|
' (at your option) any later version.
|
||||||
|
'
|
||||||
|
' This program is distributed in the hope that it will be useful,
|
||||||
|
' but WITHOUT ANY WARRANTY
|
||||||
|
Imports SCrawler.API.Base
|
||||||
|
Imports SCrawler.Plugin.Attributes
|
||||||
|
Namespace API.Bluesky
|
||||||
|
Friend Class EditorExchangeOptions : Inherits Base.EditorExchangeOptionsBase
|
||||||
|
Friend Overrides Property SiteKey As String = BlueskySiteKey
|
||||||
|
<PSetting(NameOf(SiteSettings.DownloadModelMedia), NameOf(MySettings), Address:=SettingAddress.User)>
|
||||||
|
Friend Overridable Property DownloadModelMedia As Boolean = False
|
||||||
|
<PSetting(NameOf(SiteSettings.DownloadModelProfile), NameOf(MySettings), Address:=SettingAddress.User)>
|
||||||
|
Friend Overridable Property DownloadModelProfile As Boolean = False
|
||||||
|
Private ReadOnly Property MySettings As Object
|
||||||
|
Friend Sub New(ByVal s As SiteSettings)
|
||||||
|
DownloadModelMedia = s.DownloadModelMedia.Value
|
||||||
|
DownloadModelProfile = s.DownloadModelProfile.Value
|
||||||
|
MySettings = s
|
||||||
|
End Sub
|
||||||
|
Friend Sub New(ByVal u As UserData)
|
||||||
|
DownloadModelMedia = u.DownloadModelMedia
|
||||||
|
DownloadModelProfile = u.DownloadModelProfile
|
||||||
|
MySettings = u.HOST.Source
|
||||||
|
End Sub
|
||||||
|
Friend Overrides Sub Apply(ByRef u As UserDataBase)
|
||||||
|
MyBase.Apply(u)
|
||||||
|
If Not DownloadModelMedia And Not DownloadModelProfile Then
|
||||||
|
DownloadModelMedia = True
|
||||||
|
ElseIf DownloadModelMedia Then
|
||||||
|
DownloadModelProfile = False
|
||||||
|
Else
|
||||||
|
DownloadModelMedia = False
|
||||||
|
End If
|
||||||
|
With DirectCast(u, UserData)
|
||||||
|
.DownloadModelMedia = DownloadModelMedia
|
||||||
|
.DownloadModelProfile = DownloadModelProfile
|
||||||
|
End With
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
@@ -26,6 +26,10 @@ Namespace API.Bluesky
|
|||||||
<PXML> Friend ReadOnly Property TokenUpdateTime As PropertyValue
|
<PXML> Friend ReadOnly Property TokenUpdateTime As PropertyValue
|
||||||
<PropertyOption(ControlText:="Token update", ControlToolTip:="Token refresh interval (in minutes)." & vbCr & "Default: 120.", IsAuth:=True), PXML, PClonable, HiddenControl>
|
<PropertyOption(ControlText:="Token update", ControlToolTip:="Token refresh interval (in minutes)." & vbCr & "Default: 120.", IsAuth:=True), PXML, PClonable, HiddenControl>
|
||||||
Friend ReadOnly Property TokenRefreshInterval As PropertyValue
|
Friend ReadOnly Property TokenRefreshInterval As PropertyValue
|
||||||
|
<PropertyOption(ControlText:="Download model 'Media'", ControlToolTip:="Parse the 'Media' block", Category:=DeclaredNames.CAT_UserDefs), PXML, PClonable>
|
||||||
|
Friend ReadOnly Property DownloadModelMedia As PropertyValue
|
||||||
|
<PropertyOption(ControlText:="Download model 'Profile'", ControlToolTip:="Parse the 'Posts' block", Category:=DeclaredNames.CAT_UserDefs), PXML, PClonable>
|
||||||
|
Friend ReadOnly Property DownloadModelProfile As PropertyValue
|
||||||
Friend Sub New(ByVal AccName As String, ByVal Temp As Boolean)
|
Friend Sub New(ByVal AccName As String, ByVal Temp As Boolean)
|
||||||
MyBase.New("Bluesky", "bsky.app", AccName, Temp, My.Resources.SiteResources.BlueskyIcon_32, My.Resources.SiteResources.BlueskyPic_32)
|
MyBase.New("Bluesky", "bsky.app", AccName, Temp, My.Resources.SiteResources.BlueskyIcon_32, My.Resources.SiteResources.BlueskyPic_32)
|
||||||
|
|
||||||
@@ -38,11 +42,14 @@ Namespace API.Bluesky
|
|||||||
TokenUpdateTime = New PropertyValue(Now.AddYears(-1))
|
TokenUpdateTime = New PropertyValue(Now.AddYears(-1))
|
||||||
TokenRefreshInterval = New PropertyValue(120)
|
TokenRefreshInterval = New PropertyValue(120)
|
||||||
|
|
||||||
|
DownloadModelMedia = New PropertyValue(True)
|
||||||
|
DownloadModelProfile = New PropertyValue(False)
|
||||||
|
|
||||||
_AllowUserAgentUpdate = False
|
_AllowUserAgentUpdate = False
|
||||||
UrlPatternUser = "https://bsky.app/profile/{0}"
|
UrlPatternUser = "https://bsky.app/profile/{0}"
|
||||||
ImageVideoContains = "bsky.app"
|
ImageVideoContains = "bsky.app"
|
||||||
UserRegex = RParams.DMS("bsky.app/profile/([^/\?]+)", 1, EDP.ReturnValue)
|
UserRegex = RParams.DMS("bsky.app/profile/([^/\?]+)", 1, EDP.ReturnValue)
|
||||||
UserOptionsType = GetType(EditorExchangeOptionsBase)
|
UserOptionsType = GetType(EditorExchangeOptions)
|
||||||
End Sub
|
End Sub
|
||||||
Protected Overrides Function UserOptionsValid(ByVal Options As Object) As Boolean
|
Protected Overrides Function UserOptionsValid(ByVal Options As Object) As Boolean
|
||||||
Return DirectCast(Options, EditorExchangeOptionsBase).SiteKey = BlueskySiteKey
|
Return DirectCast(Options, EditorExchangeOptionsBase).SiteKey = BlueskySiteKey
|
||||||
@@ -96,5 +103,10 @@ Namespace API.Bluesky
|
|||||||
_TokenUpdating = False
|
_TokenUpdating = False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
Friend Overrides Function IsMyUser(ByVal UserURL As String) As ExchangeOptions
|
||||||
|
Dim e As ExchangeOptions = MyBase.IsMyUser(UserURL)
|
||||||
|
If Not e.UserName.IsEmptyString AndAlso e.UserName.StartsWith("did:") Then e.UserName = e.UserName.Replace(":", "@")
|
||||||
|
Return e
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
@@ -16,6 +16,11 @@ Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
|||||||
Imports UStates = SCrawler.API.Base.UserMedia.States
|
Imports UStates = SCrawler.API.Base.UserMedia.States
|
||||||
Namespace API.Bluesky
|
Namespace API.Bluesky
|
||||||
Friend Class UserData : Inherits UserDataBase
|
Friend Class UserData : Inherits UserDataBase
|
||||||
|
#Region "XML names"
|
||||||
|
Private Const Name_DownloadModelMedia As String = "DownloadModelMedia"
|
||||||
|
Private Const Name_DownloadModelProfile As String = "DownloadModelProfile"
|
||||||
|
Private Const Name_ForceParseProfileInfo As String = "ForceParseProfileInfo"
|
||||||
|
#End Region
|
||||||
#Region "Declarations"
|
#Region "Declarations"
|
||||||
Private ReadOnly Property MySettings As SiteSettings
|
Private ReadOnly Property MySettings As SiteSettings
|
||||||
Get
|
Get
|
||||||
@@ -28,16 +33,45 @@ Namespace API.Bluesky
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Private ReadOnly _TmpPosts2 As List(Of String)
|
Private ReadOnly _TmpPosts2 As List(Of String)
|
||||||
|
Friend Property DownloadModelMedia As Boolean = True
|
||||||
|
Friend Property DownloadModelProfile As Boolean = False
|
||||||
|
Private Property ForceParseProfileInfo As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Loader"
|
#Region "Loader"
|
||||||
|
Private Sub UpdateUserOptions()
|
||||||
|
If ID.IsEmptyString AndAlso Not Name.IsEmptyString AndAlso Name.StartsWith("did@") Then
|
||||||
|
NameTrue = Name.Replace("@", ":")
|
||||||
|
ID = NameTrue
|
||||||
|
ForceParseProfileInfo = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
Protected Overrides Sub LoadUserInformation_OptionalFields(ByRef Container As XmlFile, ByVal Loading As Boolean)
|
||||||
|
With Container
|
||||||
|
If Loading Then
|
||||||
|
If .Contains(Name_DownloadModelMedia) Then
|
||||||
|
DownloadModelMedia = .Value(Name_DownloadModelMedia).FromXML(Of Boolean)(True)
|
||||||
|
DownloadModelProfile = .Value(Name_DownloadModelProfile).FromXML(Of Boolean)(False)
|
||||||
|
Else
|
||||||
|
DownloadModelMedia = ParseUserMediaOnly
|
||||||
|
DownloadModelProfile = Not ParseUserMediaOnly
|
||||||
|
End If
|
||||||
|
ForceParseProfileInfo = .Value(Name_ForceParseProfileInfo).FromXML(Of Boolean)(False)
|
||||||
|
Else
|
||||||
|
If ID.IsEmptyString Then
|
||||||
|
UpdateUserOptions()
|
||||||
|
.Value(Name_UserID) = ID
|
||||||
|
End If
|
||||||
|
.Add(Name_DownloadModelMedia, DownloadModelMedia.BoolToInteger)
|
||||||
|
.Add(Name_DownloadModelProfile, DownloadModelProfile.BoolToInteger)
|
||||||
|
.Add(Name_ForceParseProfileInfo, ForceParseProfileInfo.BoolToInteger)
|
||||||
|
End If
|
||||||
|
End With
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overrides Function ExchangeOptionsGet() As Object
|
Friend Overrides Function ExchangeOptionsGet() As Object
|
||||||
Return New EditorExchangeOptionsBase(Me) With {.SiteKey = BlueskySiteKey}
|
Return New EditorExchangeOptions(Me)
|
||||||
End Function
|
End Function
|
||||||
Friend Overrides Sub ExchangeOptionsSet(ByVal Obj As Object)
|
Friend Overrides Sub ExchangeOptionsSet(ByVal Obj As Object)
|
||||||
If Not Obj Is Nothing AndAlso TypeOf Obj Is EditorExchangeOptionsBase AndAlso
|
If Not Obj Is Nothing AndAlso TypeOf Obj Is EditorExchangeOptions Then DirectCast(Obj, EditorExchangeOptions).Apply(Me)
|
||||||
DirectCast(Obj, EditorExchangeOptionsBase).SiteKey = BlueskySiteKey Then DirectCast(Obj, EditorExchangeOptionsBase).ApplyBase(Me)
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Initializer"
|
#Region "Initializer"
|
||||||
@@ -66,6 +100,13 @@ Namespace API.Bluesky
|
|||||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||||
_TmpPosts2.Clear()
|
_TmpPosts2.Clear()
|
||||||
Try
|
Try
|
||||||
|
If Not DownloadModelMedia And Not DownloadModelProfile Then
|
||||||
|
DownloadModelMedia = True
|
||||||
|
ElseIf DownloadModelMedia Then
|
||||||
|
DownloadModelProfile = False
|
||||||
|
Else
|
||||||
|
DownloadModelMedia = False
|
||||||
|
End If
|
||||||
If Not CBool(MySettings.CookiesEnabled.Value) Then Responser.Cookies.Clear()
|
If Not CBool(MySettings.CookiesEnabled.Value) Then Responser.Cookies.Clear()
|
||||||
UpdateToken(, True)
|
UpdateToken(, True)
|
||||||
_TokenUpdateCount = 0
|
_TokenUpdateCount = 0
|
||||||
@@ -79,7 +120,7 @@ Namespace API.Bluesky
|
|||||||
Private Overloads Sub DownloadData(ByVal Cursor As String, ByVal Token As CancellationToken)
|
Private Overloads Sub DownloadData(ByVal Cursor As String, ByVal Token As CancellationToken)
|
||||||
Dim URL$ = String.Empty
|
Dim URL$ = String.Empty
|
||||||
Try
|
Try
|
||||||
If Not IsSavedPosts And ID.IsEmptyString Then GetProfileInfo(Token)
|
If (Not IsSavedPosts And ID.IsEmptyString) Or ForceParseProfileInfo Then GetProfileInfo(Token)
|
||||||
If Not IsSavedPosts And ID.IsEmptyString Then Throw New ArgumentNullException("ID", "ID is null")
|
If Not IsSavedPosts And ID.IsEmptyString Then Throw New ArgumentNullException("ID", "ID is null")
|
||||||
If UpdateToken() Then
|
If UpdateToken() Then
|
||||||
Dim nextCursor$ = String.Empty
|
Dim nextCursor$ = String.Empty
|
||||||
@@ -91,7 +132,9 @@ Namespace API.Bluesky
|
|||||||
n = {"bookmarks"}
|
n = {"bookmarks"}
|
||||||
p = {"item"}
|
p = {"item"}
|
||||||
Else
|
Else
|
||||||
URL = $"https://bsky.social/xrpc/app.bsky.feed.getAuthorFeed?actor={ID_Encoded}&filter=posts_and_author_threads&includePins=false&limit=99"
|
'posts_and_author_threads
|
||||||
|
'posts_with_media
|
||||||
|
URL = $"https://bsky.social/xrpc/app.bsky.feed.getAuthorFeed?actor={ID_Encoded}&filter={IIf(DownloadModelMedia, "posts_with_media", "posts_and_author_threads")}&includePins=false&limit=99"
|
||||||
If Not Cursor.IsEmptyString Then URL &= $"&cursor={SymbolsConverter.ASCII.EncodeSymbolsOnly(Cursor)}"
|
If Not Cursor.IsEmptyString Then URL &= $"&cursor={SymbolsConverter.ASCII.EncodeSymbolsOnly(Cursor)}"
|
||||||
n = {"feed"}
|
n = {"feed"}
|
||||||
p = {"post"}
|
p = {"post"}
|
||||||
@@ -106,7 +149,7 @@ Namespace API.Bluesky
|
|||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
For Each post As EContainer In .Self
|
For Each post As EContainer In .Self
|
||||||
With post(p)
|
With post(p)
|
||||||
c = DefaultParser(.Self,, nextCursor)
|
c = DefaultParser(.Self) ',, nextCursor)
|
||||||
Select Case c
|
Select Case c
|
||||||
Case CInt(DateResult.Skip) * -1 : Continue For
|
Case CInt(DateResult.Skip) * -1 : Continue For
|
||||||
Case CInt(DateResult.Exit) * -1 : Exit Sub
|
Case CInt(DateResult.Exit) * -1 : Exit Sub
|
||||||
@@ -238,6 +281,7 @@ Namespace API.Bluesky
|
|||||||
#Region "GetProfileInfo"
|
#Region "GetProfileInfo"
|
||||||
Private Sub GetProfileInfo(ByVal Token As CancellationToken)
|
Private Sub GetProfileInfo(ByVal Token As CancellationToken)
|
||||||
Try
|
Try
|
||||||
|
If ForceParseProfileInfo Then ForceParseProfileInfo = False : _ForceSaveUserInfo = True
|
||||||
If UpdateToken() Then
|
If UpdateToken() Then
|
||||||
Dim r$ = Responser.GetResponse($"https://bsky.social/xrpc/app.bsky.actor.getProfile?actor={ID.IfNullOrEmpty(NameTrue)}")
|
Dim r$ = Responser.GetResponse($"https://bsky.social/xrpc/app.bsky.actor.getProfile?actor={ID.IfNullOrEmpty(NameTrue)}")
|
||||||
TokenUpdateCountReset()
|
TokenUpdateCountReset()
|
||||||
@@ -344,6 +388,9 @@ Namespace API.Bluesky
|
|||||||
Protected Overrides Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile, ByVal Token As CancellationToken) As SFile
|
Protected Overrides Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile, ByVal Token As CancellationToken) As SFile
|
||||||
Return M3U8.Download(URL, DestinationFile, Token, Progress, Not IsSingleObjectDownload)
|
Return M3U8.Download(URL, DestinationFile, Token, Progress, Not IsSingleObjectDownload)
|
||||||
End Function
|
End Function
|
||||||
|
Protected Overrides Function DownloadContentDefault_ConvertWebp(ByVal m As UserMedia, ByVal Process As Boolean) As SFile
|
||||||
|
Return DownloadContentDefault_ConvertWebp_TestImg(m, Process)
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
#Region "DownloadSingleObject"
|
#Region "DownloadSingleObject"
|
||||||
Protected Overrides Sub DownloadSingleObject_GetPosts(ByVal Data As IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
Protected Overrides Sub DownloadSingleObject_GetPosts(ByVal Data As IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Namespace API.Instagram
|
|||||||
Friend Const PageTokenRegexPatternDefault As String = "\[\],{""token"":""(.*?)""},\d+\]"
|
Friend Const PageTokenRegexPatternDefault As String = "\[\],{""token"":""(.*?)""},\d+\]"
|
||||||
Friend ReadOnly Regex_UserToken_dtsg As RParams = RParams.DMS("DTSGInitialData["":,.\[\]]*?{\s*.token.:\s*""([^""]+)", 1, EDP.ReturnValue)
|
Friend ReadOnly Regex_UserToken_dtsg As RParams = RParams.DMS("DTSGInitialData["":,.\[\]]*?{\s*.token.:\s*""([^""]+)", 1, EDP.ReturnValue)
|
||||||
Friend ReadOnly Regex_UserToken_lsd As RParams = RParams.DMS("LSD["":,.\[\]]*?{\s*.token.:\s*""([^""]+)", 1, EDP.ReturnValue)
|
Friend ReadOnly Regex_UserToken_lsd As RParams = RParams.DMS("LSD["":,.\[\]]*?{\s*.token.:\s*""([^""]+)", 1, EDP.ReturnValue)
|
||||||
|
Friend ReadOnly Regex_BlockVersionID As RParams = RParams.DMS("""versioningID"":""([^""]+)""", 1, EDP.ReturnValue)
|
||||||
Friend ReadOnly Regex_ProfileID As RParams = RParams.DMS("profilePage_(\d+)", 1, EDP.ReturnValue)
|
Friend ReadOnly Regex_ProfileID As RParams = RParams.DMS("profilePage_(\d+)", 1, EDP.ReturnValue)
|
||||||
Friend Sub UpdateResponser(ByVal Source As IResponse, ByRef Destination As Responser, ByVal UpdateWwwClaim As Boolean)
|
Friend Sub UpdateResponser(ByVal Source As IResponse, ByRef Destination As Responser, ByVal UpdateWwwClaim As Boolean)
|
||||||
Const r_wwwClaimName$ = "x-ig-set-www-claim"
|
Const r_wwwClaimName$ = "x-ig-set-www-claim"
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ Namespace API.Instagram
|
|||||||
Friend Const Header_Browser As String = "Sec-Ch-Ua"
|
Friend Const Header_Browser As String = "Sec-Ch-Ua"
|
||||||
Friend Const Header_BrowserExt As String = "Sec-Ch-Ua-Full-Version-List"
|
Friend Const Header_BrowserExt As String = "Sec-Ch-Ua-Full-Version-List"
|
||||||
Friend Const Header_Platform_Verion As String = "Sec-Ch-Ua-Platform-Version"
|
Friend Const Header_Platform_Verion As String = "Sec-Ch-Ua-Platform-Version"
|
||||||
<PropertyOption(ControlText:="x-csrftoken", ControlToolTip:="Can be automatically extracted from cookies", IsAuth:=True, AllowNull:=True), PClonable(Clone:=False)>
|
<PropertyOption(ControlText:="x-csrftoken", ControlToolTip:="Can be automatically extracted from cookies", IsAuth:=True, AllowNull:=False), PClonable(Clone:=False)>
|
||||||
Friend ReadOnly Property HH_CSRF_TOKEN As PropertyValue
|
Friend ReadOnly Property HH_CSRF_TOKEN As PropertyValue
|
||||||
<CookieValueExtractor(NameOf(HH_CSRF_TOKEN))>
|
<CookieValueExtractor(NameOf(HH_CSRF_TOKEN))>
|
||||||
Private Function GetValueFromCookies(ByVal PropName As String, ByVal c As CookieKeeper) As String
|
Private Function GetValueFromCookies(ByVal PropName As String, ByVal c As CookieKeeper) As String
|
||||||
@@ -78,7 +78,7 @@ Namespace API.Instagram
|
|||||||
End Function
|
End Function
|
||||||
<PropertyOption(ControlText:="x-ig-app-id", IsAuth:=True, AllowNull:=False), PClonable(Clone:=False)>
|
<PropertyOption(ControlText:="x-ig-app-id", IsAuth:=True, AllowNull:=False), PClonable(Clone:=False)>
|
||||||
Friend ReadOnly Property HH_IG_APP_ID As PropertyValue
|
Friend ReadOnly Property HH_IG_APP_ID As PropertyValue
|
||||||
<PropertyOption(ControlText:="x-asbd-id", IsAuth:=True, AllowNull:=True), PClonable(Clone:=False)>
|
<PropertyOption(ControlText:="x-asbd-id", IsAuth:=True, AllowNull:=False), PClonable(Clone:=False)>
|
||||||
Friend ReadOnly Property HH_ASBD_ID As PropertyValue
|
Friend ReadOnly Property HH_ASBD_ID As PropertyValue
|
||||||
'PropertyOption(ControlText:="x-ig-www-claim", IsAuth:=True, AllowNull:=True)
|
'PropertyOption(ControlText:="x-ig-www-claim", IsAuth:=True, AllowNull:=True)
|
||||||
<PClonable(Clone:=False)>
|
<PClonable(Clone:=False)>
|
||||||
@@ -89,16 +89,16 @@ Namespace API.Instagram
|
|||||||
Return Not v.IsEmptyString AndAlso v = "0"
|
Return Not v.IsEmptyString AndAlso v = "0"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
<PropertyOption(ControlText:="sec-ch-ua", IsAuth:=True, AllowNull:=True,
|
<PropertyOption(ControlText:="sec-ch-ua", IsAuth:=True, AllowNull:=False,
|
||||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua), PClonable, PXML(OnlyForChecked:=True)>
|
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua), PClonable, PXML(OnlyForChecked:=True)>
|
||||||
Private ReadOnly Property HH_BROWSER As PropertyValue
|
Private ReadOnly Property HH_BROWSER As PropertyValue
|
||||||
<PropertyOption(ControlText:="sec-ch-ua-full", ControlToolTip:="sec-ch-ua-full-version-list", IsAuth:=True, AllowNull:=True,
|
<PropertyOption(ControlText:="sec-ch-ua-full", ControlToolTip:="sec-ch-ua-full-version-list", IsAuth:=True, AllowNull:=False,
|
||||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_full_version_list), PClonable, PXML(OnlyForChecked:=True)>
|
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_full_version_list), PClonable, PXML(OnlyForChecked:=True)>
|
||||||
Private ReadOnly Property HH_BROWSER_EXT As PropertyValue
|
Private ReadOnly Property HH_BROWSER_EXT As PropertyValue
|
||||||
<PropertyOption(ControlText:="sec-ch-ua-platform-ver", ControlToolTip:="sec-ch-ua-platform-version", IsAuth:=True, AllowNull:=True, LeftOffset:=135,
|
<PropertyOption(ControlText:="sec-ch-ua-platform-ver", ControlToolTip:="sec-ch-ua-platform-version", IsAuth:=True, AllowNull:=False, LeftOffset:=135,
|
||||||
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_platform_version), PClonable, PXML(OnlyForChecked:=True)>
|
InheritanceName:=SettingsCLS.HEADER_DEF_sec_ch_ua_platform_version), PClonable, PXML(OnlyForChecked:=True)>
|
||||||
Private ReadOnly Property HH_PLATFORM As PropertyValue
|
Private ReadOnly Property HH_PLATFORM As PropertyValue
|
||||||
<PropertyOption(ControlText:="UserAgent", IsAuth:=True, AllowNull:=True,
|
<PropertyOption(ControlText:="UserAgent", IsAuth:=True, AllowNull:=False,
|
||||||
InheritanceName:=SettingsCLS.HEADER_DEF_UserAgent), PClonable, PXML(OnlyForChecked:=True)>
|
InheritanceName:=SettingsCLS.HEADER_DEF_UserAgent), PClonable, PXML(OnlyForChecked:=True)>
|
||||||
Private ReadOnly Property HH_USER_AGENT As PropertyValue
|
Private ReadOnly Property HH_USER_AGENT As PropertyValue
|
||||||
Friend Overrides Function BaseAuthExists() As Boolean
|
Friend Overrides Function BaseAuthExists() As Boolean
|
||||||
@@ -146,7 +146,7 @@ Namespace API.Instagram
|
|||||||
<Provider(NameOf(HH_IG_WWW_CLAIM_UPDATE_INTERVAL), FieldsChecker:=True)>
|
<Provider(NameOf(HH_IG_WWW_CLAIM_UPDATE_INTERVAL), FieldsChecker:=True)>
|
||||||
Private ReadOnly Property TokenUpdateIntervalProvider As IFormatProvider
|
Private ReadOnly Property TokenUpdateIntervalProvider As IFormatProvider
|
||||||
#End Region
|
#End Region
|
||||||
<PropertyOption(ControlText:="Use GraphQL to download", IsAuth:=True), PXML, PClonable>
|
<PropertyOption(ControlText:="Use GraphQL to download", ControlToolTip:="This feature is in test mode", IsAuth:=True), PXML, PClonable>
|
||||||
Friend ReadOnly Property USE_GQL As PropertyValue
|
Friend ReadOnly Property USE_GQL As PropertyValue
|
||||||
<PropertyOption(ControlText:="Use GraphQL to download user data", IsAuth:=True), PXML, PClonable, HiddenControl>
|
<PropertyOption(ControlText:="Use GraphQL to download user data", IsAuth:=True), PXML, PClonable, HiddenControl>
|
||||||
Friend ReadOnly Property USE_GQL_UserData As PropertyValue
|
Friend ReadOnly Property USE_GQL_UserData As PropertyValue
|
||||||
|
|||||||
@@ -27,13 +27,17 @@ Namespace API.Instagram
|
|||||||
Token_dtsg = String.Empty
|
Token_dtsg = String.Empty
|
||||||
Token_lsd = String.Empty
|
Token_lsd = String.Empty
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Property BlockVersionID As String = String.Empty
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Headers"
|
#Region "Headers"
|
||||||
Friend Const GQL_HEADER_FB_FRINDLY_NAME As String = "x-fb-friendly-name"
|
Friend Const GQL_HEADER_FB_FRINDLY_NAME As String = "x-fb-friendly-name"
|
||||||
Friend Const GQL_HEADER_FB_LSD As String = "x-fb-lsd"
|
Friend Const GQL_HEADER_FB_LSD As String = "x-fb-lsd"
|
||||||
|
Friend Const GQL_HEADER_BLOCK_VERSION_ID As String = "x-bloks-version-id"
|
||||||
|
Friend Const GQL_HEADER_ROOT_FIELD_NAME As String = "x-root-field-name"
|
||||||
|
Friend Const GQL_HEADER_ROOT_FIELD_NAME_Value As String = "fetch__XDTUserDict"
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Data constants"
|
#Region "Data constants"
|
||||||
Private Const GQL_UserData_DocId As String = "7381344031985950"
|
Private Const GQL_UserData_DocId As String = "35710877621861450" '"7381344031985950"
|
||||||
Private Const GQL_UserData_FbFriendlyName As String = "PolarisProfilePageContentQuery"
|
Private Const GQL_UserData_FbFriendlyName As String = "PolarisProfilePageContentQuery"
|
||||||
|
|
||||||
Private Const GQL_Highlights_DocId As String = "8298007123561120"
|
Private Const GQL_Highlights_DocId As String = "8298007123561120"
|
||||||
@@ -61,18 +65,31 @@ Namespace API.Instagram
|
|||||||
Private Const GQL_URL_Q As String = "https://www.instagram.com/graphql/query"
|
Private Const GQL_URL_Q As String = "https://www.instagram.com/graphql/query"
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Download functions"
|
#Region "Download functions"
|
||||||
Protected Sub UpdateHeadersGQL(ByVal HeaderValue As String)
|
Protected Sub UpdateHeadersGQL(ByVal HeaderValue As String, Optional ByVal Add As Boolean = True)
|
||||||
Responser.Headers.Add(GQL_HEADER_FB_FRINDLY_NAME, HeaderValue)
|
With Responser.Headers
|
||||||
Responser.Headers.Add(GQL_HEADER_FB_LSD, Token_lsd)
|
If Add Then
|
||||||
|
.Add(GQL_HEADER_FB_FRINDLY_NAME, HeaderValue)
|
||||||
|
.Add(GQL_HEADER_FB_LSD, Token_lsd)
|
||||||
|
'.Add(GQL_HEADER_BLOCK_VERSION_ID, BlockVersionID)
|
||||||
|
'.Add(GQL_HEADER_ROOT_FIELD_NAME, GQL_HEADER_ROOT_FIELD_NAME_Value)
|
||||||
|
Else
|
||||||
|
.Remove(GQL_HEADER_FB_FRINDLY_NAME)
|
||||||
|
.Remove(GQL_HEADER_FB_LSD)
|
||||||
|
'.Remove(GQL_HEADER_BLOCK_VERSION_ID)
|
||||||
|
'.Remove(GQL_HEADER_ROOT_FIELD_NAME)
|
||||||
|
End If
|
||||||
|
End With
|
||||||
End Sub
|
End Sub
|
||||||
'<Obsolete("Use 'GET' function: 'GetUserData'", False)>
|
'<Obsolete("Use 'GET' function: 'GetUserData'", False)>
|
||||||
Private Function GetUserDataGQL(ByVal Token As CancellationToken) As String
|
Private Function GetUserDataGQL(ByVal Token As CancellationToken) As String
|
||||||
|
'Dim vars$ = String.Format(GQL_URL_PATTERN_VARS, GQL_UserData_DocId, Token_lsd, Token_dtsg_Var, GQL_UserData_FbFriendlyName,
|
||||||
|
' SymbolsConverter.ASCII.EncodeSymbolsOnly("{" & $"""id"":""{ID}"",""relay_header"":false,""render_surface"":""PROFILE""" & "}"))
|
||||||
Dim vars$ = String.Format(GQL_URL_PATTERN_VARS, GQL_UserData_DocId, Token_lsd, Token_dtsg_Var, GQL_UserData_FbFriendlyName,
|
Dim vars$ = String.Format(GQL_URL_PATTERN_VARS, GQL_UserData_DocId, Token_lsd, Token_dtsg_Var, GQL_UserData_FbFriendlyName,
|
||||||
SymbolsConverter.ASCII.EncodeSymbolsOnly("{" & $"""id"":""{ID}"",""relay_header"":false,""render_surface"":""PROFILE""" & "}"))
|
SymbolsConverter.ASCII.EncodeSymbolsOnly("{" & $"""enable_integrity_filters"":true,""id"":""{ID}"",""__relay_internal__pv__PolarisCannesGuardianExperienceEnabledrelayprovider"":true,""__relay_internal__pv__PolarisCASB976ProfileEnabledrelayprovider"":false,""__relay_internal__pv__PolarisWebSchoolsEnabledrelayprovider"":false,""__relay_internal__pv__PolarisRepostsConsumptionEnabledrelayprovider"":true" & "}"))
|
||||||
UpdateRequestNumber()
|
UpdateRequestNumber()
|
||||||
ChangeResponserMode(True)
|
ChangeResponserMode(True)
|
||||||
UpdateHeadersGQL(GQL_UserData_FbFriendlyName)
|
UpdateHeadersGQL(GQL_UserData_FbFriendlyName)
|
||||||
Dim r$ = Responser.GetResponse(GQL_URL, vars)
|
Dim r$ = Responser.GetResponse(GQL_URL_Q, vars)
|
||||||
Return r
|
Return r
|
||||||
'If Not r.IsEmptyString Then
|
'If Not r.IsEmptyString Then
|
||||||
' Using j As EContainer = JsonDocument.Parse(r)
|
' Using j As EContainer = JsonDocument.Parse(r)
|
||||||
@@ -344,6 +361,7 @@ Namespace API.Instagram
|
|||||||
.MatchSub = 1
|
.MatchSub = 1
|
||||||
.WhatGet = RegexReturn.Value
|
.WhatGet = RegexReturn.Value
|
||||||
End With
|
End With
|
||||||
|
BlockVersionID = RegexReplace(r, Regex_BlockVersionID)
|
||||||
For Each tt In tokens
|
For Each tt In tokens
|
||||||
If Not Token_lsd.IsEmptyString And Not Token_dtsg.IsEmptyString Then
|
If Not Token_lsd.IsEmptyString And Not Token_dtsg.IsEmptyString Then
|
||||||
Exit For
|
Exit For
|
||||||
@@ -362,6 +380,7 @@ Namespace API.Instagram
|
|||||||
Case 1
|
Case 1
|
||||||
Token_dtsg = RegexReplace(r, Regex_UserToken_dtsg)
|
Token_dtsg = RegexReplace(r, Regex_UserToken_dtsg)
|
||||||
Token_lsd = RegexReplace(r, Regex_UserToken_lsd)
|
Token_lsd = RegexReplace(r, Regex_UserToken_lsd)
|
||||||
|
BlockVersionID = RegexReplace(r, Regex_BlockVersionID)
|
||||||
End Select
|
End Select
|
||||||
If Not ValidateBaseTokens() And Attempt = 0 Then ParseTokens(r, Attempt + 1)
|
If Not ValidateBaseTokens() And Attempt = 0 Then ParseTokens(r, Attempt + 1)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -362,8 +362,7 @@ Namespace API.Instagram
|
|||||||
With .Headers
|
With .Headers
|
||||||
.Remove("origin")
|
.Remove("origin")
|
||||||
.Remove("authority")
|
.Remove("authority")
|
||||||
.Remove(GQL_HEADER_FB_FRINDLY_NAME)
|
UpdateHeadersGQL(String.Empty, False)
|
||||||
.Remove(GQL_HEADER_FB_LSD)
|
|
||||||
Dim hv$ = MySiteSettings.Responser.Headers.Value(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchDest)).IfNullOrEmpty("empty")
|
Dim hv$ = MySiteSettings.Responser.Headers.Value(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchDest)).IfNullOrEmpty("empty")
|
||||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchDest, hv))
|
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchDest, hv))
|
||||||
hv = MySiteSettings.Responser.Headers.Value(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchMode)).IfNullOrEmpty("cors")
|
hv = MySiteSettings.Responser.Headers.Value(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecFetchMode)).IfNullOrEmpty("cors")
|
||||||
@@ -702,7 +701,7 @@ Namespace API.Instagram
|
|||||||
If Not IsSavedPosts Then
|
If Not IsSavedPosts Then
|
||||||
If _UseGQL And Cursor.IsEmptyString And Not Section = Sections.SavedPosts Then UpdateTokens(True)
|
If _UseGQL And Cursor.IsEmptyString And Not Section = Sections.SavedPosts Then UpdateTokens(True)
|
||||||
If ID.IsEmptyString Or __idIsEmpty Or Not IsVerifiedProfile_Checked Then GetUserData(Token)
|
If ID.IsEmptyString Or __idIsEmpty Or Not IsVerifiedProfile_Checked Then GetUserData(Token)
|
||||||
If ID.IsEmptyString Then UserExists = False : _ForceSaveUserInfoOnException = True : Throw New Plugin.ExitException("can't get user ID")
|
If ID.IsEmptyString Then UserExists = False : _ForceSaveUserInfo = True : Throw New Plugin.ExitException("can't get user ID")
|
||||||
If ForceUpdateUserName Then GetUserNameById()
|
If ForceUpdateUserName Then GetUserNameById()
|
||||||
If ForceUpdateUserInfo Then GetUserData(Token)
|
If ForceUpdateUserInfo Then GetUserData(Token)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -17,5 +17,23 @@ Namespace API.OnlyFans
|
|||||||
{{"files", "full", "url"}}
|
{{"files", "full", "url"}}
|
||||||
}
|
}
|
||||||
Friend Property Rules As DynamicRulesEnv
|
Friend Property Rules As DynamicRulesEnv
|
||||||
|
Friend Class CookieDateProvider : Implements ICustomProvider
|
||||||
|
Private ReadOnly DefaultProvider As IFormatProvider
|
||||||
|
Friend Sub New()
|
||||||
|
DefaultProvider = PersonalUtilities.Tools.Web.Cookies.CookieKeeper.DateProviderDefault
|
||||||
|
End Sub
|
||||||
|
Friend Function Convert(ByVal Value As Object, ByVal DestinationType As Type, ByVal Provider As IFormatProvider,
|
||||||
|
Optional ByVal NothingArg As Object = Nothing, Optional ByVal e As ErrorsDescriber = Nothing) As Object Implements ICustomProvider.Convert
|
||||||
|
If Not IsNothing(Value) AndAlso TypeOf Value Is String AndAlso Not CStr(Value).IsEmptyString Then
|
||||||
|
Dim v$ = Value
|
||||||
|
If v.Contains(",_") Then v = v.Substring(0, v.IndexOf(",_"))
|
||||||
|
Value = v
|
||||||
|
End If
|
||||||
|
Return AConvert(Of Date)(Value, DefaultProvider, Nothing)
|
||||||
|
End Function
|
||||||
|
Private Function GetFormat(ByVal FormatType As Type) As Object Implements IFormatProvider.GetFormat
|
||||||
|
Throw New NotImplementedException("'GetFormat' is not available in the 'CookieDateProvider'")
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
End Module
|
End Module
|
||||||
End Namespace
|
End Namespace
|
||||||
@@ -253,6 +253,7 @@ Namespace API.OnlyFans
|
|||||||
.CookiesUpdateMode = CookieKeeper.UpdateModes.Disabled
|
.CookiesUpdateMode = CookieKeeper.UpdateModes.Disabled
|
||||||
.Cookies.ChangedAllowInternalDrop = False
|
.Cookies.ChangedAllowInternalDrop = False
|
||||||
.Cookies.Changed = False
|
.Cookies.Changed = False
|
||||||
|
.Cookies.DateProvider = New CookieDateProvider
|
||||||
With .Headers
|
With .Headers
|
||||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecChUaPlatform))
|
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecChUaPlatform))
|
||||||
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecChUaMobile))
|
.Add(HttpHeaderCollection.GetSpecialHeader(MyHeaderTypes.SecChUaMobile))
|
||||||
|
|||||||
@@ -24,7 +24,12 @@ Namespace API.PornHub
|
|||||||
0, RegexOptions.Singleline, RegexReturn.List, EDP.ReturnValue, UnicodeHexConverter)
|
0, RegexOptions.Singleline, RegexReturn.List, EDP.ReturnValue, UnicodeHexConverter)
|
||||||
Friend ReadOnly RegexVideo_Video_VideoKey As RParams = RParams.DMS("viewkey=([\w\d]+)", 1, EDP.ReturnValue)
|
Friend ReadOnly RegexVideo_Video_VideoKey As RParams = RParams.DMS("viewkey=([\w\d]+)", 1, EDP.ReturnValue)
|
||||||
Friend ReadOnly RegexVideoPageTitle As RParams = RParams.DMS("meta (property|name)=""[^:]+?:title"" content=""([^""]+)""", 2, EDP.ReturnValue)
|
Friend ReadOnly RegexVideoPageTitle As RParams = RParams.DMS("meta (property|name)=""[^:]+?:title"" content=""([^""]+)""", 2, EDP.ReturnValue)
|
||||||
|
Friend ReadOnly RegexVideoPageTitle2 As RParams = RParams.DMS("\<title\>([^\<]+)\</title>", 1, EDP.ReturnValue)
|
||||||
|
Friend ReadOnly RegexVideoPageTitle3 As RParams = RParams.DMS("videoTitle...([^""]+)", 1, EDP.ReturnValue)
|
||||||
|
Friend ReadOnly RegexVideoPageTitle_NoTitle As RParams = RParams.DMS("(?<=(\=|/))([\w\d]+)(?=(\?|\&|\Z))", 2, EDP.ReturnValue)
|
||||||
Friend ReadOnly RegexDataToken As RParams = RParams.DMS("data-token=""([^""]+)", 1, EDP.ReturnValue)
|
Friend ReadOnly RegexDataToken As RParams = RParams.DMS("data-token=""([^""]+)", 1, EDP.ReturnValue)
|
||||||
|
Friend ReadOnly RegexVideoAdditImg As RParams = RParams.DMS("twitter.image..content=""([^""]+)""", 1, EDP.ReturnValue)
|
||||||
|
Friend ReadOnly RegexVideoAdditImg2 As RParams = RParams.DMS("thumbnailUrl""[^""]*?""([^""]+)""", 1, EDP.ReturnValue)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Declarations M3U8"
|
#Region "Declarations M3U8"
|
||||||
Friend ReadOnly Regex_M3U8_FilesList As RParams = RParams.DM("RESOLUTION=\d+x(\d+).*?[\r\n]*?(.+?m3u8.*)", 0, RegexReturn.List, EDP.ReturnValue)
|
Friend ReadOnly Regex_M3U8_FilesList As RParams = RParams.DM("RESOLUTION=\d+x(\d+).*?[\r\n]*?(.+?m3u8.*)", 0, RegexReturn.List, EDP.ReturnValue)
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Namespace API.PornHub
|
|||||||
If Not r.IsEmptyString Then
|
If Not r.IsEmptyString Then
|
||||||
Dim files As List(Of Sizes) = RegexFields(Of Sizes)(r, {Regex_M3U8_FilesList}, {1, 2}, EDP.ReturnValue)
|
Dim files As List(Of Sizes) = RegexFields(Of Sizes)(r, {Regex_M3U8_FilesList}, {1, 2}, EDP.ReturnValue)
|
||||||
Dim file$
|
Dim file$
|
||||||
If files.ListExists Then files.RemoveAll(Function(f) f.Value = 0 Or (Not DownloadUHD And f.Value > 1080))
|
If files.ListExists Then files.RemoveAll(Function(f) f.Value = 0 Or (Not DownloadUHD And f.Value > 1080) Or (f.Data.IsEmptyString OrElse f.Data.Contains("""")))
|
||||||
If files.ListExists Then
|
If files.ListExists Then
|
||||||
files.Sort()
|
files.Sort()
|
||||||
file = files(0).Data
|
file = files(0).Data
|
||||||
|
|||||||
@@ -6,13 +6,14 @@
|
|||||||
'
|
'
|
||||||
' This program is distributed in the hope that it will be useful,
|
' This program is distributed in the hope that it will be useful,
|
||||||
' but WITHOUT ANY WARRANTY
|
' but WITHOUT ANY WARRANTY
|
||||||
|
Imports System.Security.Policy
|
||||||
Imports System.Threading
|
Imports System.Threading
|
||||||
Imports SCrawler.API.Base
|
|
||||||
Imports SCrawler.API.YouTube.Objects
|
|
||||||
Imports PersonalUtilities.Functions.XML
|
|
||||||
Imports PersonalUtilities.Functions.RegularExpressions
|
Imports PersonalUtilities.Functions.RegularExpressions
|
||||||
|
Imports PersonalUtilities.Functions.XML
|
||||||
Imports PersonalUtilities.Tools.Web.Clients
|
Imports PersonalUtilities.Tools.Web.Clients
|
||||||
Imports PersonalUtilities.Tools.Web.Documents.JSON
|
Imports PersonalUtilities.Tools.Web.Documents.JSON
|
||||||
|
Imports SCrawler.API.Base
|
||||||
|
Imports SCrawler.API.YouTube.Objects
|
||||||
Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
Imports UTypes = SCrawler.API.Base.UserMedia.Types
|
||||||
Namespace API.PornHub
|
Namespace API.PornHub
|
||||||
Friend Class UserData : Inherits UserDataBase : Implements IPSite
|
Friend Class UserData : Inherits UserDataBase : Implements IPSite
|
||||||
@@ -96,6 +97,9 @@ Namespace API.PornHub
|
|||||||
Return Me
|
Return Me
|
||||||
End Function
|
End Function
|
||||||
End Structure
|
End Structure
|
||||||
|
Private Structure PHObj : Implements IThumbList
|
||||||
|
Friend Property Thumbs As List(Of String) Implements IThumbList.Thumbs
|
||||||
|
End Structure
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Enums"
|
#Region "Enums"
|
||||||
Private Enum VideoTypes
|
Private Enum VideoTypes
|
||||||
@@ -258,7 +262,6 @@ Namespace API.PornHub
|
|||||||
Private _PageVideosRepeat As Integer = 0
|
Private _PageVideosRepeat As Integer = 0
|
||||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||||
Try
|
Try
|
||||||
UpdateM3U8URLS = False
|
|
||||||
PlaylistToken = String.Empty
|
PlaylistToken = String.Empty
|
||||||
Responser.ResetStatus()
|
Responser.ResetStatus()
|
||||||
_PageVideosRepeat = 0
|
_PageVideosRepeat = 0
|
||||||
@@ -648,6 +651,21 @@ Namespace API.PornHub
|
|||||||
#End Region
|
#End Region
|
||||||
#End Region
|
#End Region
|
||||||
#Region "ReparseVideo"
|
#Region "ReparseVideo"
|
||||||
|
Private Function GetVideoTitle(ByVal r As String, ByVal URL As String) As String
|
||||||
|
Dim tmpName$ = String.Empty
|
||||||
|
Dim rr As RParams
|
||||||
|
For i As Byte = 0 To 3
|
||||||
|
Select Case i
|
||||||
|
Case 0 : rr = RegexVideoPageTitle
|
||||||
|
Case 1 : rr = RegexVideoPageTitle2
|
||||||
|
Case 2 : rr = RegexVideoPageTitle3
|
||||||
|
Case Else : rr = RegexVideoPageTitle_NoTitle
|
||||||
|
End Select
|
||||||
|
tmpName = RegexReplace(IIf(i = 3, URL, r), rr)
|
||||||
|
If Not tmpName.IsEmptyString Then Exit For
|
||||||
|
Next
|
||||||
|
Return tmpName
|
||||||
|
End Function
|
||||||
Protected Overloads Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
Protected Overloads Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
||||||
If IsSubscription Then
|
If IsSubscription Then
|
||||||
ReparseVideoSubscriptions(Token)
|
ReparseVideoSubscriptions(Token)
|
||||||
@@ -663,6 +681,7 @@ Namespace API.PornHub
|
|||||||
If _TempMediaList.Count > 0 AndAlso _TempMediaList.Exists(Function(tm) tm.Type = UTypes.VideoPre) Then
|
If _TempMediaList.Count > 0 AndAlso _TempMediaList.Exists(Function(tm) tm.Type = UTypes.VideoPre) Then
|
||||||
Dim m As UserMedia
|
Dim m As UserMedia
|
||||||
Dim r$, NewUrl$, tmpName$
|
Dim r$, NewUrl$, tmpName$
|
||||||
|
Dim isCurl%
|
||||||
ProgressPre.ChangeMax(_TempMediaList.Count)
|
ProgressPre.ChangeMax(_TempMediaList.Count)
|
||||||
For i% = _TempMediaList.Count - 1 To 0 Step -1
|
For i% = _TempMediaList.Count - 1 To 0 Step -1
|
||||||
ProgressPre.Perform()
|
ProgressPre.Perform()
|
||||||
@@ -671,27 +690,30 @@ Namespace API.PornHub
|
|||||||
ThrowAny(Token)
|
ThrowAny(Token)
|
||||||
Try
|
Try
|
||||||
URL = m.URL
|
URL = m.URL
|
||||||
r = Responser.Curl(URL)
|
For isCurl = 1 To 0 Step -1
|
||||||
If Not r.IsEmptyString Then
|
If CBool(isCurl) Then r = Responser.Curl(URL) Else r = Responser.GetResponse(URL)
|
||||||
NewUrl = CreateVideoURL(r)
|
If Not r.IsEmptyString Then
|
||||||
If NewUrl.IsEmptyString Then
|
NewUrl = CreateVideoURL(r)
|
||||||
Throw New Exception With {.HelpLink = ERR_NEW_URL}
|
If NewUrl.IsEmptyString Then
|
||||||
Else
|
Throw New Exception With {.HelpLink = ERR_NEW_URL}
|
||||||
m.URL = NewUrl
|
Else
|
||||||
m.Type = UTypes.m3u8
|
m.URL = NewUrl
|
||||||
If CreateFileName Then
|
m.Type = UTypes.m3u8
|
||||||
tmpName = RegexReplace(r, RegexVideoPageTitle)
|
If CreateFileName Then
|
||||||
If Not tmpName.IsEmptyString Then
|
tmpName = GetVideoTitle(r, URL)
|
||||||
If Not Data Is Nothing Then Data.Title = tmpName
|
If Not tmpName.IsEmptyString Then
|
||||||
m.File.Name = TitleHtmlConverter(tmpName)
|
If Not Data Is Nothing Then Data.Title = tmpName
|
||||||
m.File.Extension = "mp4"
|
m.File.Name = TitleHtmlConverter(tmpName)
|
||||||
|
m.File.Extension = "mp4"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
_TempMediaList(i) = m
|
||||||
End If
|
End If
|
||||||
_TempMediaList(i) = m
|
Exit For
|
||||||
|
ElseIf Not CBool(isCurl) Then
|
||||||
|
_TempMediaList.RemoveAt(i)
|
||||||
End If
|
End If
|
||||||
Else
|
Next
|
||||||
_TempMediaList.RemoveAt(i)
|
|
||||||
End If
|
|
||||||
Catch mid_ex As Exception
|
Catch mid_ex As Exception
|
||||||
If mid_ex.HelpLink = ERR_NEW_URL OrElse DownloadingException(mid_ex, "") = 1 Then
|
If mid_ex.HelpLink = ERR_NEW_URL OrElse DownloadingException(mid_ex, "") = 1 Then
|
||||||
m.State = UserMedia.States.Missing
|
m.State = UserMedia.States.Missing
|
||||||
@@ -713,6 +735,10 @@ Namespace API.PornHub
|
|||||||
Dim m As UserMedia
|
Dim m As UserMedia
|
||||||
Dim r$, URL$, tmpName$, thumb$
|
Dim r$, URL$, tmpName$, thumb$
|
||||||
Dim c% = 0
|
Dim c% = 0
|
||||||
|
Dim thumbObj As PHObj
|
||||||
|
Dim thumbAdded As Boolean
|
||||||
|
Dim rp As RParams
|
||||||
|
Dim rpa() As RParams = {RegexVideoAdditImg, RegexVideoAdditImg2}
|
||||||
Dim rErr As New ErrorsDescriber(EDP.ReturnValue)
|
Dim rErr As New ErrorsDescriber(EDP.ReturnValue)
|
||||||
Progress.Maximum += _TempMediaList.Count
|
Progress.Maximum += _TempMediaList.Count
|
||||||
For i% = _TempMediaList.Count - 1 To 0 Step -1
|
For i% = _TempMediaList.Count - 1 To 0 Step -1
|
||||||
@@ -727,10 +753,24 @@ Namespace API.PornHub
|
|||||||
If Not r.IsEmptyString Then
|
If Not r.IsEmptyString Then
|
||||||
m.Type = UTypes.m3u8
|
m.Type = UTypes.m3u8
|
||||||
|
|
||||||
|
thumbObj = New PHObj With {.Thumbs = New List(Of String)}
|
||||||
|
thumbAdded = False
|
||||||
thumb = RegexReplace(r, Regex_VideosThumb_OG_IMAGE)
|
thumb = RegexReplace(r, Regex_VideosThumb_OG_IMAGE)
|
||||||
If Not thumb.IsEmptyString Then m.URL = thumb
|
If Not thumb.IsEmptyString Then m.URL = thumb : thumbAdded = True
|
||||||
|
For Each rp In rpa
|
||||||
|
thumb = RegexReplace(r, rp)
|
||||||
|
If Not thumb.IsEmptyString Then
|
||||||
|
If Not thumbAdded Then
|
||||||
|
m.URL = thumb
|
||||||
|
thumbAdded = True
|
||||||
|
Else
|
||||||
|
thumbObj.Thumbs.Add(thumb)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If thumbObj.Thumbs.Count > 0 Then m.Object = thumbObj
|
||||||
|
|
||||||
tmpName = RegexReplace(r, RegexVideoPageTitle)
|
tmpName = GetVideoTitle(r, URL)
|
||||||
If Not tmpName.IsEmptyString Then
|
If Not tmpName.IsEmptyString Then
|
||||||
m.File.Name = TitleHtmlConverter(tmpName)
|
m.File.Name = TitleHtmlConverter(tmpName)
|
||||||
m.File.Extension = "mp4"
|
m.File.Extension = "mp4"
|
||||||
@@ -785,39 +825,34 @@ Namespace API.PornHub
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ProcessException(ex, Token, "missing data downloading error")
|
ProcessException(ex, Token, "missing data downloading error")
|
||||||
Finally
|
Finally
|
||||||
If rList.Count > 0 Then
|
ReparseMissing_ClearList(rList)
|
||||||
For i% = rList.Count - 1 To 0 Step -1 : _ContentList.RemoveAt(rList(i)) : Next
|
|
||||||
rList.Clear()
|
|
||||||
End If
|
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Download content"
|
#Region "Download content"
|
||||||
Private UpdateM3U8URLS As Boolean = False
|
|
||||||
Private UpdateM3U8URLS_Error As Boolean = False
|
|
||||||
Protected Overrides Sub DownloadContent(ByVal Token As CancellationToken)
|
Protected Overrides Sub DownloadContent(ByVal Token As CancellationToken)
|
||||||
Try : DownloadContentDefault(Token) : Finally : UpdateM3U8URLS = False : End Try
|
DownloadContentDefault(Token)
|
||||||
End Sub
|
End Sub
|
||||||
Protected Overloads Overrides Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile,
|
Protected Overloads Overrides Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile,
|
||||||
ByVal Token As CancellationToken) As SFile
|
ByVal Token As CancellationToken) As SFile
|
||||||
UpdateM3U8URLS_Error = False
|
Return DownloadM3U8(URL, Media, DestinationFile, Token, 0)
|
||||||
Return DownloadM3U8(URL, Media, DestinationFile, Token, UpdateM3U8URLS)
|
|
||||||
End Function
|
End Function
|
||||||
Private Overloads Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile,
|
Private Overloads Function DownloadM3U8(ByVal URL As String, ByVal Media As UserMedia, ByVal DestinationFile As SFile,
|
||||||
ByVal Token As CancellationToken, ByVal Second As Boolean) As SFile
|
ByVal Token As CancellationToken, ByVal Round As Integer) As SFile
|
||||||
|
Const MaxRound% = 2
|
||||||
Try
|
Try
|
||||||
If Second Then
|
If Round > 0 Then
|
||||||
Dim r$ = Responser.Curl(Media.URL_BASE,, EDP.ReturnValue)
|
Dim r$ = Responser.Curl(Media.URL_BASE,, EDP.ReturnValue)
|
||||||
If Not r.IsEmptyString Then Media.URL = CreateVideoURL(r).IfNullOrEmpty(URL) : URL = Media.URL
|
If Not r.IsEmptyString Then Media.URL = CreateVideoURL(r).IfNullOrEmpty(URL) : URL = Media.URL
|
||||||
End If
|
End If
|
||||||
Dim f As SFile = M3U8.Download(URL, Responser, DestinationFile, DownloadUHD, Token, Progress, Not IsSingleObjectDownload)
|
Dim f As SFile = M3U8.Download(URL, Responser, DestinationFile, DownloadUHD, Token, Progress, Not IsSingleObjectDownload)
|
||||||
If Not f.Exists And Not Second Then UpdateM3U8URLS = True : f = DownloadM3U8(URL, Media, DestinationFile, Token, True)
|
If Not f.Exists Then f = Nothing
|
||||||
|
If f.IsEmptyString And Round < MaxRound Then f = DownloadM3U8(URL, Media, DestinationFile, Token, Round + 1)
|
||||||
Return f
|
Return f
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If Not UpdateM3U8URLS_Error Then
|
If Round < MaxRound Then
|
||||||
UpdateM3U8URLS_Error = True
|
|
||||||
Thread.Sleep(1000)
|
Thread.Sleep(1000)
|
||||||
Return DownloadM3U8(URL, Media, DestinationFile, Token, True)
|
Return DownloadM3U8(URL, Media, DestinationFile, Token, Round + 1)
|
||||||
End If
|
End If
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
@@ -917,7 +952,6 @@ Namespace API.PornHub
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "DownloadSingleObject"
|
#Region "DownloadSingleObject"
|
||||||
Protected Overrides Sub DownloadSingleObject_GetPosts(ByVal Data As IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
Protected Overrides Sub DownloadSingleObject_GetPosts(ByVal Data As IYouTubeMediaContainer, ByVal Token As CancellationToken)
|
||||||
UpdateM3U8URLS = False
|
|
||||||
_TempMediaList.Add(New UserMedia(Data.URL, UTypes.VideoPre))
|
_TempMediaList.Add(New UserMedia(Data.URL, UTypes.VideoPre))
|
||||||
ReparseVideo(Token, True, Data)
|
ReparseVideo(Token, True, Data)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Namespace API.PornHub
|
|||||||
DownloadGifs = Not v = CheckState.Unchecked
|
DownloadGifs = Not v = CheckState.Unchecked
|
||||||
MySettings = s
|
MySettings = s
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overrides Sub Apply(ByRef u As IPSite)
|
Friend Overrides Sub Apply(ByRef u As UserDataBase)
|
||||||
MyBase.Apply(u)
|
MyBase.Apply(u)
|
||||||
With DirectCast(u, UserData)
|
With DirectCast(u, UserData)
|
||||||
.DownloadUHD = DownloadUHD
|
.DownloadUHD = DownloadUHD
|
||||||
|
|||||||
@@ -403,6 +403,30 @@ Namespace API.ThisVid
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "ReparseVideo"
|
#Region "ReparseVideo"
|
||||||
|
Protected Overrides Sub ReparseMissing(ByVal Token As CancellationToken)
|
||||||
|
Dim rList As New List(Of Integer)
|
||||||
|
Try
|
||||||
|
If Not IsSubscription And ContentMissingExists Then
|
||||||
|
Dim m As UserMedia
|
||||||
|
ProgressPre.ChangeMax(_ContentList.Count)
|
||||||
|
For i% = 0 To _ContentList.Count - 1
|
||||||
|
ProgressPre.Perform()
|
||||||
|
m = _ContentList(i)
|
||||||
|
If m.State = UserMedia.States.Missing AndAlso Not m.URL_BASE.IsEmptyString Then
|
||||||
|
ThrowAny(Token)
|
||||||
|
m.URL = m.URL_BASE
|
||||||
|
m.Type = UserMedia.Types.VideoPre
|
||||||
|
_TempMediaList.ListAddValue(m, LNC)
|
||||||
|
rList.Add(i)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ProcessException(ex, Token, "missing data downloading error")
|
||||||
|
Finally
|
||||||
|
ReparseMissing_ClearList(rList)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
Protected Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
Protected Overrides Sub ReparseVideo(ByVal Token As CancellationToken)
|
||||||
If IsSubscription Then
|
If IsSubscription Then
|
||||||
ReparseVideoSubscriptions(Token)
|
ReparseVideoSubscriptions(Token)
|
||||||
@@ -440,11 +464,12 @@ Namespace API.ThisVid
|
|||||||
If n.IsEmptyString Then n = u.Post.ID
|
If n.IsEmptyString Then n = u.Post.ID
|
||||||
If n.IsEmptyString Then n = "VideoFile"
|
If n.IsEmptyString Then n = "VideoFile"
|
||||||
u.File = $"{n}.mp4"
|
u.File = $"{n}.mp4"
|
||||||
If u.URL.IsEmptyString OrElse (Not u.Post.ID.IsEmptyString AndAlso _TempPostsList.Contains(u.Post.ID)) Then
|
If Not u.State = UserMedia.States.Missing AndAlso
|
||||||
|
(u.URL.IsEmptyString OrElse (Not u.Post.ID.IsEmptyString AndAlso _TempPostsList.Contains(u.Post.ID))) Then
|
||||||
_TempMediaList.RemoveAt(i)
|
_TempMediaList.RemoveAt(i)
|
||||||
Else
|
Else
|
||||||
u.Type = UserMedia.Types.Video
|
u.Type = UserMedia.Types.Video
|
||||||
_TempPostsList.Add(u.Post.ID)
|
_TempPostsList.ListAddValue(u.Post.ID, LNC)
|
||||||
_TempMediaList(i) = u
|
_TempMediaList(i) = u
|
||||||
End If
|
End If
|
||||||
e.Dispose()
|
e.Dispose()
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Namespace API.ThisVid
|
|||||||
DifferentFolders = u.DifferentFolders
|
DifferentFolders = u.DifferentFolders
|
||||||
MySettings = u.HOST.Source
|
MySettings = u.HOST.Source
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overrides Sub Apply(ByRef u As IPSite)
|
Friend Overrides Sub Apply(ByRef u As UserDataBase)
|
||||||
MyBase.Apply(u)
|
MyBase.Apply(u)
|
||||||
With DirectCast(u, UserData)
|
With DirectCast(u, UserData)
|
||||||
.DownloadPublic = DownloadPublic
|
.DownloadPublic = DownloadPublic
|
||||||
|
|||||||
@@ -184,7 +184,6 @@ Namespace API.ThreadsNet
|
|||||||
If uex.UserNotFound Then
|
If uex.UserNotFound Then
|
||||||
UserExists = False
|
UserExists = False
|
||||||
_ForceSaveUserInfo = True
|
_ForceSaveUserInfo = True
|
||||||
_ForceSaveUserInfoOnException = True
|
|
||||||
ElseIf ThrowEx Then
|
ElseIf ThrowEx Then
|
||||||
Throw New ExitException(uex.ErrMessage) With {.SimpleLogLine = True}
|
Throw New ExitException(uex.ErrMessage) With {.SimpleLogLine = True}
|
||||||
Else
|
Else
|
||||||
@@ -404,7 +403,6 @@ Namespace API.ThreadsNet
|
|||||||
If _IdChanged Then
|
If _IdChanged Then
|
||||||
If Not idStr.IsEmptyString Then UserDescriptionUpdate(idStr, True, True, True)
|
If Not idStr.IsEmptyString Then UserDescriptionUpdate(idStr, True, True, True)
|
||||||
_ForceSaveUserInfo = True
|
_ForceSaveUserInfo = True
|
||||||
_ForceSaveUserInfoOnException = True
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Return Valid
|
Return Valid
|
||||||
|
|||||||
@@ -192,10 +192,14 @@ Namespace API.TikTok
|
|||||||
UserCache.DisposeIfReady(False)
|
UserCache.DisposeIfReady(False)
|
||||||
UserCache = Nothing
|
UserCache = Nothing
|
||||||
End Sub
|
End Sub
|
||||||
|
Private StoryStatus As Boolean = True
|
||||||
|
Private StoryStatusFound As Boolean = False
|
||||||
Protected Overloads Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
Protected Overloads Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||||
ValidateCache()
|
ValidateCache()
|
||||||
|
StoryStatus = True
|
||||||
|
StoryStatusFound = False
|
||||||
If GetTimeline Then DownloadDataF(Sections.Timeline, Token)
|
If GetTimeline Then DownloadDataF(Sections.Timeline, Token)
|
||||||
If GetStoriesUser Then DownloadDataF(Sections.UserStories, Token)
|
If GetStoriesUser And StoryStatus Then DownloadDataF(Sections.UserStories, Token)
|
||||||
If GetReposts Then DownloadDataF(Sections.Reposts, Token)
|
If GetReposts Then DownloadDataF(Sections.Reposts, Token)
|
||||||
End Sub
|
End Sub
|
||||||
Protected Overloads Sub DownloadDataF(ByVal Section As Sections, ByVal Token As CancellationToken)
|
Protected Overloads Sub DownloadDataF(ByVal Section As Sections, ByVal Token As CancellationToken)
|
||||||
@@ -271,8 +275,8 @@ Namespace API.TikTok
|
|||||||
Else
|
Else
|
||||||
.TempPostsList = New List(Of String)
|
.TempPostsList = New List(Of String)
|
||||||
End If
|
End If
|
||||||
.Execute(CreateGDLCommand(URL, gdlCmd))
|
.Execute(CreateGDLCommand(URL, gdlCmd,,,, CObj(IIf(Section = Sections.Timeline, dateAfter, Nothing))))
|
||||||
If Not PhotosDownloaded Then _ForceSaveUserInfo = True : _ForceSaveUserInfoOnException = True
|
If Not PhotosDownloaded Then _ForceSaveUserInfo = True
|
||||||
PhotosDownloaded = True
|
PhotosDownloaded = True
|
||||||
End With
|
End With
|
||||||
End Using
|
End Using
|
||||||
@@ -436,6 +440,10 @@ Namespace API.TikTok
|
|||||||
End If
|
End If
|
||||||
End With
|
End With
|
||||||
Else
|
Else
|
||||||
|
If Section = Sections.Timeline And Not StoryStatusFound And j.ContainsF({0, "webapp.user-detail", "userInfo", "user"}, "UserStoryStatus") Then
|
||||||
|
StoryStatusFound = True
|
||||||
|
StoryStatus = j.ItemF({0, "webapp.user-detail", "userInfo", "user"}, "UserStoryStatus").Value.FromXML(Of Boolean)(False)
|
||||||
|
End If
|
||||||
With j.ItemF({0, "webapp.video-detail", "itemInfo", "itemStruct"})
|
With j.ItemF({0, "webapp.video-detail", "itemInfo", "itemStruct"})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
postID = .Value("id")
|
postID = .Value("id")
|
||||||
@@ -604,13 +612,17 @@ Namespace API.TikTok
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "GDL Support"
|
#Region "GDL Support"
|
||||||
Private Function CreateGDLCommand(ByVal URL As String, Optional ByVal SectionCommand As String = Nothing,
|
Private Function CreateGDLCommand(ByVal URL As String, Optional ByVal SectionCommand As String = Nothing,
|
||||||
Optional ByVal IsDownload As Boolean = False, Optional ByVal Output As SFile = Nothing) As String
|
Optional ByVal IsDownload As Boolean = False, Optional ByVal Output As SFile = Nothing,
|
||||||
|
Optional ByVal DateBefore As Date? = Nothing, Optional ByVal DateAfter As Date? = Nothing) As String
|
||||||
Dim command$ = $"""{Settings.GalleryDLFile}"" "
|
Dim command$ = $"""{Settings.GalleryDLFile}"" "
|
||||||
If Not IsDownload Then
|
If Not IsDownload Then
|
||||||
command &= "--verbose --no-download --no-skip --write-pages "
|
command &= "--verbose --no-download --no-skip --write-pages "
|
||||||
Else
|
Else
|
||||||
command &= $"--dest ""{Output.PathNoSeparator}"" "
|
command &= $"--dest ""{Output.PathNoSeparator}"" "
|
||||||
End If
|
End If
|
||||||
|
If DateBefore.HasValue Or DateAfter.HasValue Then
|
||||||
|
With If(DateAfter, DateBefore).Value : command &= $"--filter ""date {IIf(DateAfter.HasValue, ">", "<")} datetime({ .Year}, { .Month}, { .Day}) or terminate()"" " : End With
|
||||||
|
End If
|
||||||
If Not CBool(If(IsSingleObjectDownload, MySettings.UseParsedVideoDateSTD, MySettings.UseParsedVideoDate).Value) Then command &= "--no-mtime "
|
If Not CBool(If(IsSingleObjectDownload, MySettings.UseParsedVideoDateSTD, MySettings.UseParsedVideoDate).Value) Then command &= "--no-mtime "
|
||||||
command &= $"{SectionCommand} {URL}"
|
command &= $"{SectionCommand} {URL}"
|
||||||
Return command
|
Return command
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ Namespace API.Twitter
|
|||||||
With .ItemF({0, "content", "items", 0, "item", "itemContent", "tweet_results", "result", "tweet", "community_results", "result"})
|
With .ItemF({0, "content", "items", 0, "item", "itemContent", "tweet_results", "result", "tweet", "community_results", "result"})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
If ID = .Value("id_str") Then
|
If ID = .Value("id_str") Then
|
||||||
UserSiteNameUpdate(.Value("name"))
|
UserSiteNameUpdate(.Value("name"), True)
|
||||||
UserDescriptionUpdate(.Value("description"))
|
UserDescriptionUpdate(.Value("description"))
|
||||||
|
|
||||||
icon = .Value({"custom_banner_media", "media_info"}, "original_img_url").
|
icon = .Value({"custom_banner_media", "media_info"}, "original_img_url").
|
||||||
@@ -543,12 +543,12 @@ Namespace API.Twitter
|
|||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
If ID.IsEmptyString Then ID = .Value("rest_id")
|
If ID.IsEmptyString Then ID = .Value("rest_id")
|
||||||
icon = .Value({"avatar"}, "image_url")
|
icon = .Value({"avatar"}, "image_url")
|
||||||
UserSiteNameUpdate(.Value({"core"}, "name"))
|
UserSiteNameUpdate(.Value({"core"}, "name"), True)
|
||||||
Dim tScreenName$ = .Value({"core"}, "screen_name")
|
Dim tScreenName$ = .Value({"core"}, "screen_name")
|
||||||
With .Item({"legacy"})
|
With .Item({"legacy"})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
If onlyUpdateUser Then
|
If onlyUpdateUser Then
|
||||||
If Not NameTrue = tScreenName Or 1 = 1 Then
|
If Not NameTrue = tScreenName Then
|
||||||
Dim uStr$ = $"username changed from '{NameTrue}' to '{tScreenName}'"
|
Dim uStr$ = $"username changed from '{NameTrue}' to '{tScreenName}'"
|
||||||
LogError(Nothing, uStr)
|
LogError(Nothing, uStr)
|
||||||
UserDescriptionUpdate(uStr, True, True, True)
|
UserDescriptionUpdate(uStr, True, True, True)
|
||||||
@@ -556,7 +556,7 @@ Namespace API.Twitter
|
|||||||
NameTrue = tScreenName
|
NameTrue = tScreenName
|
||||||
End If
|
End If
|
||||||
If .Value("screen_name").IfNullOrEmpty(tScreenName).StringToLower = NameTrue.ToLower Then
|
If .Value("screen_name").IfNullOrEmpty(tScreenName).StringToLower = NameTrue.ToLower Then
|
||||||
UserSiteNameUpdate(.Value("name"))
|
UserSiteNameUpdate(.Value("name"), True)
|
||||||
UserDescriptionUpdate(.Value("description"))
|
UserDescriptionUpdate(.Value("description"))
|
||||||
|
|
||||||
If icon.IsEmptyString Then icon = .Value("profile_image_url_https")
|
If icon.IsEmptyString Then icon = .Value("profile_image_url_https")
|
||||||
@@ -1190,10 +1190,12 @@ nextpIndx:
|
|||||||
Dim cache As CacheKeeper = Nothing
|
Dim cache As CacheKeeper = Nothing
|
||||||
Try
|
Try
|
||||||
If ContentMissingExists Or (_ReparseLikes And LikesPosts.Count > 0) Then
|
If ContentMissingExists Or (_ReparseLikes And LikesPosts.Count > 0) Then
|
||||||
|
Const __entries$ = "entries"
|
||||||
Dim m As UserMedia, mTmp As UserMedia
|
Dim m As UserMedia, mTmp As UserMedia
|
||||||
Dim PostDate$
|
Dim PostDate$
|
||||||
Dim nodes As List(Of String()) = GetContainerSubnodes()
|
Dim nodes As List(Of String()) = GetContainerSubnodes()
|
||||||
Dim node$()
|
Dim node$()
|
||||||
|
Dim entriesNode As Predicate(Of EContainer) = Function(ee) ee.Contains(__entries)
|
||||||
Dim j As EContainer, n As EContainer
|
Dim j As EContainer, n As EContainer
|
||||||
Dim f As SFile
|
Dim f As SFile
|
||||||
Dim i%, ii%
|
Dim i%, ii%
|
||||||
@@ -1229,7 +1231,7 @@ nextpIndx:
|
|||||||
f = GDLRenameFile(files(ii), ii)
|
f = GDLRenameFile(files(ii), ii)
|
||||||
j = JsonDocument.Parse(f.GetText)
|
j = JsonDocument.Parse(f.GetText)
|
||||||
If Not j Is Nothing Then
|
If Not j Is Nothing Then
|
||||||
With j.ItemF({"data", 0, "instructions", 0, "entries"})
|
With j.ItemF({"data", 0, "instructions", entriesNode, __entries})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
If IsSingleObjectDownload Or DownloadBroadcasts Then
|
If IsSingleObjectDownload Or DownloadBroadcasts Then
|
||||||
mTmp = ExtractBroadcast(.Self, m.Post.ID, String.Empty, nodes)
|
mTmp = ExtractBroadcast(.Self, m.Post.ID, String.Empty, nodes)
|
||||||
|
|||||||
@@ -298,6 +298,7 @@ Namespace API.Xhamster
|
|||||||
containerNodes.Add({"videoListComponent", "videoThumbProps"})
|
containerNodes.Add({"videoListComponent", "videoThumbProps"})
|
||||||
Else
|
Else
|
||||||
containerNodes.Add({"userGalleriesCollection"})
|
containerNodes.Add({"userGalleriesCollection"})
|
||||||
|
containerNodes.Add({"contentComponent", "items"})
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -799,6 +800,9 @@ Namespace API.Xhamster
|
|||||||
Using ytdlp As New YTDLP.YTDLPBatch(TokenPersonal,, DestinationFile) : ytdlp.Encoding = Settings.CMDEncoding : ytdlp.Execute(cmd) : End Using
|
Using ytdlp As New YTDLP.YTDLPBatch(TokenPersonal,, DestinationFile) : ytdlp.Encoding = Settings.CMDEncoding : ytdlp.Execute(cmd) : End Using
|
||||||
Return DestinationFile
|
Return DestinationFile
|
||||||
End Function
|
End Function
|
||||||
|
Protected Overrides Function DownloadContentDefault_ConvertWebp(ByVal m As UserMedia, ByVal Process As Boolean) As SFile
|
||||||
|
Return DownloadContentDefault_ConvertWebp_TestImg(m, Process)
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Create media"
|
#Region "Create media"
|
||||||
Private Function ExtractMedia(ByVal j As EContainer, ByVal t As UTypes, Optional ByVal UrlNode As String = "pageURL",
|
Private Function ExtractMedia(ByVal j As EContainer, ByVal t As UTypes, Optional ByVal UrlNode As String = "pageURL",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Namespace API.Xhamster
|
|||||||
MyBase.New(s)
|
MyBase.New(s)
|
||||||
GetMoments = s.GetMoments.Value
|
GetMoments = s.GetMoments.Value
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overrides Sub Apply(ByRef u As IPSite)
|
Friend Overrides Sub Apply(ByRef u As UserDataBase)
|
||||||
MyBase.Apply(u)
|
MyBase.Apply(u)
|
||||||
DirectCast(u, UserData).GetMoments = GetMoments
|
DirectCast(u, UserData).GetMoments = GetMoments
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -26,7 +26,16 @@ Namespace DownloadObjects
|
|||||||
Friend WithEvents MyDefs As DefaultFormOptions
|
Friend WithEvents MyDefs As DefaultFormOptions
|
||||||
Private WithEvents MyRange As RangeSwitcherToolbar(Of UserMediaD)
|
Private WithEvents MyRange As RangeSwitcherToolbar(Of UserMediaD)
|
||||||
Private ReadOnly DataList As List(Of UserMediaD)
|
Private ReadOnly DataList As List(Of UserMediaD)
|
||||||
|
#Region "Buttons"
|
||||||
Private WithEvents BTT_DELETE_SELECTED As ToolStripButton
|
Private WithEvents BTT_DELETE_SELECTED As ToolStripButton
|
||||||
|
Private WithEvents BTT_COPY_SELECTED_T As ToolStripButton
|
||||||
|
Private WithEvents BTT_MOVE_SELECTED_T As ToolStripButton
|
||||||
|
Private WithEvents BTT_FAV_T As ToolStripButton
|
||||||
|
Private WithEvents BTT_FEED_ADD_T As ToolStripDropDownButton
|
||||||
|
Private WithEvents BTT_SELECT_ALL_T As ToolStripButton
|
||||||
|
Private WithEvents BTT_SELECT_NONE_T As ToolStripButton
|
||||||
|
Private WithEvents BTT_INVERT_T As ToolStripButton
|
||||||
|
#End Region
|
||||||
Private DataRows As Integer = 10
|
Private DataRows As Integer = 10
|
||||||
Private DataColumns As Integer = 1
|
Private DataColumns As Integer = 1
|
||||||
Private FeedEndless As Boolean = False
|
Private FeedEndless As Boolean = False
|
||||||
@@ -157,13 +166,61 @@ Namespace DownloadObjects
|
|||||||
MyRange = New RangeSwitcherToolbar(Of UserMediaD)(ToolbarTOP)
|
MyRange = New RangeSwitcherToolbar(Of UserMediaD)(ToolbarTOP)
|
||||||
DataList = New List(Of UserMediaD)
|
DataList = New List(Of UserMediaD)
|
||||||
LoadedFeedNames = New List(Of String)
|
LoadedFeedNames = New List(Of String)
|
||||||
|
|
||||||
BTT_DELETE_SELECTED = New ToolStripButton With {
|
BTT_DELETE_SELECTED = New ToolStripButton With {
|
||||||
.Text = "Delete selected",
|
.Text = "Delete",
|
||||||
.AutoToolTip = True,
|
.AutoToolTip = True,
|
||||||
.ToolTipText = "Delete marked files",
|
.ToolTipText = "Delete selected files",
|
||||||
.Image = My.Resources.DeletePic_24,
|
.Image = My.Resources.DeletePic_24,
|
||||||
.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
|
.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
|
||||||
}
|
}
|
||||||
|
BTT_COPY_SELECTED_T = New ToolStripButton With {
|
||||||
|
.Text = "Copy",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Copy selected files",
|
||||||
|
.Image = My.Resources.PastePic_32,
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
|
||||||
|
}
|
||||||
|
BTT_MOVE_SELECTED_T = New ToolStripButton With {
|
||||||
|
.Text = "Move",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Move selected files",
|
||||||
|
.Image = My.Resources.CutPic_48,
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
|
||||||
|
}
|
||||||
|
BTT_FAV_T = New ToolStripButton With {
|
||||||
|
.Text = "Favorite",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Add checked to Favorite",
|
||||||
|
.Image = My.Resources.HeartPic_32,
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
|
||||||
|
}
|
||||||
|
BTT_FEED_ADD_T = New ToolStripDropDownButton With {
|
||||||
|
.Text = "Add",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Add checked to special feed..." & vbCr & "Right click to add to multiple feeds",
|
||||||
|
.Image = My.Resources.RSSPic_512,
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText
|
||||||
|
}
|
||||||
|
BTT_SELECT_ALL_T = New ToolStripButton With {
|
||||||
|
.Text = "All",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Select all",
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.Text
|
||||||
|
}
|
||||||
|
BTT_SELECT_NONE_T = New ToolStripButton With {
|
||||||
|
.Text = "None",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Select none",
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.Text
|
||||||
|
}
|
||||||
|
BTT_INVERT_T = New ToolStripButton With {
|
||||||
|
.Text = "Invert",
|
||||||
|
.AutoToolTip = True,
|
||||||
|
.ToolTipText = "Invert selection",
|
||||||
|
.DisplayStyle = ToolStripItemDisplayStyle.Text
|
||||||
|
}
|
||||||
|
|
||||||
FILTERS = New FeedFilterCollection
|
FILTERS = New FeedFilterCollection
|
||||||
BTT_FILTER.Image = My.Resources.FilterPic
|
BTT_FILTER.Image = My.Resources.FilterPic
|
||||||
BTT_FILTER_SIMPLE.Image = My.Resources.FilterPic
|
BTT_FILTER_SIMPLE.Image = My.Resources.FilterPic
|
||||||
@@ -189,7 +246,10 @@ Namespace DownloadObjects
|
|||||||
.ToolTip(RCI.GoTo) = "GoTo (Ctrl+G)"
|
.ToolTip(RCI.GoTo) = "GoTo (Ctrl+G)"
|
||||||
.AddThisToolbar()
|
.AddThisToolbar()
|
||||||
End With
|
End With
|
||||||
ToolbarTOP.Items.AddRange({New ToolStripSeparator, BTT_DELETE_SELECTED})
|
ToolbarTOP.Items.AddRange({New ToolStripSeparator, BTT_DELETE_SELECTED,
|
||||||
|
New ToolStripSeparator, BTT_COPY_SELECTED_T, BTT_MOVE_SELECTED_T,
|
||||||
|
New ToolStripSeparator, BTT_FAV_T, BTT_FEED_ADD_T,
|
||||||
|
New ToolStripSeparator, BTT_SELECT_ALL_T, BTT_SELECT_NONE_T, BTT_INVERT_T})
|
||||||
With Settings
|
With Settings
|
||||||
With .Feeds
|
With .Feeds
|
||||||
.Load()
|
.Load()
|
||||||
@@ -200,6 +260,7 @@ Namespace DownloadObjects
|
|||||||
If Not feed.IsFavorite Then
|
If Not feed.IsFavorite Then
|
||||||
AddNewFeedItem(BTT_LOAD_SPEC, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_LOAD)
|
AddNewFeedItem(BTT_LOAD_SPEC, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_LOAD)
|
||||||
AddNewFeedItem(BTT_FEED_ADD_SPEC, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD)
|
AddNewFeedItem(BTT_FEED_ADD_SPEC, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD)
|
||||||
|
AddNewFeedItem(BTT_FEED_ADD_T, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD)
|
||||||
AddNewFeedItem(BTT_FEED_ADD_SPEC_REMOVE, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD_REMOVE)
|
AddNewFeedItem(BTT_FEED_ADD_SPEC_REMOVE, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD_REMOVE)
|
||||||
AddNewFeedItem(BTT_FEED_REMOVE_SPEC, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_REMOVE)
|
AddNewFeedItem(BTT_FEED_REMOVE_SPEC, feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_REMOVE)
|
||||||
AddNewFeedItem(BTT_FEED_DELETE_SPEC, feed, My.Resources.DeletePic_24, AddressOf Feed_SPEC_DELETE)
|
AddNewFeedItem(BTT_FEED_DELETE_SPEC, feed, My.Resources.DeletePic_24, AddressOf Feed_SPEC_DELETE)
|
||||||
@@ -268,11 +329,11 @@ Namespace DownloadObjects
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Feeds handlers"
|
#Region "Feeds handlers"
|
||||||
Private Overloads Sub AddNewFeedItem(ByVal Destination As ToolStripMenuItem, ByVal Feed As FeedSpecial, ByVal Image As Image,
|
Private Overloads Sub AddNewFeedItem(Of T As ToolStripDropDownItem)(ByVal Destination As T, ByVal Feed As FeedSpecial, ByVal Image As Image,
|
||||||
ByVal Handler As EventHandler, Optional ByVal Insert As Boolean = False)
|
ByVal Handler As EventHandler, Optional ByVal Insert As Boolean = False)
|
||||||
AddNewFeedItem(Destination, ToolbarTOP, Feed, Image, Handler, Insert)
|
AddNewFeedItem(Destination, ToolbarTOP, Feed, Image, Handler, Insert)
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overloads Shared Function AddNewFeedItem(ByVal Destination As ToolStripMenuItem, ByVal Toolbar As ToolStrip,
|
Friend Overloads Shared Function AddNewFeedItem(ByVal Destination As ToolStripDropDownItem, ByVal Toolbar As ToolStrip,
|
||||||
ByVal Feed As FeedSpecial, ByVal Image As Image,
|
ByVal Feed As FeedSpecial, ByVal Image As Image,
|
||||||
ByVal Handler As EventHandler, Optional ByVal Insert As Boolean = False) As ToolStripMenuItem
|
ByVal Handler As EventHandler, Optional ByVal Insert As Boolean = False) As ToolStripMenuItem
|
||||||
Dim item As New ToolStripMenuItem(Feed.Name, Image) With {.Tag = Feed}
|
Dim item As New ToolStripMenuItem(Feed.Name, Image) With {.Tag = Feed}
|
||||||
@@ -289,6 +350,7 @@ Namespace DownloadObjects
|
|||||||
Private Sub Feed_FeedAdded(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
Private Sub Feed_FeedAdded(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
AddNewFeedItem(BTT_LOAD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_LOAD, True)
|
AddNewFeedItem(BTT_LOAD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_LOAD, True)
|
||||||
AddNewFeedItem(BTT_FEED_ADD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD, True)
|
AddNewFeedItem(BTT_FEED_ADD_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD, True)
|
||||||
|
AddNewFeedItem(BTT_FEED_ADD_T, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD, True)
|
||||||
AddNewFeedItem(BTT_FEED_ADD_SPEC_REMOVE, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD_REMOVE, True)
|
AddNewFeedItem(BTT_FEED_ADD_SPEC_REMOVE, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_ADD_REMOVE, True)
|
||||||
AddNewFeedItem(BTT_FEED_REMOVE_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_REMOVE, True)
|
AddNewFeedItem(BTT_FEED_REMOVE_SPEC, Feed, My.Resources.RSSPic_512, AddressOf Feed_SPEC_REMOVE, True)
|
||||||
AddNewFeedItem(BTT_FEED_DELETE_SPEC, Feed, My.Resources.DeletePic_24, AddressOf Feed_SPEC_DELETE, True)
|
AddNewFeedItem(BTT_FEED_DELETE_SPEC, Feed, My.Resources.DeletePic_24, AddressOf Feed_SPEC_DELETE, True)
|
||||||
@@ -297,14 +359,15 @@ Namespace DownloadObjects
|
|||||||
Private Overloads Sub Feed_FeedRemoved(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
Private Overloads Sub Feed_FeedRemoved(ByVal Source As FeedSpecialCollection, ByVal Feed As FeedSpecial)
|
||||||
Feed_FeedRemoved(BTT_LOAD_SPEC, Feed)
|
Feed_FeedRemoved(BTT_LOAD_SPEC, Feed)
|
||||||
Feed_FeedRemoved(BTT_FEED_ADD_SPEC, Feed)
|
Feed_FeedRemoved(BTT_FEED_ADD_SPEC, Feed)
|
||||||
|
Feed_FeedRemoved(BTT_FEED_ADD_T, Feed)
|
||||||
Feed_FeedRemoved(BTT_FEED_REMOVE_SPEC, Feed)
|
Feed_FeedRemoved(BTT_FEED_REMOVE_SPEC, Feed)
|
||||||
Feed_FeedRemoved(BTT_FEED_DELETE_SPEC, Feed)
|
Feed_FeedRemoved(BTT_FEED_DELETE_SPEC, Feed)
|
||||||
Feed_FeedRemoved(BTT_FEED_CLEAR_SPEC, Feed)
|
Feed_FeedRemoved(BTT_FEED_CLEAR_SPEC, Feed)
|
||||||
End Sub
|
End Sub
|
||||||
Private Overloads Sub Feed_FeedRemoved(ByVal Destination As ToolStripMenuItem, ByVal Feed As FeedSpecial)
|
Private Overloads Sub Feed_FeedRemoved(ByVal Destination As ToolStripDropDownItem, ByVal Feed As FeedSpecial)
|
||||||
Feed_FeedRemoved(Destination, ToolbarTOP, Feed)
|
Feed_FeedRemoved(Destination, ToolbarTOP, Feed)
|
||||||
End Sub
|
End Sub
|
||||||
Friend Overloads Shared Sub Feed_FeedRemoved(ByVal Destination As ToolStripMenuItem, ByVal Toolbar As ToolStrip, ByVal Feed As FeedSpecial)
|
Friend Overloads Shared Sub Feed_FeedRemoved(ByVal Destination As ToolStripDropDownItem, ByVal Toolbar As ToolStrip, ByVal Feed As FeedSpecial)
|
||||||
Try
|
Try
|
||||||
With Destination
|
With Destination
|
||||||
ControlInvokeFast(Toolbar, .Self,
|
ControlInvokeFast(Toolbar, .Self,
|
||||||
@@ -594,7 +657,7 @@ Namespace DownloadObjects
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Move/Copy"
|
#Region "Move/Copy"
|
||||||
Private Sub BTT_COPY_MOVE_TO_Click(sender As Object, e As EventArgs) Handles BTT_COPY_TO.Click, BTT_MOVE_TO.Click
|
Private Sub BTT_COPY_MOVE_TO_Click(sender As Object, e As EventArgs) Handles BTT_COPY_TO.Click, BTT_MOVE_TO.Click, BTT_COPY_SELECTED_T.Click, BTT_MOVE_SELECTED_T.Click
|
||||||
MoveCopyFiles(True, sender, Nothing, Nothing)
|
MoveCopyFiles(True, sender, Nothing, Nothing)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BTT_COPY_MOVE_SPEC_TO_Click(sender As Object, e As EventArgs) Handles BTT_COPY_SPEC_TO.Click, BTT_MOVE_SPEC_TO.Click
|
Private Sub BTT_COPY_MOVE_SPEC_TO_Click(sender As Object, e As EventArgs) Handles BTT_COPY_SPEC_TO.Click, BTT_MOVE_SPEC_TO.Click
|
||||||
@@ -604,7 +667,7 @@ Namespace DownloadObjects
|
|||||||
ByVal FeedMediaData As FeedMedia, Optional ByVal GetChecked As Boolean = True) As Boolean
|
ByVal FeedMediaData As FeedMedia, Optional ByVal GetChecked As Boolean = True) As Boolean
|
||||||
Dim MsgTitle$ = "Copy/Move checked files"
|
Dim MsgTitle$ = "Copy/Move checked files"
|
||||||
Try
|
Try
|
||||||
Dim isCopy As Boolean = Not Sender Is Nothing AndAlso (Sender Is BTT_COPY_TO OrElse Sender Is BTT_COPY_SPEC_TO)
|
Dim isCopy As Boolean = Not Sender Is Nothing AndAlso (Sender Is BTT_COPY_TO OrElse Sender Is BTT_COPY_SPEC_TO OrElse Sender Is BTT_COPY_SELECTED_T)
|
||||||
Dim moveOptions As FeedMoveCopyTo = Nothing
|
Dim moveOptions As FeedMoveCopyTo = Nothing
|
||||||
Dim ff As SFile = Nothing, ffInit As SFile = Nothing, df As SFile = Nothing
|
Dim ff As SFile = Nothing, ffInit As SFile = Nothing, df As SFile = Nothing
|
||||||
Dim data As IEnumerable(Of UserMediaD) = Nothing
|
Dim data As IEnumerable(Of UserMediaD) = Nothing
|
||||||
@@ -1004,7 +1067,7 @@ Namespace DownloadObjects
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Add remove fav spec"
|
#Region "Add remove fav spec"
|
||||||
Private Sub BTT_FEED_ADD_FAV_Click(sender As Object, e As EventArgs) Handles BTT_FEED_ADD_FAV.Click, BTT_FEED_ADD_FAV_REMOVE.Click
|
Private Sub BTT_FEED_ADD_FAV_Click(sender As Object, e As EventArgs) Handles BTT_FEED_ADD_FAV.Click, BTT_FEED_ADD_FAV_REMOVE.Click, BTT_FAV_T.Click
|
||||||
Dim m As IEnumerable(Of UserMediaD) = GetCheckedMedia()
|
Dim m As IEnumerable(Of UserMediaD) = GetCheckedMedia()
|
||||||
If m.ListExists Then
|
If m.ListExists Then
|
||||||
Settings.Feeds.Favorite.Add(m)
|
Settings.Feeds.Favorite.Add(m)
|
||||||
@@ -1018,6 +1081,9 @@ Namespace DownloadObjects
|
|||||||
If FeedMode = FeedModes.Special Then FeedRemoveCheckedMedia(m, {FeedSpecial.FavoriteName}.ToList,,, False)
|
If FeedMode = FeedModes.Special Then FeedRemoveCheckedMedia(m, {FeedSpecial.FavoriteName}.ToList,,, False)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub BTT_FEED_ADD_T_MouseDown(sender As Object, e As MouseEventArgs) Handles BTT_FEED_ADD_T.MouseDown
|
||||||
|
If e.Button = MouseButtons.Right Then BTT_FEED_ADD_SPEC_Click(sender, e)
|
||||||
|
End Sub
|
||||||
Private Sub BTT_FEED_ADD_SPEC_Click(sender As Object, e As EventArgs) Handles BTT_FEED_ADD_SPEC.Click, BTT_FEED_ADD_SPEC_REMOVE.Click
|
Private Sub BTT_FEED_ADD_SPEC_Click(sender As Object, e As EventArgs) Handles BTT_FEED_ADD_SPEC.Click, BTT_FEED_ADD_SPEC_REMOVE.Click
|
||||||
Dim c As IEnumerable(Of UserMediaD) = GetCheckedMedia()
|
Dim c As IEnumerable(Of UserMediaD) = GetCheckedMedia()
|
||||||
If c.ListExists Then
|
If c.ListExists Then
|
||||||
@@ -1276,10 +1342,10 @@ Namespace DownloadObjects
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
Private Sub BTT_CHECK_ALL_NONE_Click(sender As Object, e As EventArgs) Handles BTT_CHECK_ALL.Click, BTT_CHECK_NONE.Click, BTT_CHECK_INVERT.Click
|
Private Sub BTT_CHECK_ALL_NONE_Click(sender As Object, e As EventArgs) Handles BTT_CHECK_ALL.Click, BTT_CHECK_NONE.Click, BTT_CHECK_INVERT.Click, BTT_SELECT_ALL_T.Click, BTT_SELECT_NONE_T.Click, BTT_INVERT_T.Click
|
||||||
Try
|
Try
|
||||||
Dim checked As Boolean = sender Is BTT_CHECK_ALL
|
Dim checked As Boolean = sender Is BTT_CHECK_ALL Or sender Is BTT_SELECT_ALL_T
|
||||||
Dim isInvert As Boolean = sender Is BTT_CHECK_INVERT
|
Dim isInvert As Boolean = sender Is BTT_CHECK_INVERT Or sender Is BTT_INVERT_T
|
||||||
ControlInvokeFast(TP_DATA, Sub()
|
ControlInvokeFast(TP_DATA, Sub()
|
||||||
With TP_DATA
|
With TP_DATA
|
||||||
If .Controls.Count > 0 Then
|
If .Controls.Count > 0 Then
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Imports PersonalUtilities.Forms
|
|||||||
Imports PersonalUtilities.Tools
|
Imports PersonalUtilities.Tools
|
||||||
Imports SCrawler.API.Base
|
Imports SCrawler.API.Base
|
||||||
Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD
|
Imports UserMediaD = SCrawler.DownloadObjects.TDownloader.UserMediaD
|
||||||
|
Imports ImageRenderer2 = SCrawler.UserImage.ImageRenderer2
|
||||||
Namespace DownloadObjects
|
Namespace DownloadObjects
|
||||||
<ToolboxItem(False), DesignTimeVisible(False)>
|
<ToolboxItem(False), DesignTimeVisible(False)>
|
||||||
Public Class FeedMedia
|
Public Class FeedMedia
|
||||||
@@ -166,42 +167,6 @@ Namespace DownloadObjects
|
|||||||
Public Sub New()
|
Public Sub New()
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
End Sub
|
End Sub
|
||||||
Private Class ImageRenderer2 : Inherits ImageRenderer
|
|
||||||
Friend NativeFormat As String = Nothing
|
|
||||||
Friend ImgErr As Exception = Nothing
|
|
||||||
Friend Sub New(ByVal ImgPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing)
|
|
||||||
MyBase.New()
|
|
||||||
Try
|
|
||||||
If ImgPath.Exists(SFO.File, False) Then
|
|
||||||
OriginalImageBytes = SFile.GetBytes(ImgPath, EDP.ThrowException)
|
|
||||||
Try
|
|
||||||
OriginalImage = GetImage(OriginalImageBytes)
|
|
||||||
Catch exInternal As Exception
|
|
||||||
HasError = True
|
|
||||||
ImgErr = exInternal
|
|
||||||
NativeFormat = GetTrueFormat(OriginalImageBytes, EDP.ReturnValue)
|
|
||||||
End Try
|
|
||||||
End If
|
|
||||||
Address = ImgPath
|
|
||||||
Catch ex As Exception
|
|
||||||
HasError = True
|
|
||||||
NativeFormat = GetTrueFormat(OriginalImageBytes, EDP.ReturnValue)
|
|
||||||
If Not e.Exists Then e = EDP.ThrowException
|
|
||||||
ErrorsDescriber.Execute(e, ex, $"ImageRenderer2.New({ImgPath})")
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
Friend Shared Function GetTrueFormat(ByVal Img() As Byte, Optional ByVal e As ErrorsDescriber = Nothing) As String
|
|
||||||
Try
|
|
||||||
Using ms As New MemoryStream(Img, 0, Img.Length)
|
|
||||||
Return System.Windows.Media.Imaging.BitmapDecoder.Create(ms, Windows.Media.Imaging.BitmapCreateOptions.PreservePixelFormat,
|
|
||||||
Windows.Media.Imaging.BitmapCacheOption.OnLoad).Metadata.Format
|
|
||||||
End Using
|
|
||||||
Catch ex As Exception
|
|
||||||
If Not e.Exists Then e = EDP.ThrowException
|
|
||||||
Return ErrorsDescriber.Execute(e, ex, "[ImageRenderer2.GetTrueFormat()]")
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
End Class
|
|
||||||
Friend Sub New(ByVal Media As UserMediaD, ByVal Width As Integer, ByVal Height As Integer, ByVal IsSession As Boolean, ByVal ExtractText As Boolean)
|
Friend Sub New(ByVal Media As UserMediaD, ByVal Width As Integer, ByVal Height As Integer, ByVal IsSession As Boolean, ByVal ExtractText As Boolean)
|
||||||
Try
|
Try
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
@@ -239,7 +204,17 @@ Namespace DownloadObjects
|
|||||||
End With
|
End With
|
||||||
If Not imgFile.Exists Then
|
If Not imgFile.Exists Then
|
||||||
Settings.Cache.Validate()
|
Settings.Cache.Validate()
|
||||||
If GetWebFile(Media.Data.URL, imgFile, EDP.None) AndAlso imgFile.Exists Then File = UserImage.ConvertWebp(imgFile, Nothing)
|
If GetWebFile(Media.Data.URL, imgFile, EDP.None) AndAlso imgFile.Exists Then
|
||||||
|
File = UserImage.ConvertWebp(imgFile, Nothing)
|
||||||
|
ElseIf Not IsNothing(Media.Data.Object) AndAlso TypeOf Media.Data.Object Is IThumbList AndAlso
|
||||||
|
DirectCast(Media.Data.Object, IThumbList).Thumbs.ListExists Then
|
||||||
|
With DirectCast(Media.Data.Object, IThumbList).Thumbs
|
||||||
|
For Each __tmpUrl$ In .Self
|
||||||
|
If GetWebFile(__tmpUrl, imgFile, EDP.None) AndAlso imgFile.Exists Then _
|
||||||
|
File = UserImage.ConvertWebp(imgFile, Nothing) : Exit For
|
||||||
|
Next
|
||||||
|
End With
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
File = imgFile
|
File = imgFile
|
||||||
End If
|
End If
|
||||||
@@ -260,7 +235,7 @@ Namespace DownloadObjects
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If File.Exists Then
|
If File.Exists Or IsSubscription Then
|
||||||
Information = $"Type: {IIf(ExtractText, UserMedia.Types.Text.ToString, Media.Data.Type.ToString)}"
|
Information = $"Type: {IIf(ExtractText, UserMedia.Types.Text.ToString, Media.Data.Type.ToString)}"
|
||||||
Information.StringAppendLine($"File: {File.File}")
|
Information.StringAppendLine($"File: {File.File}")
|
||||||
Information.StringAppendLine($"Address: {File}")
|
Information.StringAppendLine($"Address: {File}")
|
||||||
@@ -291,7 +266,7 @@ Namespace DownloadObjects
|
|||||||
Dim webpConverted As Boolean = False
|
Dim webpConverted As Boolean = False
|
||||||
Dim isWebp As Boolean = False
|
Dim isWebp As Boolean = False
|
||||||
tmpMediaFile = UserImage.ConvertWebp(tmpMediaFile, Nothing,,, webpConverted)
|
tmpMediaFile = UserImage.ConvertWebp(tmpMediaFile, Nothing,,, webpConverted)
|
||||||
If tmpMediaFile.IsEmptyString Then Throw New ArgumentNullException With {.HelpLink = 1}
|
If tmpMediaFile.IsEmptyString And Not IsSubscription Then Throw New ArgumentNullException With {.HelpLink = 1}
|
||||||
Try
|
Try
|
||||||
For kConv As Byte = 0 To 1
|
For kConv As Byte = 0 To 1
|
||||||
If kConv = 1 Then tmpMediaFile = UserImage.ConvertWebp(tmpMediaFile, Nothing, True, isWebp, webpConverted)
|
If kConv = 1 Then tmpMediaFile = UserImage.ConvertWebp(tmpMediaFile, Nothing, True, isWebp, webpConverted)
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2026.2.14.0")>
|
<Assembly: AssemblyVersion("2026.5.13.0")>
|
||||||
<Assembly: AssemblyFileVersion("2026.2.14.0")>
|
<Assembly: AssemblyFileVersion("2026.5.13.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -194,6 +194,7 @@
|
|||||||
<Compile Include="API\Base\TokenBatch.vb" />
|
<Compile Include="API\Base\TokenBatch.vb" />
|
||||||
<Compile Include="API\Base\YTDLP.vb" />
|
<Compile Include="API\Base\YTDLP.vb" />
|
||||||
<Compile Include="API\Bluesky\Declarations.vb" />
|
<Compile Include="API\Bluesky\Declarations.vb" />
|
||||||
|
<Compile Include="API\Bluesky\EditorExchangeOptions.vb" />
|
||||||
<Compile Include="API\Bluesky\M3U8.vb" />
|
<Compile Include="API\Bluesky\M3U8.vb" />
|
||||||
<Compile Include="API\Bluesky\SiteSettings.vb" />
|
<Compile Include="API\Bluesky\SiteSettings.vb" />
|
||||||
<Compile Include="API\Bluesky\UserData.vb" />
|
<Compile Include="API\Bluesky\UserData.vb" />
|
||||||
|
|||||||
@@ -150,4 +150,45 @@ Friend Class UserImage : Inherits ImageRenderer
|
|||||||
Private Shared Function ConvertWebpTryImageMagick(ByVal InitFile As SFile, ByVal DestFile As SFile) As Boolean
|
Private Shared Function ConvertWebpTryImageMagick(ByVal InitFile As SFile, ByVal DestFile As SFile) As Boolean
|
||||||
Return ImageRendererExt.ConvertWebp(InitFile, DestFile, EDP.SendToLog + EDP.ReturnValue)
|
Return ImageRendererExt.ConvertWebp(InitFile, DestFile, EDP.SendToLog + EDP.ReturnValue)
|
||||||
End Function
|
End Function
|
||||||
|
Friend Class ImageRenderer2 : Inherits ImageRenderer
|
||||||
|
Friend NativeFormat As String = Nothing
|
||||||
|
Friend ImgErr As Exception = Nothing
|
||||||
|
Friend ReadOnly Property IsWebP As Boolean
|
||||||
|
Get
|
||||||
|
Return NativeFormat.IfNullOrEmpty(ExtJpg).ToLower = ExtWebp
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Friend Sub New(ByVal ImgPath As SFile, Optional ByVal e As ErrorsDescriber = Nothing)
|
||||||
|
MyBase.New()
|
||||||
|
Try
|
||||||
|
If ImgPath.Exists(SFO.File, False) Then
|
||||||
|
OriginalImageBytes = SFile.GetBytes(ImgPath, EDP.ThrowException)
|
||||||
|
Try
|
||||||
|
OriginalImage = GetImage(OriginalImageBytes)
|
||||||
|
Catch exInternal As Exception
|
||||||
|
HasError = True
|
||||||
|
ImgErr = exInternal
|
||||||
|
NativeFormat = GetTrueFormat(OriginalImageBytes, EDP.ReturnValue)
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
Address = ImgPath
|
||||||
|
Catch ex As Exception
|
||||||
|
HasError = True
|
||||||
|
NativeFormat = GetTrueFormat(OriginalImageBytes, EDP.ReturnValue)
|
||||||
|
If Not e.Exists Then e = EDP.ThrowException
|
||||||
|
ErrorsDescriber.Execute(e, ex, $"ImageRenderer2.New({ImgPath})")
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
Friend Shared Function GetTrueFormat(ByVal Img() As Byte, Optional ByVal e As ErrorsDescriber = Nothing) As String
|
||||||
|
Try
|
||||||
|
Using ms As New MemoryStream(Img, 0, Img.Length)
|
||||||
|
Return System.Windows.Media.Imaging.BitmapDecoder.Create(ms, Windows.Media.Imaging.BitmapCreateOptions.PreservePixelFormat,
|
||||||
|
Windows.Media.Imaging.BitmapCacheOption.OnLoad).Metadata.Format
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
If Not e.Exists Then e = EDP.ThrowException
|
||||||
|
Return ErrorsDescriber.Execute(e, ex, "[ImageRenderer2.GetTrueFormat()]")
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user