mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-14 15:52:18 +00:00
2025.6.12.0
YT MainModShared: fix environment output YouTubeMediaContainerBase: fix 'm3u8' audio formats SCrawler UserDataBase: text downloading with saved posts; update 'ID' property (handle '_ForceSaveUserInfo') API.Bluesky: data is not downloaded API.Reddit: update 'RedditViewExchange'; set base inheritance; inherit default settings for new users API.ALL: update functions with property 'ID'
This commit is contained in:
14
Changelog.md
14
Changelog.md
@@ -1,3 +1,17 @@
|
|||||||
|
# 2025.6.12.0
|
||||||
|
|
||||||
|
*2025-06-12*
|
||||||
|
|
||||||
|
- Updated
|
||||||
|
- yt-dlp up to version **2025.06.09**
|
||||||
|
- Fixed
|
||||||
|
- Sites:
|
||||||
|
- YouTube: audio formats of protocol `m3u8` are not handled correctly
|
||||||
|
- BlueSky: data is not downloaded in some cases
|
||||||
|
- Reddit: new users do not inherit default text settings
|
||||||
|
- Saved posts: text downloading with saved posts
|
||||||
|
- Environment incorrect output
|
||||||
|
|
||||||
# 2025.6.1.0
|
# 2025.6.1.0
|
||||||
|
|
||||||
*2025-06-01*
|
*2025-06-01*
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -35,15 +35,15 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
|
|||||||
# What can program do:
|
# What can program do:
|
||||||
- Download pictures and videos from user profiles:
|
- Download pictures and videos from user profiles:
|
||||||
- YouTube videos, shorts, community feeds, users, artists, playlists, music, tracks;
|
- YouTube videos, shorts, community feeds, users, artists, playlists, music, tracks;
|
||||||
- Reddit images, galleries of images, videos, saved posts;
|
- Reddit images, galleries of images, videos, text, saved posts;
|
||||||
- Redgifs images and videos (https://www.redgifs.com/);
|
- Redgifs images and videos (https://www.redgifs.com/);
|
||||||
- Twitter images and videos, saved (bookmarked) posts, likes, communities;
|
- Twitter images and videos, text, saved (bookmarked) posts, likes, communities;
|
||||||
- Bluesky images and videos;
|
- Bluesky images and videos, text;
|
||||||
- OnlyFans images and videos, saved (bookmarked) posts, stories;
|
- OnlyFans images and videos, text, saved (bookmarked) posts, stories;
|
||||||
- JustForFans images and videos, saved (bookmarked) posts;
|
- JustForFans images and videos, saved (bookmarked) posts;
|
||||||
- Mastodon images and videos, saved (bookmarked) posts;
|
- Mastodon images and videos, saved (bookmarked) posts;
|
||||||
- Instagram images and videos, tagged posts, stories, saved posts;
|
- Instagram images and videos, text, tagged posts, stories, saved posts;
|
||||||
- Threads images and videos, saved posts;
|
- Threads images and videos, text, saved posts;
|
||||||
- Facebook images and videos, stories, saved posts;
|
- Facebook images and videos, stories, saved posts;
|
||||||
- TikTok images and videos;
|
- TikTok images and videos;
|
||||||
- Pinterest boards, users, saved posts;
|
- Pinterest boards, users, saved posts;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Imports System.Threading
|
|||||||
Imports PersonalUtilities.Tools
|
Imports PersonalUtilities.Tools
|
||||||
Imports PersonalUtilities.Tools.Web
|
Imports PersonalUtilities.Tools.Web
|
||||||
Imports PersonalUtilities.Functions.Messaging
|
Imports PersonalUtilities.Functions.Messaging
|
||||||
|
Imports PersonalUtilities.Functions.RegularExpressions
|
||||||
Imports SCrawler.DownloadObjects.STDownloader
|
Imports SCrawler.DownloadObjects.STDownloader
|
||||||
Public Module MainModShared
|
Public Module MainModShared
|
||||||
Public Property BATCH As BatchExecutor
|
Public Property BATCH As BatchExecutor
|
||||||
@@ -135,9 +136,11 @@ Namespace Editors
|
|||||||
Public Shared Function GetProgramEnvirText(ByVal EnvirData As IDownloaderSettings, ByVal IsYouTube As Boolean) As String
|
Public Shared Function GetProgramEnvirText(ByVal EnvirData As IDownloaderSettings, ByVal IsYouTube As Boolean) As String
|
||||||
Try
|
Try
|
||||||
Dim output$ = String.Empty
|
Dim output$ = String.Empty
|
||||||
|
Dim verAfter As RParams = RParams.DM("\A\w\:\\.*", 0, EDP.ReturnValue)
|
||||||
Using b As New BatchExecutor(True)
|
Using b As New BatchExecutor(True)
|
||||||
Dim f As SFile
|
Dim f As SFile
|
||||||
Dim cmd$, ff$, vText$
|
Dim cmd$, ff$, vText$
|
||||||
|
Dim ii%
|
||||||
|
|
||||||
For i% = 0 To IIf(IsYouTube, 1, 3)
|
For i% = 0 To IIf(IsYouTube, 1, 3)
|
||||||
cmd = "--version"
|
cmd = "--version"
|
||||||
@@ -154,7 +157,17 @@ Namespace Editors
|
|||||||
Else
|
Else
|
||||||
b.Reset()
|
b.Reset()
|
||||||
b.Execute($"""{f}"" {cmd}", EDP.None)
|
b.Execute($"""{f}"" {cmd}", EDP.None)
|
||||||
If b.OutputData.Count > 3 Then vText = b.OutputData(3) Else vText = "undefined"
|
'If b.OutputData.Count > 3 Then vText = b.OutputData(3) Else vText = "undefined"
|
||||||
|
|
||||||
|
vText = String.Empty
|
||||||
|
With b.OutputData
|
||||||
|
If .Count > 0 Then
|
||||||
|
ii = .FindIndex(Function(bb) Not CStr(RegexReplace(bb, verAfter)).IsEmptyString)
|
||||||
|
If ii >= 0 And ii + 1 <= .Count - 1 Then vText = .Item(ii + 1)
|
||||||
|
End If
|
||||||
|
End With
|
||||||
|
If vText.IsEmptyString Then vText = "undefined"
|
||||||
|
|
||||||
output.StringAppendLine($"{ff} version: {vText}")
|
output.StringAppendLine($"{ff} version: {vText}")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -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("2025.6.1.0")>
|
<Assembly: AssemblyVersion("2025.6.12.0")>
|
||||||
<Assembly: AssemblyFileVersion("2025.6.1.0")>
|
<Assembly: AssemblyFileVersion("2025.6.12.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -738,6 +738,7 @@ Namespace API.YouTube.Objects
|
|||||||
#Region "Command"
|
#Region "Command"
|
||||||
<XMLEC> Public Property UseCookies As Boolean = MyYouTubeSettings.DefaultUseCookies Implements IYouTubeMediaContainer.UseCookies
|
<XMLEC> Public Property UseCookies As Boolean = MyYouTubeSettings.DefaultUseCookies Implements IYouTubeMediaContainer.UseCookies
|
||||||
Protected Const mp3 As String = "mp3"
|
Protected Const mp3 As String = "mp3"
|
||||||
|
Private Const mp4 As String = "mp4"
|
||||||
Private Const aac As String = "aac"
|
Private Const aac As String = "aac"
|
||||||
Private Const ac3 As String = "ac3"
|
Private Const ac3 As String = "ac3"
|
||||||
Protected PostProcessing_AudioAC3 As Boolean = False
|
Protected PostProcessing_AudioAC3 As Boolean = False
|
||||||
@@ -773,7 +774,12 @@ Namespace API.YouTube.Objects
|
|||||||
'2023.3.4 -> 2023.7.6
|
'2023.3.4 -> 2023.7.6
|
||||||
'cmd.StringAppend($"ba*[format_id={SelectedAudio.ID}]", "+")
|
'cmd.StringAppend($"ba*[format_id={SelectedAudio.ID}]", "+")
|
||||||
cmd.StringAppend(SelectedAudio.ID, "+")
|
cmd.StringAppend(SelectedAudio.ID, "+")
|
||||||
If OutputAudioCodec.StringToLower = ac3 Then
|
If SelectedVideoIndex >= 0 And SelectedAudio.ProtocolType = Protocols.m3u8 And
|
||||||
|
(SelectedAudio.Codec.StringToLower = mp4 Or OutputAudioCodec.StringToLower = mp4) Then
|
||||||
|
PostProcessing_AudioAC3 = True
|
||||||
|
formats.StringAppend($"--merge-output-format ""{mp4}{IIf(OutputVideoExtension.IsEmptyString, String.Empty, $"/{OutputVideoExtension.StringToLower}")}""", " ")
|
||||||
|
atCodec = aac
|
||||||
|
ElseIf OutputAudioCodec.StringToLower = ac3 Then
|
||||||
PostProcessing_AudioAC3 = True
|
PostProcessing_AudioAC3 = True
|
||||||
formats.StringAppend($"--audio-format {aac}", " ")
|
formats.StringAppend($"--audio-format {aac}", " ")
|
||||||
atCodec = aac
|
atCodec = aac
|
||||||
@@ -1753,9 +1759,12 @@ Namespace API.YouTube.Objects
|
|||||||
If If(e({"formats"})?.Count, 0) > 0 Then
|
If If(e({"formats"})?.Count, 0) > 0 Then
|
||||||
Dim obj As MediaObject
|
Dim obj As MediaObject
|
||||||
Dim nValue#
|
Dim nValue#
|
||||||
Dim sValue$
|
Dim sValue$ = String.Empty
|
||||||
Dim allowWebm As Boolean = MyYouTubeSettings.DefaultVideoAllowWebm
|
Dim allowWebm As Boolean = MyYouTubeSettings.DefaultVideoAllowWebm
|
||||||
Dim validCodecValue As Func(Of String, Boolean) = Function(codec) Not codec.IsEmptyString AndAlso Not codec = "none"
|
Dim validCodecValue As Func(Of String, Boolean) = Function(ByVal codec As String) As Boolean
|
||||||
|
sValue = codec
|
||||||
|
Return Not codec.IsEmptyString AndAlso Not codec = "none"
|
||||||
|
End Function
|
||||||
|
|
||||||
For Each ee In e({"formats"})
|
For Each ee In e({"formats"})
|
||||||
obj = New MediaObject With {
|
obj = New MediaObject With {
|
||||||
@@ -1779,19 +1788,30 @@ Namespace API.YouTube.Objects
|
|||||||
If obj.Size <= 0 And obj.Bitrate > 0 And Duration.TotalSeconds > 0 Then _
|
If obj.Size <= 0 And obj.Bitrate > 0 And Duration.TotalSeconds > 0 Then _
|
||||||
obj.Size = (obj.Bitrate / 8 * Duration.TotalSeconds).RoundVal(2)
|
obj.Size = (obj.Bitrate / 8 * Duration.TotalSeconds).RoundVal(2)
|
||||||
|
|
||||||
sValue = ee.Value("vcodec")
|
'sValue = ee.Value("vcodec")
|
||||||
If validCodecValue(sValue) Then
|
If validCodecValue(ee.Value("vcodec")) Then
|
||||||
obj.Type = UMTypes.Video
|
obj.Type = UMTypes.Video
|
||||||
obj.Codec = sValue.Split(".").First
|
obj.Codec = sValue.Split(".").First
|
||||||
If validCodecValue(ee.Value("acodec")) Then obj.Type = av
|
If validCodecValue(ee.Value("acodec")) Then obj.Type = av
|
||||||
Else
|
ElseIf validCodecValue(ee.Value("acodec")) Then
|
||||||
sValue = ee.Value("acodec")
|
|
||||||
If validCodecValue(sValue) Then
|
|
||||||
obj.Type = UMTypes.Audio
|
obj.Type = UMTypes.Audio
|
||||||
obj.Codec = sValue.Split(".").First
|
obj.Codec = sValue.Split(".").First
|
||||||
Else
|
Else
|
||||||
Continue For
|
Dim fd As Boolean = False
|
||||||
|
sValue = ee.Value("format_note")
|
||||||
|
If Not sValue.IsEmptyString Then
|
||||||
|
With ListAddList(Nothing, sValue.Split(","), CType(Function(v) CStr(v).StringToLower.StringTrim, Func(Of Object, Object)), EDP.ReturnValue)
|
||||||
|
If .ListContains({"high", "low"}) Then
|
||||||
|
obj.Type = UMTypes.Audio
|
||||||
|
obj.Codec = ee.Value("ext")
|
||||||
|
If obj.Protocol.StringToLower.StartsWith("m3u8") Then obj.Protocol = "m3u8"
|
||||||
|
If obj.Bitrate <= 0 Then obj.Bitrate = IIf(.Contains("high"), 129, 53)
|
||||||
|
If obj.Size <= 0 Then obj.Size = 1
|
||||||
|
fd = True
|
||||||
End If
|
End If
|
||||||
|
End With
|
||||||
|
End If
|
||||||
|
If Not fd Then Continue For
|
||||||
End If
|
End If
|
||||||
MediaObjects.Add(obj)
|
MediaObjects.Add(obj)
|
||||||
Next
|
Next
|
||||||
@@ -1803,8 +1823,9 @@ Namespace API.YouTube.Objects
|
|||||||
Dim data As New List(Of MediaObject)(MediaObjects.Where(Function(mo) mo.Type = t And mo.Extension = webm))
|
Dim data As New List(Of MediaObject)(MediaObjects.Where(Function(mo) mo.Type = t And mo.Extension = webm))
|
||||||
If data.Count > 0 Then
|
If data.Count > 0 Then
|
||||||
Dim d As MediaObject = Nothing
|
Dim d As MediaObject = Nothing
|
||||||
Dim expWebm As Predicate(Of MediaObject) = Function(mo) mo.Extension = webm
|
Dim allWebm As Boolean = False, allAVC As Boolean = False
|
||||||
Dim expAVC As Predicate(Of MediaObject) = Function(mo) mo.Codec.IfNullOrEmpty("/").ToLower.StartsWith(avc)
|
Dim expWebm As Predicate(Of MediaObject) = Function(mo) Not allWebm And mo.Extension = webm
|
||||||
|
Dim expAVC As Predicate(Of MediaObject) = Function(mo) Not allAVC And mo.Codec.IfNullOrEmpty("/").ToLower.StartsWith(avc)
|
||||||
Dim comp As Func(Of MediaObject, Predicate(Of MediaObject), Boolean, Boolean, Boolean) =
|
Dim comp As Func(Of MediaObject, Predicate(Of MediaObject), Boolean, Boolean, Boolean) =
|
||||||
Function(mo, exp, isTrue, checkHttp) mo.Type = t And exp.Invoke(mo) = isTrue And mo.Width = d.Width And
|
Function(mo, exp, isTrue, checkHttp) mo.Type = t And exp.Invoke(mo) = isTrue And mo.Width = d.Width And
|
||||||
(Not checkHttp OrElse mo.ProtocolType = Protocols.https)
|
(Not checkHttp OrElse mo.ProtocolType = Protocols.https)
|
||||||
@@ -1812,6 +1833,8 @@ Namespace API.YouTube.Objects
|
|||||||
Dim RemoveWebm As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expWebm, True, allowWebm)
|
Dim RemoveWebm As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expWebm, True, allowWebm)
|
||||||
Dim CountAVC As Func(Of MediaObject, Boolean) = Function(mo) comp.Invoke(mo, expAVC, True, False)
|
Dim CountAVC As Func(Of MediaObject, Boolean) = Function(mo) comp.Invoke(mo, expAVC, True, False)
|
||||||
Dim RemoveAVC As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expAVC, False, False)
|
Dim RemoveAVC As Predicate(Of MediaObject) = Function(mo) comp.Invoke(mo, expAVC, False, False)
|
||||||
|
allWebm = data.All(FPredicate(Of MediaObject).ToFunc(expWebm))
|
||||||
|
allAVC = data.All(FPredicate(Of MediaObject).ToFunc(expAVC))
|
||||||
For Each d In data
|
For Each d In data
|
||||||
If MediaObjects.Count = 0 Then Exit For
|
If MediaObjects.Count = 0 Then Exit For
|
||||||
If MediaObjects.LongCount(CountWebm) > 0 Then MediaObjects.RemoveAll(RemoveWebm)
|
If MediaObjects.LongCount(CountWebm) > 0 Then MediaObjects.RemoveAll(RemoveWebm)
|
||||||
|
|||||||
@@ -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("2025.6.1.0")>
|
<Assembly: AssemblyVersion("2025.6.12.0")>
|
||||||
<Assembly: AssemblyFileVersion("2025.6.1.0")>
|
<Assembly: AssemblyFileVersion("2025.6.12.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
@@ -252,7 +252,20 @@ Namespace API.Base
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "User name, ID, exist, suspend, options"
|
#Region "User name, ID, exist, suspend, options"
|
||||||
Friend User As UserInfo
|
Friend User As UserInfo
|
||||||
|
Private _IsSavedPosts As Boolean = False
|
||||||
Friend Property IsSavedPosts As Boolean Implements IPluginContentProvider.IsSavedPosts
|
Friend Property IsSavedPosts As Boolean Implements IPluginContentProvider.IsSavedPosts
|
||||||
|
Get
|
||||||
|
Return _IsSavedPosts
|
||||||
|
End Get
|
||||||
|
Set(ByVal __IsSavedPosts As Boolean)
|
||||||
|
_IsSavedPosts = __IsSavedPosts
|
||||||
|
If _IsSavedPosts Then
|
||||||
|
DownloadText = True
|
||||||
|
DownloadTextPosts = True
|
||||||
|
DownloadTextSpecialFolder = True
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private _UserExists As Boolean = True
|
Private _UserExists As Boolean = True
|
||||||
Friend Overridable Property UserExists As Boolean Implements IUserData.Exists, IPluginContentProvider.UserExists
|
Friend Overridable Property UserExists As Boolean Implements IUserData.Exists, IPluginContentProvider.UserExists
|
||||||
Get
|
Get
|
||||||
@@ -300,7 +313,16 @@ Namespace API.Base
|
|||||||
Return If(Exact, _NameTrue, _NameTrue.IfNullOrEmpty(Name))
|
Return If(Exact, _NameTrue, _NameTrue.IfNullOrEmpty(Name))
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
Friend Overridable Property ID As String = String.Empty Implements IUserData.ID, IPluginContentProvider.ID
|
Private _ID As String = String.Empty
|
||||||
|
Friend Property ID As String Implements IUserData.ID, IPluginContentProvider.ID
|
||||||
|
Get
|
||||||
|
Return _ID
|
||||||
|
End Get
|
||||||
|
Set(ByVal NewId As String)
|
||||||
|
If Not _ID = NewId Then EnvirChanged(NewId)
|
||||||
|
_ID = NewId
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Protected _FriendlyName As String = String.Empty
|
Protected _FriendlyName As String = String.Empty
|
||||||
Friend Overridable Property FriendlyName As String Implements IUserData.FriendlyName
|
Friend Overridable Property FriendlyName As String Implements IUserData.FriendlyName
|
||||||
Get
|
Get
|
||||||
@@ -985,8 +1007,8 @@ BlockNullPicture:
|
|||||||
ReadyForDownload = x.Value(Name_ReadyForDownload).FromXML(Of Boolean)(True)
|
ReadyForDownload = x.Value(Name_ReadyForDownload).FromXML(Of Boolean)(True)
|
||||||
DownloadImages = x.Value(Name_DownloadImages).FromXML(Of Boolean)(True)
|
DownloadImages = x.Value(Name_DownloadImages).FromXML(Of Boolean)(True)
|
||||||
DownloadVideos = x.Value(Name_DownloadVideos).FromXML(Of Boolean)(True)
|
DownloadVideos = x.Value(Name_DownloadVideos).FromXML(Of Boolean)(True)
|
||||||
DownloadText = x.Value(Name_DownloadText).FromXML(Of Boolean)(False)
|
DownloadText = x.Value(Name_DownloadText).FromXML(Of Boolean)(IsSavedPosts)
|
||||||
DownloadTextPosts = x.Value(Name_DownloadTextPosts).FromXML(Of Boolean)(False)
|
DownloadTextPosts = x.Value(Name_DownloadTextPosts).FromXML(Of Boolean)(IsSavedPosts)
|
||||||
DownloadTextSpecialFolder = x.Value(Name_DownloadTextSpecialFolder).FromXML(Of Boolean)(True)
|
DownloadTextSpecialFolder = x.Value(Name_DownloadTextSpecialFolder).FromXML(Of Boolean)(True)
|
||||||
_IconBannerDownloaded = x.Value(Name_IconBannerDownloaded).FromXML(Of Boolean)(False)
|
_IconBannerDownloaded = x.Value(Name_IconBannerDownloaded).FromXML(Of Boolean)(False)
|
||||||
DownloadedVideos(True) = x.Value(Name_VideoCount).FromXML(Of Integer)(0)
|
DownloadedVideos(True) = x.Value(Name_VideoCount).FromXML(Of Integer)(0)
|
||||||
@@ -1222,7 +1244,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 : _EnvirInvokeUserUpdated = True : _ForceSaveUserInfo = True : _ForceSaveUserInfoOnException = True
|
Case NameOf(NameTrue) : _EnvirChanged = True : _ForceSaveUserInfo = True : _ForceSaveUserInfoOnException = True
|
||||||
|
Case NameOf(ID) : _EnvirChanged = True : _ForceSaveUserInfo = True : _ForceSaveUserInfoOnException = True
|
||||||
Case Else : _EnvirChanged = True
|
Case Else : _EnvirChanged = True
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ Namespace API.Bluesky
|
|||||||
Return If(ID.IsEmptyString, String.Empty, SymbolsConverter.ASCII.EncodeSymbolsOnly(ID))
|
Return If(ID.IsEmptyString, String.Empty, SymbolsConverter.ASCII.EncodeSymbolsOnly(ID))
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Private ReadOnly _TmpPosts2 As List(Of String)
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Loader"
|
#Region "Loader"
|
||||||
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)
|
||||||
@@ -42,6 +43,7 @@ Namespace API.Bluesky
|
|||||||
#Region "Initializer"
|
#Region "Initializer"
|
||||||
Friend Sub New()
|
Friend Sub New()
|
||||||
UseInternalM3U8Function = True
|
UseInternalM3U8Function = True
|
||||||
|
_TmpPosts2 = New List(Of String)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Token"
|
#Region "Token"
|
||||||
@@ -62,11 +64,17 @@ Namespace API.Bluesky
|
|||||||
#Region "Download"
|
#Region "Download"
|
||||||
Private _PostCount As Integer = 0
|
Private _PostCount As Integer = 0
|
||||||
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
Protected Overrides Sub DownloadDataF(ByVal Token As CancellationToken)
|
||||||
|
_TmpPosts2.Clear()
|
||||||
|
Try
|
||||||
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
|
||||||
_PostCount = 0
|
_PostCount = 0
|
||||||
DownloadData(String.Empty, Token)
|
DownloadData(String.Empty, Token)
|
||||||
|
Finally
|
||||||
|
_TempPostsList.ListAddList(_TmpPosts2, LNC)
|
||||||
|
_TmpPosts2.Clear()
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
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
|
||||||
@@ -117,7 +125,8 @@ Namespace API.Bluesky
|
|||||||
Private Function DefaultParser(ByVal e As EContainer, Optional ByVal CheckDateLimits As Boolean = True, Optional ByRef NextCursor As String = Nothing,
|
Private Function DefaultParser(ByVal e As EContainer, Optional ByVal CheckDateLimits As Boolean = True, Optional ByRef NextCursor As String = Nothing,
|
||||||
Optional ByVal CheckTempPosts As Boolean = True, Optional ByVal State As UStates = UStates.Unknown) As Integer
|
Optional ByVal CheckTempPosts As Boolean = True, Optional ByVal State As UStates = UStates.Unknown) As Integer
|
||||||
Const exitReturn% = CInt(DateResult.Exit) * -1
|
Const exitReturn% = CInt(DateResult.Exit) * -1
|
||||||
Dim postID$, postDate$, __url$, __urlBase$, __txt$
|
Const skipReturn% = CInt(DateResult.Skip) * -1
|
||||||
|
Dim postID$, postDate$, __url$, __urlBase$, __txt$, __userId$
|
||||||
Dim updateUrl As Boolean
|
Dim updateUrl As Boolean
|
||||||
Dim c% = 0
|
Dim c% = 0
|
||||||
Dim m As UserMedia
|
Dim m As UserMedia
|
||||||
@@ -128,6 +137,7 @@ Namespace API.Bluesky
|
|||||||
postDate = String.Empty
|
postDate = String.Empty
|
||||||
__urlBase = String.Empty
|
__urlBase = String.Empty
|
||||||
__txt = String.Empty
|
__txt = String.Empty
|
||||||
|
__userId = .Value({"author"}, "did")
|
||||||
With .Item({"record"})
|
With .Item({"record"})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
'2025-01-28T02:42:12.415Z
|
'2025-01-28T02:42:12.415Z
|
||||||
@@ -135,14 +145,18 @@ Namespace API.Bluesky
|
|||||||
NextCursor = postDate
|
NextCursor = postDate
|
||||||
If CheckDateLimits Then
|
If CheckDateLimits Then
|
||||||
Select Case CheckDatesLimit(postDate, DateProvider)
|
Select Case CheckDatesLimit(postDate, DateProvider)
|
||||||
Case DateResult.Skip : Return CInt(DateResult.Skip) * -1 'Continue For
|
Case DateResult.Skip : Return skipReturn 'Continue For
|
||||||
Case DateResult.Exit : Return exitReturn 'Exit Sub
|
Case DateResult.Exit : Return exitReturn 'Exit Sub
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CheckTempPosts Then
|
If CheckTempPosts Then
|
||||||
If _TempPostsList.Contains(postID) Then Return exitReturn Else _TempPostsList.Add(postID)
|
'If _TempPostsList.Contains(postID) Then Return exitReturn Else _TempPostsList.Add(postID)
|
||||||
|
If _TempPostsList.Contains(postID) Then Return exitReturn Else _TmpPosts2.Add(postID)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If ParseUserMediaOnly And Not ID.IsEmptyString And Not __userId.IsEmptyString And Not ID = __userId Then Return skipReturn
|
||||||
|
|
||||||
__urlBase = $"https://bsky.app/profile/{NameTrue}/post/{postID}"
|
__urlBase = $"https://bsky.app/profile/{NameTrue}/post/{postID}"
|
||||||
End If
|
End If
|
||||||
End With
|
End With
|
||||||
@@ -338,6 +352,12 @@ Namespace API.Bluesky
|
|||||||
Return 0
|
Return 0
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
#End Region
|
||||||
|
#Region "IDisposable Support"
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
If disposing Then _TmpPosts2.Clear()
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
@@ -676,10 +676,7 @@ Namespace API.Facebook
|
|||||||
End If
|
End If
|
||||||
Token_Photosby = RegexReplace(r, Regex_Photos_by)
|
Token_Photosby = RegexReplace(r, Regex_Photos_by)
|
||||||
If StoryBucket.IsEmptyString Then StoryBucket = RegexReplace(r, Regex_StoryBucket)
|
If StoryBucket.IsEmptyString Then StoryBucket = RegexReplace(r, Regex_StoryBucket)
|
||||||
If ID.IsEmptyString Then
|
If ID.IsEmptyString Then ID = RegexReplace(r, Regex_UserID)
|
||||||
ID = RegexReplace(r, Regex_UserID)
|
|
||||||
If Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ProcessException(ex, Token, "get user token",, resp)
|
ProcessException(ex, Token, "get user token",, resp)
|
||||||
|
|||||||
@@ -1234,7 +1234,6 @@ NextPageBlock:
|
|||||||
If Not j Is Nothing AndAlso j.Contains({"data", "user"}) Then
|
If Not j Is Nothing AndAlso j.Contains({"data", "user"}) Then
|
||||||
With j({"data", "user"})
|
With j({"data", "user"})
|
||||||
ID = .Value("id")
|
ID = .Value("id")
|
||||||
_ForceSaveUserData = True
|
|
||||||
__idFound = True
|
__idFound = True
|
||||||
UserSiteNameUpdate(.Value("full_name"))
|
UserSiteNameUpdate(.Value("full_name"))
|
||||||
Dim descr$ = .Value("biography")
|
Dim descr$ = .Value("biography")
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ Namespace API.OnlyFans
|
|||||||
If MediaDownloadHighlights And FunctionErr = FunctionErrDef Then DownloadHighlights(Token)
|
If MediaDownloadHighlights And FunctionErr = FunctionErrDef Then DownloadHighlights(Token)
|
||||||
If MediaDownloadChatMedia And FunctionErr = FunctionErrDef Then DownloadChatMedia(0, Token)
|
If MediaDownloadChatMedia And FunctionErr = FunctionErrDef Then DownloadChatMedia(0, Token)
|
||||||
End If
|
End If
|
||||||
|
If _TempMediaList.Count > 0 And Not _NameUpdated Then GetUserID(True)
|
||||||
End If
|
End If
|
||||||
Finally
|
Finally
|
||||||
Responser_ResponseReceived_RemoveHandler()
|
Responser_ResponseReceived_RemoveHandler()
|
||||||
@@ -486,7 +487,6 @@ Namespace API.OnlyFans
|
|||||||
_NameUpdated = True
|
_NameUpdated = True
|
||||||
If UpdateNameOnly Then Exit Sub
|
If UpdateNameOnly Then Exit Sub
|
||||||
ID = j.Value("id")
|
ID = j.Value("id")
|
||||||
If Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
|
||||||
UserSiteNameUpdate(j.Value("name"))
|
UserSiteNameUpdate(j.Value("name"))
|
||||||
Dim descr$ = j.Value("about")
|
Dim descr$ = j.Value("about")
|
||||||
If Not descr.IsEmptyString Then descr = descr.Replace(brTag, String.Empty)
|
If Not descr.IsEmptyString Then descr = descr.Replace(brTag, String.Empty)
|
||||||
|
|||||||
@@ -32,22 +32,26 @@ Namespace API.Reddit
|
|||||||
Property RedditAccount As String
|
Property RedditAccount As String
|
||||||
Sub SetView(ByVal Options As IRedditView)
|
Sub SetView(ByVal Options As IRedditView)
|
||||||
End Interface
|
End Interface
|
||||||
Friend Class RedditViewExchange : Implements IRedditView
|
Friend Class RedditViewExchange : Inherits Base.EditorExchangeOptionsBase : Implements IRedditView
|
||||||
Friend Const Name_ViewMode As String = "ViewMode"
|
Friend Const Name_ViewMode As String = "ViewMode"
|
||||||
Friend Const Name_ViewPeriod As String = "ViewPeriod"
|
Friend Const Name_ViewPeriod As String = "ViewPeriod"
|
||||||
Friend Const Name_RedGifsAccount As String = "RedGifsAccount"
|
Friend Const Name_RedGifsAccount As String = "RedGifsAccount"
|
||||||
Friend Const Name_RedditAccount As String = "RedditAccount"
|
Friend Const Name_RedditAccount As String = "RedditAccount"
|
||||||
Friend Property ViewMode As IRedditView.View Implements IRedditView.ViewMode
|
Friend Property ViewMode As IRedditView.View Implements IRedditView.ViewMode
|
||||||
Friend Property ViewPeriod As IRedditView.Period Implements IRedditView.ViewPeriod
|
Friend Property ViewPeriod As IRedditView.Period Implements IRedditView.ViewPeriod
|
||||||
Friend Property DownloadText As Boolean Implements IRedditView.DownloadText
|
Friend Overrides Property DownloadText As Boolean Implements IRedditView.DownloadText
|
||||||
Friend Property DownloadTextPosts As Boolean Implements IRedditView.DownloadTextPosts
|
Friend Overrides Property DownloadTextPosts As Boolean Implements IRedditView.DownloadTextPosts
|
||||||
Friend Property DownloadTextSpecialFolder As Boolean Implements IRedditView.DownloadTextSpecialFolder
|
Friend Overrides Property DownloadTextSpecialFolder As Boolean Implements IRedditView.DownloadTextSpecialFolder
|
||||||
Friend Property RedGifsAccount As String Implements IRedditView.RedGifsAccount
|
Friend Property RedGifsAccount As String Implements IRedditView.RedGifsAccount
|
||||||
Friend Property RedditAccount As String Implements IRedditView.RedditAccount
|
Friend Property RedditAccount As String Implements IRedditView.RedditAccount
|
||||||
Friend Sub New()
|
|
||||||
End Sub
|
|
||||||
Friend Sub New(ByVal Options As IRedditView)
|
Friend Sub New(ByVal Options As IRedditView)
|
||||||
|
MyBase.New(DirectCast(Options, UserData))
|
||||||
SetView(Options)
|
SetView(Options)
|
||||||
|
_ApplyBase_Name = False
|
||||||
|
End Sub
|
||||||
|
Friend Sub New(ByVal s As SiteSettings)
|
||||||
|
MyBase.New(s)
|
||||||
|
_ApplyBase_Name = False
|
||||||
End Sub
|
End Sub
|
||||||
Friend Sub SetView(ByVal Options As IRedditView) Implements IRedditView.SetView
|
Friend Sub SetView(ByVal Options As IRedditView) Implements IRedditView.SetView
|
||||||
If Not Options Is Nothing Then
|
If Not Options Is Nothing Then
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ Namespace API.Reddit
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "UserOptions"
|
#Region "UserOptions"
|
||||||
Friend Overrides Sub UserOptions(ByRef Options As Object, ByVal OpenForm As Boolean)
|
Friend Overrides Sub UserOptions(ByRef Options As Object, ByVal OpenForm As Boolean)
|
||||||
If Options Is Nothing OrElse Not TypeOf Options Is RedditViewExchange Then Options = New RedditViewExchange
|
If Options Is Nothing OrElse Not TypeOf Options Is RedditViewExchange Then Options = New RedditViewExchange(Me)
|
||||||
If OpenForm Then
|
If OpenForm Then
|
||||||
Using f As New RedditViewSettingsForm(Options, True) : f.ShowDialog() : End Using
|
Using f As New RedditViewSettingsForm(Options, True) : f.ShowDialog() : End Using
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -256,10 +256,7 @@ Namespace API.TikTok
|
|||||||
If j.Value("_type").StringToLower = "video" Then
|
If j.Value("_type").StringToLower = "video" Then
|
||||||
If Not baseDataObtained Then
|
If Not baseDataObtained Then
|
||||||
baseDataObtained = True
|
baseDataObtained = True
|
||||||
If ID.IsEmptyString Then
|
If ID.IsEmptyString Then ID = j.Value("uploader_id")
|
||||||
ID = j.Value("uploader_id")
|
|
||||||
If Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
|
||||||
End If
|
|
||||||
newName = j.Value("uploader")
|
newName = j.Value("uploader")
|
||||||
If Not newName.IsEmptyString Then NameTrue = newName
|
If Not newName.IsEmptyString Then NameTrue = newName
|
||||||
newName = j.Value("creator")
|
newName = j.Value("creator")
|
||||||
|
|||||||
@@ -487,10 +487,7 @@ Namespace API.Twitter
|
|||||||
Else
|
Else
|
||||||
With j({"data", "user", "result"})
|
With j({"data", "user", "result"})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
If ID.IsEmptyString Then
|
If ID.IsEmptyString Then ID = .Value("rest_id")
|
||||||
ID = .Value("rest_id")
|
|
||||||
If Not ID.IsEmptyString Then _ForceSaveUserInfo = True
|
|
||||||
End If
|
|
||||||
With .Item({"legacy"})
|
With .Item({"legacy"})
|
||||||
If .ListExists Then
|
If .ListExists Then
|
||||||
If .Value("screen_name").StringToLower = NameTrue.ToLower Then
|
If .Value("screen_name").StringToLower = NameTrue.ToLower Then
|
||||||
|
|||||||
@@ -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("2025.6.1.0")>
|
<Assembly: AssemblyVersion("2025.6.12.0")>
|
||||||
<Assembly: AssemblyFileVersion("2025.6.1.0")>
|
<Assembly: AssemblyFileVersion("2025.6.12.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
|||||||
Reference in New Issue
Block a user