Skip to content

Commit 4d74f52

Browse files
committed
2025.1.12.0
YT YouTubeSettings: add 'FileAddChannelToFileName' property YouTubeMediaContainerBase: add channel name and video URL to info file; add channel name to file name SCrawler DownDetector: fix 403 error; add 'IDownDetector' interface and 'Checker' class; create an isolated environment API.Instagram: update 'SiteSettings' to the new 'DownDetector' environment; make 'PostKV' public; add static function 'LoadSavePostsKV' API.OnlyFans: add 'EnableCookiesUpdate' hidden property; add support for DRM keys; add the ability to disable cookie updates API.Pinterest: add 'x-pinterest-pws-handler' header API.Reddit: update 'SiteSettings' to the new 'DownDetector' environment API.ThisVid: fix subscription videos images API.Threads: change 'heic' extension to 'jpg' API.Twitter: add broadcasts download API.Xhamster: fix absolute M3U8 URLs API.YouTube: add support of personal API instances ('YouTube-operational-API') for download communities SiteEditorForm: add 'Ctrl+Enter' hotkey to force save settings, ignoring requirements PluginsEnvironment.Attributes: add 'UseDownDetectorAttribute' attribute SettingsHost: update to the new 'DownDetector' environment; add 'AvailableDownDetector' property SettingsHostCollection: update to the new 'DownDetector' environment; minor bugs in multiprofile SettingsCLS: add 'DownDetectorEnabled' property
1 parent b428327 commit 4d74f52

30 files changed

Lines changed: 742 additions & 280 deletions

File tree

Changelog.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# 2025.1.12.0
2+
3+
*2025-01-12*
4+
5+
- Added
6+
- Sites:
7+
- YouTube (standalone app):
8+
- ability to add channel name to file name (`Add channel to file name`)
9+
- adding channel name and video URL to info file
10+
- OnlyFans: **built-in usage of DRM keys**
11+
- Threads: automatically change `heic` extension to `jpg`
12+
- Twitter: download broadcasts *(user option)*
13+
- Minor improvements
14+
- Updated
15+
- yt-dlp up to version **2024.12.23**
16+
- gallery-dl up to version **1.28.3**
17+
- **OF-Scraper** up to version **3.12.9** *(you must update it personally)*
18+
- Fixed
19+
- Sites:
20+
- DownDetector: fixed 403 error
21+
- OnlyFans: **DRM videos not downloading**
22+
- xHamster: some videos are not downloading
23+
- YouTube: **communities are not downloading** *(see settings in wiki)*
24+
- Minor bugs
25+
126
# 2024.11.21.0
227

328
*2024-11-21*

FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ I strongly recommend you to **regularly** create backup copies of the settings f
5555
- [Video how to configure](#video-how-to-configure)
5656
- **Antivirus**
5757
- **Antivirus detects SCrawler as a virus** :arrow_forward: SCrawler doesn't contain any viruses at all. All code is posted on GitHub. You can review it. I have nothing to hide. SCrawler just downloads pictures and videos. That's all. If you trust SCrawler, you should just add it to the antivirus exceptions, as I did. Sometimes antiviruses identify SCawler as a virus. This is usually related to the number of files being edited (users' settings files) and the number of files being downloaded. In this case, the antivirus can also remove these files, which will damage users' settings. **If you don't trust SCrawler, just delete it.**
58-
- **Antivirus detects gallery-dl as a virus** :arrow_forward: it's a trustworthy program that is trusted by thousands of people around the world. Antiviruses identify some builds as containing viruses, but this is not true. **If you don't trust gallery-dl, you can simply delete it**. **But if you delete it, you won't be able to download [Twitter & Pinterest](https://github.com/AAndyProgram/SCrawler/wiki/Settings#gallery-dl).** You should decide for yourself.
58+
- **Antivirus detects gallery-dl as a virus** :arrow_forward: it's a trustworthy program that is trusted by thousands of people around the world. Antiviruses identify some builds as containing viruses, but this is not true. **If you don't trust gallery-dl, you can simply delete it. But if you delete it, you won't be able to download [Twitter & Pinterest](https://github.com/AAndyProgram/SCrawler/wiki/Settings#gallery-dl).** You should decide for yourself.
5959

6060
## Sites questions
6161

@@ -67,7 +67,7 @@ I strongly recommend you to **regularly** create backup copies of the settings f
6767
- TikTok: works via yt-dlp. If something doesn't download, we need to wait until yt-dlp fixes it. TikTok doesn't require cookies to download.
6868
- Porn sites: **COOKIES**!
6969
- ThisVid: https://github.com/AAndyProgram/SCrawler/wiki/Settings#thisvid-faq
70-
- **OnlyFans**: cookies + **all fields** + [OF-Scraper (download the correct version that I pointed)](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper) & [mp4decrypt](https://www.bento4.com/downloads/) to download DRM protected videos. [OF-Scraper support](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper-support). Also read [this](https://github.com/AAndyProgram/SCrawler/wiki/Settings#onlyfans-faq)
70+
- **OnlyFans**: cookies + **all fields** + [OF-Scraper (download the correct version that I pointed)](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper) & [mp4decrypt](https://www.bento4.com/downloads/) & **DRM keys** to download DRM protected videos. [OF-Scraper support](https://github.com/AAndyProgram/SCrawler/wiki/Settings#of-scraper-support). Also read [this](https://github.com/AAndyProgram/SCrawler/wiki/Settings#onlyfans-faq)
7171
- **JustForFans**: **THE VIDEO ISN'T DOWNLOADING AT THE MOMENT** ([Issue](https://discord.com/channels/1124032649682493462/1205547615199039551/1231349555132366870))
7272

7373
## Other questions

SCrawler.YouTube/Base/YouTubeSettings.vb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Namespace API.YouTube.Base
191191
<Browsable(True), GridVisible, XMLVN({"Defaults"}), Category("Defaults"), DisplayName("Use cookies"),
192192
Description("By default, use cookies when downloading from YouTube.")>
193193
Public ReadOnly Property DefaultUseCookies As XMLValue(Of Boolean)
194-
<Browsable(True), GridVisible, XMLVN({"Defaults"}, Protocols.Any), Category("Defaults"), DisplayName("Protocol"),
194+
<Browsable(True), GridVisible, XMLVN({"Defaults"}, Protocols.https), Category("Defaults"), DisplayName("Protocol"),
195195
Description("Priority download protocol. Default: 'Any'")>
196196
Public ReadOnly Property DefaultProtocol As XMLValue(Of Protocols)
197197
<Browsable(True), GridVisible(False), XMLVN({"Defaults"}), Category("Defaults"),
@@ -267,6 +267,9 @@ Namespace API.YouTube.Base
267267
<Browsable(True), GridVisible, XMLVN({"Defaults"}), Category("Defaults"), DisplayName("Add date to title: video list"),
268268
Description("Add video upload date before video title (visual only) in the video list")>
269269
Public ReadOnly Property FileAddDateToFileName_VideoList As XMLValue(Of Boolean)
270+
<Browsable(True), GridVisible, XMLVN({"Defaults"}, FileDateMode.None), Category("Defaults"), DisplayName("Add channel to file name"),
271+
Description("Add channel name before/after the file name")>
272+
Public ReadOnly Property FileAddChannelToFileName As XMLValue(Of FileDateMode)
270273
#End Region
271274
#Region "Defaults ChannelsDownload"
272275
<Browsable(True), GridVisible, XMLVN({"Defaults", "Channels"}), Category("Defaults"), DisplayName("Default download tabs for channels"),

SCrawler.YouTube/My Project/AssemblyInfo.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
1313
<Assembly: AssemblyDescription("YouTube plugin environment")>
1414
<Assembly: AssemblyCompany("AndyProgram")>
1515
<Assembly: AssemblyProduct("SCrawler.YouTube")>
16-
<Assembly: AssemblyCopyright("Copyright © 2024")>
16+
<Assembly: AssemblyCopyright("Copyright © 2025")>
1717
<Assembly: AssemblyTrademark("AndyProgram")>
1818

1919
<Assembly: ComVisible(False)>
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
3232
' by using the '*' as shown below:
3333
' <Assembly: AssemblyVersion("1.0.*")>
3434

35-
<Assembly: AssemblyVersion("2024.10.24.0")>
36-
<Assembly: AssemblyFileVersion("2024.10.24.0")>
35+
<Assembly: AssemblyVersion("2025.1.12.0")>
36+
<Assembly: AssemblyFileVersion("2025.1.12.0")>
3737
<Assembly: NeutralResourcesLanguage("en")>

SCrawler.YouTube/Objects/YouTubeMediaContainerBase.vb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,10 +685,17 @@ Namespace API.YouTube.Objects
685685
Friend Sub FileDateUpdate()
686686
Dim n$ = _File.Name.StringTrim
687687
Dim s$ = IIf(n.IsEmptyString, String.Empty, " ")
688+
Dim c$ = AccountName.IfNullOrEmpty(UserID)
688689
Select Case MyYouTubeSettings.FileAddDateToFileName.Value
689690
Case FileDateMode.Before : n = $"[{DateAdded:yyyy-MM-dd}]{s}{n}"
690691
Case FileDateMode.After : n = $"{n}{s}[{DateAdded:yyyy-MM-dd}]"
691692
End Select
693+
If Not c.IsEmptyString Then
694+
Select Case MyYouTubeSettings.FileAddChannelToFileName.Value
695+
Case FileDateMode.Before : n = $"[{c}] {n}"
696+
Case FileDateMode.After : n = $"{n} [{c}]"
697+
End Select
698+
End If
692699
_File.Name = n
693700
End Sub
694701
Public Property FileSettings As SFile
@@ -1214,6 +1221,9 @@ Namespace API.YouTube.Objects
12141221
fileDesr.Extension = "txt"
12151222
Using fileDesrText As New TextSaver(fileDesr)
12161223
If .CreateDescriptionFiles_AddUploadDate Then fileDesrText.Append($"Uploaded: {DateAdded:yyyy-MM-dd HH:mm:ss}")
1224+
fileDesrText.AppendLine($"URL: {URL}")
1225+
fileDesrText.AppendLine($"Channel name: {AccountName}")
1226+
fileDesrText.AppendLine($"Channel ID: {UserID}")
12171227
If Not Description.IsEmptyString Then
12181228
If Not fileDesrText.IsEmptyString Then fileDesrText.AppendLine.AppendLine()
12191229
fileDesrText.Append(Description)

SCrawler.YouTubeDownloader/My Project/AssemblyInfo.vb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
1313
<Assembly: AssemblyDescription("SCrawler YouTube downloader")>
1414
<Assembly: AssemblyCompany("AndyProgram")>
1515
<Assembly: AssemblyProduct("SCrawler.YouTubeDownloader")>
16-
<Assembly: AssemblyCopyright("Copyright © 2024")>
16+
<Assembly: AssemblyCopyright("Copyright © 2025")>
1717
<Assembly: AssemblyTrademark("AndyProgram")>
1818

1919
<Assembly: ComVisible(False)>
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
3232
' by using the '*' as shown below:
3333
' <Assembly: AssemblyVersion("1.0.*")>
3434

35-
<Assembly: AssemblyVersion("2024.10.24.0")>
36-
<Assembly: AssemblyFileVersion("2024.10.24.0")>
35+
<Assembly: AssemblyVersion("2025.1.12.0")>
36+
<Assembly: AssemblyFileVersion("2025.1.12.0")>
3737
<Assembly: NeutralResourcesLanguage("en")>

SCrawler/API/Base/DownDetector.vb

Lines changed: 97 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
'
77
' This program is distributed in the hope that it will be useful,
88
' but WITHOUT ANY WARRANTY
9-
Imports System.Net
9+
Imports SCrawler.Plugin
1010
Imports PersonalUtilities.Functions.RegularExpressions
11+
Imports Download = SCrawler.Plugin.ISiteSettings.Download
1112
Namespace API.Base
1213
Friend NotInheritable Class DownDetector
1314
Private Shared ReadOnly Property Params As New RParams("x:.'([\S]+?)',.y:.(\d+)", -1, Nothing, RegexReturn.List)
@@ -34,34 +35,106 @@ Namespace API.Base
3435
Try
3536
Dim l As List(Of Data) = Nothing
3637
Dim l2 As List(Of Data) = Nothing
37-
Using w As New WebClient
38-
Dim r$ = w.DownloadString($"https://downdetector.co.uk/status/{Site}/")
39-
If Not r.IsEmptyString Then
40-
l = RegexFields(Of Data)(r, {Params}, {1, 2})
41-
If l.ListExists(2) Then
42-
l.Sort()
43-
l2 = New List(Of Data)
44-
Dim d As Data
45-
Dim eDates As New List(Of Date)
46-
Dim MaxValue As Func(Of Date, Integer) = Function(dd) (From ddd In l Where ddd.Date = dd Select ddd.Value).DefaultIfEmpty(0).Max
47-
For i% = 0 To l.Count - 1
48-
If Not eDates.Contains(l(i).Date) Then
49-
d = l(i)
50-
d.Value = MaxValue(d.Date)
51-
l2.Add(d)
52-
eDates.Add(d.Date)
53-
End If
54-
Next
55-
eDates.Clear()
56-
l.Clear()
57-
l2.Sort()
58-
End If
38+
Dim r$ = GetWebString($"https://downdetector.co.uk/status/{Site}/",, EDP.ThrowException)
39+
If Not r.IsEmptyString Then
40+
l = RegexFields(Of Data)(r, {Params}, {1, 2})
41+
If l.ListExists(2) Then
42+
l.Sort()
43+
l2 = New List(Of Data)
44+
Dim d As Data
45+
Dim eDates As New List(Of Date)
46+
Dim MaxValue As Func(Of Date, Integer) = Function(dd) (From ddd As Data In l Where ddd.Date = dd Select ddd.Value).DefaultIfEmpty(0).Max
47+
For i% = 0 To l.Count - 1
48+
If Not eDates.Contains(l(i).Date) Then
49+
d = l(i)
50+
d.Value = MaxValue(d.Date)
51+
l2.Add(d)
52+
eDates.Add(d.Date)
53+
End If
54+
Next
55+
eDates.Clear()
56+
l.Clear()
57+
l2.Sort()
5958
End If
60-
End Using
59+
End If
6160
Return l2
6261
Catch ex As Exception
6362
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, $"[DownDetector.GetData({Site})]")
6463
End Try
6564
End Function
65+
Friend Interface IDownDetector
66+
ReadOnly Property Value As Integer
67+
ReadOnly Property AddToLog As Boolean
68+
ReadOnly Property CheckSite As String
69+
Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean
70+
End Interface
71+
Friend Class Checker(Of T As {ISiteSettings, IDownDetector})
72+
Protected ReadOnly Property Source As T
73+
Private ReadOnly NP As New ANumbers With {.FormatOptions = ANumbers.Options.GroupIntegral}
74+
Friend Sub New(ByRef _Source As T)
75+
Source = _Source
76+
End Sub
77+
Private ____AvailableChecked As Boolean = False
78+
Private ____AvailableResult As Boolean = False
79+
Friend Overridable Function Available(ByVal What As Download, ByVal Silent As Boolean) As Boolean
80+
If Settings.DownDetectorEnabled And Source.Value >= 0 Then
81+
If Not ____AvailableChecked Then
82+
____AvailableResult = AvailableImpl(What, Silent)
83+
____AvailableChecked = True
84+
End If
85+
Return ____AvailableResult
86+
Else
87+
Return True
88+
End If
89+
End Function
90+
Protected Overridable Function AvailableImpl(ByVal What As Download, ByVal Silent As Boolean) As Boolean
91+
Try
92+
Source.AvailableText = String.Empty
93+
If Source.Value < 0 Then
94+
Return True
95+
Else
96+
Dim dl As List(Of Data) = GetData(Source.CheckSite)
97+
If dl.ListExists Then
98+
dl = dl.Take(4).ToList
99+
Dim avg% = dl.Average(Function(d) d.Value)
100+
If avg > Source.Value Then
101+
Source.AvailableText = $"Over the past hour, {Source.Site} has received an average of {avg.NumToString(NP)} outage reports:{vbCr}{dl.ListToString(vbCr)}"
102+
If Source.AddToLog Then MyMainLOG = Source.AvailableText
103+
If Silent Then
104+
Return AvailableImpl_FALSE_SILENT()
105+
Else
106+
If MsgBoxE({$"{Source.AvailableText}{vbCr}{vbCr}Do you want to continue parsing {Source.Site} data?",
107+
$"There are outage reports on {Source.Site}"}, vbYesNo) = vbYes Then
108+
Return AvailableImpl_FALSE_SILENT_NOT_MSG_YES()
109+
Else
110+
Return AvailableImpl_FALSE_SILENT_NOT_MSG_NO()
111+
End If
112+
End If
113+
End If
114+
End If
115+
Return AvailableImpl_TRUE()
116+
End If
117+
Catch ex As Exception
118+
Return ErrorsDescriber.Execute(EDP.SendToLog + EDP.ReturnValue, ex, $"[API.{Source.Site}.SiteSettings.Available([DownDetector])]", True)
119+
End Try
120+
End Function
121+
Protected Overridable Function AvailableImpl_TRUE() As Boolean
122+
Return True
123+
End Function
124+
Protected Overridable Function AvailableImpl_FALSE_SILENT() As Boolean
125+
Return False
126+
End Function
127+
Protected Overridable Function AvailableImpl_FALSE_SILENT_NOT_MSG_YES() As Boolean
128+
Return True
129+
End Function
130+
Protected Overridable Function AvailableImpl_FALSE_SILENT_NOT_MSG_NO() As Boolean
131+
Return False
132+
End Function
133+
Friend Overridable Sub Reset()
134+
____AvailableChecked = False
135+
____AvailableResult = False
136+
Source.AvailableText = String.Empty
137+
End Sub
138+
End Class
66139
End Class
67140
End Namespace

0 commit comments

Comments
 (0)