mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-14 15:52:18 +00:00
Moved UserMedia xml initialization to the structure itself Added download with feed skip Added silent mode (temporary disabling notifications) Added additional Instagram protection Excluding users whose profiles do not exist from downloading with groups and AutoDownloader Feed: delete file bugs; reorder data after file deletion; video playback bugs SiteSettingsForm: enable 'OK' button when editing cookies Fixed collection users ban Settings: disabling ffmpeg missing notification; advanced notification management Added 'ToolStripKeyMenuItem' control Plugins: deprecated XVIDEOS and LPSG plugin libraries; moved them to SCrawler. Updated license PluginProvider: added 'BeginEdit' and 'EndEdit' function to ISiteSettings; changed GetSpecialData (ISiteSettings) return type to IEnumerable PluginsEnvironment: removed 'IsMyClass' attribute MainFrame: grouped all download buttons into one menu; reorganized code; removed 'F2' hotkey AutoDownloader: added advanced pause options; added buttons to tray icon and AutoDownloader form MissingPosts: finished; activated functions that were disabled; added download functions to UserData classes UserDataBase: ability to use responser; ability to download m3u8; extended 'DownloadingException' with optional argument 'EObj'; user index in collection (button tag) changed to user instance; extended information with user labels; updated 'ProcessException' function Replaced download buttons with 'KeyClick' control Replaced FDatePickerForm with my library's form Collections: Deleting multiple collections - disabled confirmation; ban each user in collection
37 lines
2.6 KiB
VB.net
37 lines
2.6 KiB
VB.net
' Copyright (C) 2023 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 PersonalUtilities.Functions.RegularExpressions
|
|
Namespace API.LPSG
|
|
Friend Module Declarations
|
|
Friend ReadOnly Property PhotoRegEx As RParams = RParams.DM("(https://www.lpsg.com/attachments)(.+?)(?="")", 0, RegexReturn.List)
|
|
Friend ReadOnly Property PhotoRegExExt As New RParams("img.data.src=""(/proxy[^""]+?)""", Nothing, 1, RegexReturn.List) With {
|
|
.Converter = Function(Input) $"https://www.lpsg.com/{SymbolsConverter.HTML.Decode(Input)}"}
|
|
Friend ReadOnly Property NextPageRegex As RParams = RParams.DMS("<link rel=""next"" href=""(.+?/page-(\d+))""", 2)
|
|
Private Const FileUrlRegexDefault As String = "([^/]+?)(jpg|jpeg|gif|png|webm)"
|
|
Private ReadOnly InputFReplacer As New ErrorsDescriber(EDP.ReturnValue)
|
|
Private ReadOnly InputForbidRemover As Func(Of String, String) = Function(Input) If(Input.IsEmptyString, Input, Input.StringRemoveWinForbiddenSymbols(, InputFReplacer))
|
|
Friend ReadOnly Property FileRegEx As New RParams(FileUrlRegexDefault, Nothing, 0) With {
|
|
.Converter = Function(ByVal Input As String) As String
|
|
Input = InputForbidRemover.Invoke(Input)
|
|
If Not Input.IsEmptyString Then
|
|
Dim lv$ = Input.Split("-").LastOrDefault
|
|
If Not lv.IsEmptyString Then
|
|
Input = Input.Replace($"-{lv}", String.Empty)
|
|
Input &= $".{lv}"
|
|
End If
|
|
End If
|
|
Return Input
|
|
End Function}
|
|
Friend ReadOnly Property FileRegExExt As New RParams(FileUrlRegexDefault, 0, Nothing, InputForbidRemover)
|
|
Friend ReadOnly Property FileRegExExt2 As New RParams("([^/]+?)(?=(\Z|&))", 0, Nothing, InputForbidRemover)
|
|
Friend ReadOnly Property FileExistsRegEx As RParams = RParams.DMS(FileUrlRegexDefault, 2)
|
|
Friend ReadOnly Property TempListAddParams As New ListAddParams(LAP.NotContainsOnly) With {.Comparer = New FComparer(Of UserMedia)(Function(x, y) x.URL = y.URL)}
|
|
End Module
|
|
End Namespace |