Skip to content

Commit fff63d0

Browse files
committed
2025.3.17.0
API.SiteSettingsBase: fix incorrect class initializer API.UserDataBase: add all objects to xml (STD) API.Facebook: fix downloading reels from noname profiles API.Pinterest: remove 'UserOptions' overrides (SiteSettings); add 'PwsHeader' to 'GetBoards' API.PornHub: fix 'UpdateUserOptions' function ('NameTrue') API.Threads: fix 'pinned' posts API.TikTok: add photos download
1 parent 2f83892 commit fff63d0

File tree

13 files changed

+306
-89
lines changed

13 files changed

+306
-89
lines changed

Changelog.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# 2025.3.17.0
2+
3+
*2025-03-17*
4+
5+
- Added
6+
- **TikTok: downloading photos**
7+
- Updated
8+
- gallery-dl up to version **1.29.2**
9+
- Fixed
10+
- Sites
11+
- Facebook: reels aren't downloaded from noname profiles
12+
- PornHub: newly added users aren't downloading
13+
- Threads: users aren't updated if there is a pinned post
14+
115
# 2025.2.25.0
216

317
*2025-02-25*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ A program to download photo and video from [any site](#supported-sites) (e.g. Yo
4545
- Instagram images and videos, tagged posts, stories, saved posts;
4646
- Threads images and videos, saved posts;
4747
- Facebook images and videos, stories, saved posts;
48-
- TikTok videos;
48+
- TikTok images and videos;
4949
- Pinterest boards, users, saved posts;
5050
- Imgur images, galleries and videos;
5151
- Gfycat videos;

SCrawler/API/Base/SiteSettingsBase.vb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ Namespace API.Base
394394
With c.GetParameters
395395
If .ListExists Then
396396
If .Count = 1 Then
397-
Return .Self()(0).ParameterType.GetInterfaces.ListIfNothing.Where(Function(i) i Is Me.GetType).Count = 1
397+
Return .Self()(0).ParameterType Is Me.GetType
398398
Else
399399
Return False
400400
End If
@@ -412,7 +412,8 @@ Namespace API.Base
412412
End If
413413
End With
414414
If Not constructor Is Nothing Then
415-
If args > 0 AndAlso Not constructor.GetParameters()(0).ParameterType Is GetType(ISiteSettings) Then Throw New Exception
415+
If args > 0 AndAlso constructor.GetParameters()(0).ParameterType.GetInterface(GetType(ISiteSettings).Name) Is Nothing Then _
416+
Throw New Exception("Class Interface type is incompatible")
416417
If args = 0 Then Options = constructor.Invoke(Nothing) Else Options = constructor.Invoke({Me})
417418
End If
418419
If Options Is Nothing Then Options = Activator.CreateInstance(_UserOptionsType)

SCrawler/API/Base/UserDataBase.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,7 @@ BlockNullPicture:
14611461
Data.DownloadState = UserMediaStates.Missing
14621462
End If
14631463
YouTube.Objects.YouTubeMediaContainerBase.Update(_ContentNew(0), Data)
1464+
If _ContentNew.Count > 1 Then Data.Files.ListAddList(_ContentNew.Select(Function(cc) cc.File), LNC)
14641465
If ResetTitle And Not _ContentNew(0).File.Name.IsEmptyString Then Data.Title = _ContentNew(0).File.Name
14651466
Else
14661467
Data.DownloadState = UserMediaStates.Missing

SCrawler/API/Facebook/UserData.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ Namespace API.Facebook
638638
End If
639639
End Function
640640
Private Sub GetVideoPageID(ByVal GetReels As Boolean, ByVal Token As CancellationToken)
641-
Dim URL$ = $"{GetProfileUrl()}\{IIf(GetReels, "reels", "videos")}"
641+
Dim URL$ = $"{GetProfileUrl()}{IIf(IsNoNameProfile, "&sk=", "/")}{IIf(GetReels, IIf(IsNoNameProfile, "reels_tab", "reels"), "videos")}"
642642
Dim resp As Responser = HtmlResponserCreate()
643643
Try
644644
WaitTimer()

SCrawler/API/Pinterest/SiteSettings.vb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Namespace API.Pinterest
3131
CheckNetscapeCookiesOnEndInit = True
3232
UseNetscapeCookies = True
3333
UserRegex = RParams.DMS("https?://w{0,3}.?[^/]*?.?pinterest.com/([^/]+)/?(?(_)|([^/]*))/?([^/\?]*)", 0, RegexReturn.ListByMatch, EDP.ReturnValue)
34+
UserOptionsType = GetType(EditorExchangeOptions)
3435
End Sub
3536
#End Region
3637
#Region "GetInstance, Available"
@@ -72,12 +73,6 @@ Namespace API.Pinterest
7273
Return String.Empty
7374
End If
7475
End Function
75-
Friend Overrides Sub UserOptions(ByRef Options As Object, ByVal OpenForm As Boolean)
76-
If Options Is Nothing Then Options = New EditorExchangeOptions
77-
If OpenForm Then
78-
Using f As New InternalSettingsForm(Options, Me, False) : f.ShowDialog() : End Using
79-
End If
80-
End Sub
8176
#End Region
8277
End Class
8378
End Namespace

SCrawler/API/Pinterest/UserData.vb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ Namespace API.Pinterest
170170
urls.ListAddList(GetDataFromGalleryDL(URL, True, Token), LNC)
171171
If urls.ListExists Then urls.RemoveAll(Function(__url) Not __url.Contains("BoardsResource/get/"))
172172
If urls.ListExists Then
173+
Responser.Headers.Add(PwsHeader)
173174
ProgressPre.ChangeMax(urls.Count)
174175
For Each URL In urls
175176
ProgressPre.Perform()
@@ -193,6 +194,8 @@ Namespace API.Pinterest
193194
Catch ex As Exception
194195
ProcessException(ex, Token, $"data (gallery-dl boards) downloading error [{URL}]")
195196
Return Nothing
197+
Finally
198+
Responser.Headers.Remove(PwsHeader)
196199
End Try
197200
End Function
198201
Private Sub DownloadBoardImages(ByRef Board As BoardInfo, ByVal Token As CancellationToken)

SCrawler/API/PornHub/UserData.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Namespace API.PornHub
195195
If Not Force OrElse (Not IsUser AndAlso Not SiteMode = SiteModes.Playlists AndAlso Not NewUrl.IsEmptyString AndAlso MyFileSettings.Exists) Then
196196
Dim eObj As Plugin.ExchangeOptions = Nothing
197197
If Force Then eObj = MySettings.IsMyUser(NewUrl)
198-
If (Force And Not eObj.UserName.IsEmptyString) Or (Not Force And Not Name.IsEmptyString And NameTrue.IsEmptyString) Then
198+
If (Force And Not eObj.UserName.IsEmptyString) Or (Not Force And Not Name.IsEmptyString And NameTrue(True).IsEmptyString) Then
199199
If Not If(Force, eObj.Options, Options).IsEmptyString Then
200200
If (IsUser Or SiteMode = SiteModes.Playlists) And Force Then
201201
Return False
@@ -241,7 +241,7 @@ Namespace API.PornHub
241241
SiteMode = .Value(Name_SiteMode).FromXML(Of Integer)(SiteModes.User)
242242
UpdateUserOptions()
243243
Else
244-
If UpdateUserOptions() Then .Value(Name_LabelsName) = LabelsString
244+
If UpdateUserOptions() Then .Value(Name_LabelsName) = LabelsString : .Value(Name_TrueName) = NameTrue(True)
245245
.Add(Name_PersonType, PersonType)
246246
.Add(Name_DownloadUHD, DownloadUHD.BoolToInteger)
247247
.Add(Name_DownloadUploaded, DownloadUploaded.BoolToInteger)

SCrawler/API/ThreadsNet/UserData.vb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,13 @@ Namespace API.ThreadsNet
128128
If IsSavedPosts Then
129129
Return False
130130
Else
131-
If MaxLastDownDate.HasValue Then
132-
Dim d As Date? = AConvert(Of Date)(Items(Index).ItemF(DefaultParser_ElemNode_Default).Value("taken_at"), UnixDate32Provider, Nothing)
133-
If d.HasValue Then Return d.Value < MaxLastDownDate.Value
134-
End If
131+
With Items(Index).ItemF(DefaultParser_ElemNode)
132+
Return .Value({"text_post_app_info", "pinned_post_info"}, "is_pinned_to_profile").FromXML(Of Boolean)(False)
133+
If MaxLastDownDate.HasValue Then
134+
Dim d As Date? = AConvert(Of Date)(.Value("taken_at"), UnixDate32Provider, Nothing)
135+
If d.HasValue Then Return d.Value <= MaxLastDownDate.Value
136+
End If
137+
End With
135138
Return Not FirstLoadingDone
136139
End If
137140
Catch ex As Exception

SCrawler/API/TikTok/Declarations.vb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
'
77
' This program is distributed in the hope that it will be useful,
88
' but WITHOUT ANY WARRANTY
9+
Imports System.Text.RegularExpressions
910
Imports PersonalUtilities.Functions.RegularExpressions
1011
Namespace API.TikTok
1112
Friend Module Declarations
1213
Friend ReadOnly SimpleDateConverter As New ADateTime("yyyyMMdd")
1314
Friend ReadOnly RegexTagsReplacer As RParams = RParams.DM("#\w+\s?", -1, RegexReturn.Replace,
1415
CType(Function(input$) String.Empty, Func(Of String, String)), EDP.ReturnValue)
16+
Friend ReadOnly RegexPhotoJson As RParams = RParams.DMS("UNIVERSAL_DATA_FOR_REHYDRATION__"" type=""application/json""\>([^\<]+)\<", 1,
17+
RegexOptions.IgnoreCase, EDP.ReturnValue)
1518
End Module
1619
End Namespace

0 commit comments

Comments
 (0)