mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-15 08:12:17 +00:00
2024.4.26.0
Add 'CookieValueExtractorAttribute' and the ability to immediately populate fields with values that can be extracted from cookies Feed: add the ability to load the last session of the current day (if it exists) as the current session after restarting SCrawler UserSearchForm: include friendly name matches in search result API.Xhamster: saved posts aren't downloading
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
'
|
||||
' This program is distributed in the hope that it will be useful,
|
||||
' but WITHOUT ANY WARRANTY
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports PersonalUtilities.Forms
|
||||
Imports PersonalUtilities.Functions.RegularExpressions
|
||||
Namespace API.Base
|
||||
@@ -72,5 +73,12 @@ Namespace API.Base
|
||||
$"Current query: [{CurrentQuery}]{vbCr}New query: [{NewQuery}]",
|
||||
"Changing a query"}, vbExclamation,,, {"Process", "Cancel"}) = 0
|
||||
End Function
|
||||
<Extension> Friend Function GetCookieValue(ByVal Cookies As IEnumerable(Of System.Net.Cookie), ByVal CookieName As String) As String
|
||||
If Cookies.ListExists Then Return If(Cookies.FirstOrDefault(Function(c) c.Name.ToLower = CookieName.ToLower)?.Value, String.Empty) Else Return String.Empty
|
||||
End Function
|
||||
<Extension> Friend Function GetCookieValue(ByVal Cookies As IEnumerable(Of System.Net.Cookie), ByVal CookieName As String,
|
||||
ByVal PropName As String, ByVal PropNameComp As String) As String
|
||||
Return If(PropName = PropNameComp, Cookies.GetCookieValue(CookieName), String.Empty)
|
||||
End Function
|
||||
End Module
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user