mirror of
https://github.com/AAndyProgram/SCrawler.git
synced 2026-03-14 15:52:18 +00:00
2022.6.6.0
Minor fixes Fixed Twitter gifs
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
# 2022.6.6.0
|
||||
|
||||
- Added
|
||||
- Ability to pause automation
|
||||
- Fixed
|
||||
- GIFs from Twitter not downloading
|
||||
- Not quite correct algorithm for stopping automation
|
||||
|
||||
# 2022.6.3.0
|
||||
|
||||
Changed version numbering method. From now on, new versions will be numbered by release date (YYYY.M.D)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 6.8 KiB |
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.6.3.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.6.3.0")>
|
||||
<Assembly: AssemblyVersion("2022.6.6.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.6.6.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
@@ -29,7 +29,7 @@ Public Class SettingsForm : Implements IOkCancelToolbar
|
||||
MyDefs.InvokeLoaderError(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
Settings.Domains.Clear()
|
||||
With LIST_DOMAINS
|
||||
If .Items.Count > 0 Then
|
||||
@@ -39,7 +39,7 @@ Public Class SettingsForm : Implements IOkCancelToolbar
|
||||
Settings.UpdateDomains()
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(Windows.Forms.DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub BTT_ADD_Click(sender As Object, e As EventArgs) Handles BTT_ADD.Click
|
||||
|
||||
@@ -30,14 +30,14 @@ Namespace API.Instagram
|
||||
.EndLoaderOperations()
|
||||
End With
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
With MyExchangeOptions
|
||||
.GetStories = CH_GET_STORIES.Checked
|
||||
.GetTagged = CH_GET_TAGGED.Checked
|
||||
End With
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -53,7 +53,7 @@ Namespace API.Reddit
|
||||
MyDefs.InvokeLoaderError(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
With MyOptions
|
||||
Select Case True
|
||||
Case OPT_VIEW_MODE_HOT.Checked : .ViewMode = CView.Hot
|
||||
@@ -71,7 +71,7 @@ Namespace API.Reddit
|
||||
End With
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub OPT_VIEW_MODE_NEW_CheckedChanged(sender As Object, e As EventArgs) Handles OPT_VIEW_MODE_NEW.CheckedChanged
|
||||
|
||||
@@ -197,6 +197,7 @@ Namespace API.Twitter
|
||||
#Region "Video options"
|
||||
Private Function CheckVideoNode(ByVal w As EContainer, ByVal PostID As String, ByVal PostDate As String) As Boolean
|
||||
Try
|
||||
If CheckForGif(w, PostID, PostDate) Then Return True
|
||||
Dim URL$ = GetVideoNodeURL(w)
|
||||
If Not URL.IsEmptyString Then
|
||||
Dim f$ = UrlFile(URL)
|
||||
@@ -212,6 +213,41 @@ Namespace API.Twitter
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Function CheckForGif(ByVal w As EContainer, ByVal PostID As String, ByVal PostDate As String) As Boolean
|
||||
Try
|
||||
Dim gifUrl As Predicate(Of EContainer) = Function(e) Not e.Value("content_type").IsEmptyString AndAlso
|
||||
e.Value("content_type").Contains("mp4") AndAlso
|
||||
Not e.Value("url").IsEmptyString
|
||||
Dim url$, ff$
|
||||
Dim f As SFile
|
||||
Dim m As UserMedia
|
||||
With w({"extended_entities", "media"}).XmlIfNothing
|
||||
If .Count > 0 Then
|
||||
For Each n As EContainer In .Self
|
||||
If n.Value("type") = "animated_gif" Then
|
||||
With n({"video_info", "variants"}).XmlIfNothing.ItemF({gifUrl}).XmlIfNothing
|
||||
url = .Value("url")
|
||||
ff = UrlFile(url)
|
||||
If Not ff.IsEmptyString Then
|
||||
If Not _DataNames.Contains(ff) Then
|
||||
m = MediaFromData(url, PostID, PostDate)
|
||||
f = m.File
|
||||
If Not f.IsEmptyString Then f.Name = $"GIF_{f.Name}" : m.File = f
|
||||
_TempMediaList.ListAddValue(m, LNC)
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End With
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End With
|
||||
Return False
|
||||
Catch ex As Exception
|
||||
LogError(ex, "[API.Twitter.UserData.CheckForGif]")
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
Private Shared Function GetVideoNodeURL(ByVal w As EContainer) As String
|
||||
Dim v As EContainer = w.GetNode(VideoNode)
|
||||
If Not v Is Nothing AndAlso v.Count > 0 Then
|
||||
|
||||
@@ -47,13 +47,13 @@ Friend Class ChannelsStatsForm : Implements IOkCancelDeleteToolbar
|
||||
CMB_CHANNELS.EndUpdate()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub ToolbarBttDelete() Implements IOkCancelDeleteToolbar.ToolbarBttDelete
|
||||
Private Sub Delete() Implements IOkCancelDeleteToolbar.Delete
|
||||
Try
|
||||
Dim c As List(Of String) = CMB_CHANNELS.Items.CheckedItems.Select(Function(cc) CStr(cc.Value(1))).ListIfNothing
|
||||
If c.ListExists Then
|
||||
|
||||
@@ -79,7 +79,7 @@ Namespace DownloadObjects
|
||||
Private Sub AutoDownloaderEditorForm_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
MyGroups.Clear()
|
||||
End Sub
|
||||
Friend Sub SaveSetiings() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Friend Sub SaveSettings() Implements IOkCancelToolbar.OK
|
||||
If If(MyDefs.MyFieldsChecker?.AllParamsOK, True) Then
|
||||
With Settings.Automation
|
||||
Select Case True
|
||||
@@ -98,7 +98,7 @@ Namespace DownloadObjects
|
||||
If Not IsControlForm Then MyDefs.CloseForm()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub TXT_GROUPS_ActionOnButtonClick(ByVal Sender As ActionButton) Handles TXT_GROUPS.ActionOnButtonClick
|
||||
|
||||
@@ -63,7 +63,7 @@ Namespace DownloadObjects.Groups
|
||||
.EndLoaderOperations()
|
||||
End With
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
If MyDefs.MyFieldsChecker.AllParamsOK Then
|
||||
If MyGroup Is Nothing Then MyGroup = New DownloadGroup
|
||||
With MyGroup
|
||||
@@ -74,7 +74,7 @@ Namespace DownloadObjects.Groups
|
||||
MyDefs.CloseForm()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -43,7 +43,7 @@ Namespace Editors
|
||||
Private Sub CollectionEditorForm_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
If e.KeyCode = Keys.Insert Then AddNewCollection() : e.Handled = True Else e.Handled = False
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
If CMB_COLLECTIONS.SelectedIndex >= 0 Then
|
||||
Collection = CMB_COLLECTIONS.Value.ToString
|
||||
MyDefs.CloseForm()
|
||||
@@ -51,7 +51,7 @@ Namespace Editors
|
||||
MsgBoxE("Collection not selected", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub CMB_COLLECTIONS_ActionOnButtonClick(ByVal Sender As ActionButton) Handles CMB_COLLECTIONS.ActionOnButtonClick
|
||||
@@ -59,7 +59,7 @@ Namespace Editors
|
||||
End Sub
|
||||
Private Sub CMB_COLLECTIONS_ActionOnListDoubleClick(ByVal _Item As ListViewItem) Handles CMB_COLLECTIONS.ActionOnListDoubleClick
|
||||
_Item.Selected = True
|
||||
ToolbarBttOK()
|
||||
OK()
|
||||
End Sub
|
||||
Private Sub AddNewCollection()
|
||||
Dim c$ = InputBoxE("Enter new collection name:", "Collection name")
|
||||
|
||||
@@ -107,7 +107,7 @@ Namespace Editors
|
||||
Private Sub GlobalSettingsForm_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
Automation.Dispose()
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
If MyDefs.MyFieldsChecker.AllParamsOK Then
|
||||
With Settings
|
||||
Dim a As Func(Of String, Object, Integer) =
|
||||
@@ -195,14 +195,14 @@ Namespace Editors
|
||||
.ChannelsAddUserImagesFromAllChannels.Value = CH_COPY_CHANNEL_USER_IMAGE_ALL.Checked
|
||||
.ChannelsDefaultTemporary.Value = CH_CHANNELS_USERS_TEMP.Checked
|
||||
|
||||
Automation.SaveSetiings()
|
||||
Automation.SaveSettings()
|
||||
|
||||
.EndUpdate()
|
||||
End With
|
||||
MyDefs.CloseForm()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub TXT_GLOBAL_PATH_ActionOnButtonClick(ByVal Sender As ActionButton) Handles TXT_GLOBAL_PATH.ActionOnButtonClick
|
||||
|
||||
@@ -68,7 +68,7 @@ Friend Class LabelsForm : Implements IOkCancelDeleteToolbar
|
||||
Private Sub LabelsForm_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
LabelsList.Clear()
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
Try
|
||||
If MultiUser Then
|
||||
Dim m As New MMessage("You are changing labels for more one user" & vbNewLine & "What do you want to do?",
|
||||
@@ -90,10 +90,10 @@ Friend Class LabelsForm : Implements IOkCancelDeleteToolbar
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex, "Choosing labels")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub ToolbarBttDelete() Implements IOkCancelDeleteToolbar.ToolbarBttDelete
|
||||
Private Sub Delete() Implements IOkCancelDeleteToolbar.Delete
|
||||
LabelsList.Clear()
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
|
||||
@@ -157,7 +157,7 @@ Namespace Editors
|
||||
LBL_AUTH.Dispose()
|
||||
LBL_OTHER.Dispose()
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
If MyDefs.MyFieldsChecker.AllParamsOK Then
|
||||
Dim i%, ii%
|
||||
With Host
|
||||
@@ -200,7 +200,7 @@ Namespace Editors
|
||||
MyDefs.CloseForm()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub TXT_PATH_ActionOnButtonClick(ByVal Sender As ActionButton) Handles TXT_PATH.ActionOnButtonClick
|
||||
|
||||
@@ -39,7 +39,7 @@ Namespace Editors
|
||||
Private Sub SiteSelectionForm_Disposed(sender As Object, e As EventArgs) Handles Me.Disposed
|
||||
SelectedSites.Clear()
|
||||
End Sub
|
||||
Public Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Public Sub OK() Implements IOkCancelToolbar.OK
|
||||
Try
|
||||
SelectedSites.ListAddList(CMB_SITES.Items.CheckedItems.Select(Function(i) CStr(i.Value(0))), LAP.ClearBeforeAdd)
|
||||
MyDefs.CloseForm()
|
||||
@@ -47,7 +47,7 @@ Namespace Editors
|
||||
ErrorsDescriber.Execute(EDP.LogMessageValue, ex)
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Public Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -194,7 +194,7 @@ Namespace Editors
|
||||
Private Function GetSiteByCheckers() As SettingsHost
|
||||
Return If(CMB_SITE.SelectedIndex >= 0, Settings(CStr(CMB_SITE.Items(CMB_SITE.SelectedIndex).Value(0))), Nothing)
|
||||
End Function
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
If Not CH_ADD_BY_LIST.Checked Then
|
||||
If MyDef.MyFieldsChecker.AllParamsOK Then
|
||||
Dim s As SettingsHost = GetSiteByCheckers()
|
||||
@@ -254,7 +254,7 @@ Namespace Editors
|
||||
CloseForm:
|
||||
MyDef.CloseForm()
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDef.CloseForm(IIf(StartIndex >= 0, DialogResult.OK, DialogResult.Cancel))
|
||||
End Sub
|
||||
Private _TextChangeInvoked As Boolean = False
|
||||
|
||||
@@ -40,13 +40,13 @@ Friend Class FDatePickerForm : Implements IOkCancelDeleteToolbar
|
||||
MyDefs.InvokeLoaderError(ex)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub ToolbarBttOK() Implements IOkCancelToolbar.ToolbarBttOK
|
||||
Private Sub OK() Implements IOkCancelToolbar.OK
|
||||
MyDefs.CloseForm()
|
||||
End Sub
|
||||
Private Sub ToolbarBttCancel() Implements IOkCancelToolbar.ToolbarBttCancel
|
||||
Private Sub Cancel() Implements IOkCancelToolbar.Cancel
|
||||
MyDefs.CloseForm(DialogResult.Cancel)
|
||||
End Sub
|
||||
Private Sub ToolbarBttDelete() Implements IOkCancelDeleteToolbar.ToolbarBttDelete
|
||||
Private Sub Delete() Implements IOkCancelDeleteToolbar.Delete
|
||||
MyDefs.CloseForm(DialogResult.Abort)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -44,6 +44,7 @@ Public Class MainFrame
|
||||
End Sub
|
||||
Private Sub MainFrame_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If _VideoDownloadingMode Then GoTo FormClosingInvoker
|
||||
If Now.Month = 6 Then Text = "SCrawler: Happy LGBT Pride Month! :-)"
|
||||
Settings.DeleteCachePath()
|
||||
MainFrameObj = New MainFrameObjects(Me)
|
||||
MainFrameObj.ChangeCloseVisible()
|
||||
|
||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2022.6.4.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.6.4.0")>
|
||||
<Assembly: AssemblyVersion("2022.6.6.0")>
|
||||
<Assembly: AssemblyFileVersion("2022.6.6.0")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
||||
Reference in New Issue
Block a user