Compare commits

...

4 Commits

Author SHA1 Message Date
Andy
ab020d9b5f 2022.6.10.0
Instagram User ID
2022-06-10 21:13:35 +03:00
Andy
4ba1624edf Update MainWindowGroups.png 2022-06-09 07:55:58 +03:00
Andy
f3d956f33f 2022.6.7.0
Fixed some design issues
2022-06-07 20:00:36 +03:00
Andy
4a5e050201 Update README.md 2022-06-06 21:49:00 +03:00
21 changed files with 41 additions and 30 deletions

View File

@@ -1,3 +1,10 @@
# 2022.6.10.0
**Attention! From now on, Instagram requires Cookies, Hash and authorization headers!**
- Fixed
- Can't get Instagram user ID
# 2022.6.6.0 # 2022.6.6.0
- Added - Added

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,3 +1,5 @@
# :rainbow_flag: Happy LGBT Pride Month :tada:
# Social networks crawler # Social networks crawler
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/AAndyProgram/SCrawler)](https://github.com/AAndyProgram/SCrawler/releases/latest) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/AAndyProgram/SCrawler)](https://github.com/AAndyProgram/SCrawler/releases/latest)
@@ -119,7 +121,7 @@ The program has an intuitive interface.
You need to set up authorization for Twitter and Instagram: You need to set up authorization for Twitter and Instagram:
- Authorization [cookies](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-set-up-cookies) and [tokens](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-find-twitter-tokens) for **Twitter** (if you want to download data from Twitter) - Authorization [cookies](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-set-up-cookies) and [tokens](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-find-twitter-tokens) for **Twitter** (if you want to download data from Twitter)
- Authorization [cookies](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-set-up-cookies) and [Hash](https://github.com/AAndyProgram/SCrawler/wiki/Settings#instagram) for **Instagram** (if you want to download data from Instagram), [Hash 2](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-find-instagram-hash-2) for **saved Instagram posts**, Instagram [stories authorization headers](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-find-instagram-stories-authorization-headers) for **Stories** and **Tagged data** - Authorization [cookies](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-set-up-cookies), [Hash](https://github.com/AAndyProgram/SCrawler/wiki/Settings#instagram) and [authorization headers](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-find-instagram-authorization-headers) for **Instagram** (if you want to download data from Instagram), [Hash 2](https://github.com/AAndyProgram/SCrawler/wiki/Settings#how-to-find-instagram-hash-2) for **saved Instagram posts**
Just add a user profile and **click the ```Start downloading``` button**. Just add a user profile and **click the ```Start downloading``` button**.

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2022.6.6.0")> <Assembly: AssemblyVersion("2022.6.7.0")>
<Assembly: AssemblyFileVersion("2022.6.6.0")> <Assembly: AssemblyFileVersion("2022.6.7.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@@ -21,7 +21,6 @@ Public Class SettingsForm : Implements IOkCancelToolbar
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
If Settings.Domains.Count > 0 Then Settings.Domains.ForEach(Sub(d) LIST_DOMAINS.Items.Add(d)) If Settings.Domains.Count > 0 Then Settings.Domains.ForEach(Sub(d) LIST_DOMAINS.Items.Add(d))
.EndLoaderOperations() .EndLoaderOperations()
End With End With

View File

@@ -21,8 +21,6 @@ Namespace API.Instagram
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
.AppendDetectors()
With MyExchangeOptions With MyExchangeOptions
CH_GET_STORIES.Checked = .GetStories CH_GET_STORIES.Checked = .GetStories
CH_GET_TAGGED.Checked = .GetTagged CH_GET_TAGGED.Checked = .GetTagged

View File

@@ -536,7 +536,8 @@ Namespace API.Instagram
End Try End Try
End Sub End Sub
#End Region #End Region
Private Sub GetUserId() #Region "GetUserId"
<Obsolete> Private Sub GetUserId_Old()
Try Try
Dim r$ = Responser.GetResponse($"https://www.instagram.com/{Name}/?__a=1",, EDP.ThrowException) Dim r$ = Responser.GetResponse($"https://www.instagram.com/{Name}/?__a=1",, EDP.ThrowException)
If Not r.IsEmptyString Then If Not r.IsEmptyString Then
@@ -552,6 +553,23 @@ Namespace API.Instagram
End If End If
End Try End Try
End Sub End Sub
Private Sub GetUserId()
Try
Dim r$ = Responser.GetResponse($"https://i.instagram.com/api/v1/users/web_profile_info/?username={Name}",, EDP.ThrowException)
If Not r.IsEmptyString Then
Using j As EContainer = JsonDocument.Parse(r).XmlIfNothing
ID = j({"data", "user"}, "id").XmlIfNothingValue
End Using
End If
Catch ex As Exception
If Responser.StatusCode = HttpStatusCode.NotFound Or Responser.StatusCode = HttpStatusCode.BadRequest Then
Throw ex
Else
LogError(ex, "get Instagram user id")
End If
End Try
End Sub
#End Region
#Region "Pinned stories" #Region "Pinned stories"
Private Sub GetStoriesData(ByRef StoriesList As List(Of String), ByVal Token As CancellationToken) Private Sub GetStoriesData(ByRef StoriesList As List(Of String), ByVal Token As CancellationToken)
Const ReqUrl$ = "https://i.instagram.com/api/v1/feed/reels_media/?{0}" Const ReqUrl$ = "https://i.instagram.com/api/v1/feed/reels_media/?{0}"

View File

@@ -31,8 +31,6 @@ Namespace API.Reddit
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.AppendDetectors()
.DelegateClosingChecker()
Select Case MyOptions.ViewMode Select Case MyOptions.ViewMode
Case CView.Hot : OPT_VIEW_MODE_HOT.Checked = True Case CView.Hot : OPT_VIEW_MODE_HOT.Checked = True
Case CView.Top : OPT_VIEW_MODE_TOP.Checked = True Case CView.Top : OPT_VIEW_MODE_TOP.Checked = True

View File

@@ -730,7 +730,7 @@ Namespace API.Reddit
ElseIf Responser.StatusCode = HttpStatusCode.BadGateway Or ElseIf Responser.StatusCode = HttpStatusCode.BadGateway Or
Responser.StatusCode = HttpStatusCode.ServiceUnavailable Or Responser.StatusCode = HttpStatusCode.ServiceUnavailable Or
Responser.StatusCode = HttpStatusCode.GatewayTimeout Then Responser.StatusCode = HttpStatusCode.GatewayTimeout Then
MyMainLOG = $"Reddit is currently unavailable ({ToString()})" MyMainLOG = $"[{CInt(Responser.StatusCode)}] Reddit is currently unavailable ({ToString()})"
Else Else
If Not FromPE Then LogError(ex, Message) : HasError = True If Not FromPE Then LogError(ex, Message) : HasError = True
Return 0 Return 0

View File

@@ -224,7 +224,8 @@ Friend Class ChannelViewForm : Implements IChannelLimits
.SmallImageList = New ImageList With {.ColorDepth = ColorDepth.Depth32Bit, .ImageSize = s} .SmallImageList = New ImageList With {.ColorDepth = ColorDepth.Depth32Bit, .ImageSize = s}
End With End With
CMB_CHANNELS.Enabled(False) = Not CMB_CHANNELS.Checked CMB_CHANNELS.Enabled(False) = Not CMB_CHANNELS.Checked
MyDefs.EndLoaderOperations() MyDefs.DelegateClosingChecker = False
MyDefs.EndLoaderOperations(False)
SetLimitsByChannel(, False) SetLimitsByChannel(, False)
End Sub End Sub
Private Sub ChannelViewForm_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing Private Sub ChannelViewForm_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing

View File

@@ -22,14 +22,12 @@ Friend Class ChannelsStatsForm : Implements IOkCancelDeleteToolbar
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design) .MyViewInitialize(Me, Settings.Design)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
.MyOkCancel.EnableDelete = False .MyOkCancel.EnableDelete = False
If Settings.Channels.Count > 0 Then If Settings.Channels.Count > 0 Then
RefillList() RefillList()
Else Else
MsgBoxE("Channels not found", vbExclamation) MsgBoxE("Channels not found", vbExclamation)
End If End If
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
End With End With
Catch ex As Exception Catch ex As Exception

View File

@@ -69,8 +69,6 @@ Namespace DownloadObjects
.AddControl(Of Integer)(TXT_TIMER, TXT_TIMER.CaptionText,, New AutomationTimerChecker) .AddControl(Of Integer)(TXT_TIMER, TXT_TIMER.CaptionText,, New AutomationTimerChecker)
.EndLoaderOperations() .EndLoaderOperations()
End With End With
.DelegateClosingChecker()
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
End If End If
End With End With

View File

@@ -46,7 +46,6 @@ Namespace DownloadObjects.Groups
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
If Not MyGroup Is Nothing Then If Not MyGroup Is Nothing Then
With MyGroup With MyGroup
TXT_NAME.Text = .Name TXT_NAME.Text = .Name
@@ -59,7 +58,6 @@ Namespace DownloadObjects.Groups
.MyFieldsChecker = New FieldsChecker .MyFieldsChecker = New FieldsChecker
DirectCast(.MyFieldsChecker, FieldsChecker).AddControl(Of String)(TXT_NAME, TXT_NAME.CaptionText,, New NameChecker(If(MyGroup?.Name, String.Empty))) DirectCast(.MyFieldsChecker, FieldsChecker).AddControl(Of String)(TXT_NAME, TXT_NAME.CaptionText,, New NameChecker(If(MyGroup?.Name, String.Empty)))
.MyFieldsChecker.EndLoaderOperations() .MyFieldsChecker.EndLoaderOperations()
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
End With End With
End Sub End Sub

View File

@@ -28,10 +28,11 @@ Namespace Editors
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design) .MyViewInitialize(Me, Settings.Design)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
Collections.ListAddList((From c In Settings.Users Where c.IsCollection Select c.CollectionName), LAP.NotContainsOnly, EDP.ThrowException) Collections.ListAddList((From c In Settings.Users Where c.IsCollection Select c.CollectionName), LAP.NotContainsOnly, EDP.ThrowException)
If Collections.ListExists Then Collections.Sort() : CMB_COLLECTIONS.Items.AddRange(From c In Collections Select New ListItem(c)) If Collections.ListExists Then Collections.Sort() : CMB_COLLECTIONS.Items.AddRange(From c In Collections Select New ListItem(c))
If Not Collection.IsEmptyString And Collections.Contains(Collection) Then CMB_COLLECTIONS.SelectedIndex = Collections.IndexOf(Collection) If Not Collection.IsEmptyString And Collections.Contains(Collection) Then CMB_COLLECTIONS.SelectedIndex = Collections.IndexOf(Collection)
.DelegateClosingChecker = False
.EndLoaderOperations(False)
End With End With
Catch ex As Exception Catch ex As Exception
MyDefs.InvokeLoaderError(ex) MyDefs.InvokeLoaderError(ex)

View File

@@ -30,7 +30,6 @@ Namespace Editors
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
With Settings With Settings
'Basis 'Basis
TXT_GLOBAL_PATH.Text = .GlobalPath.Value TXT_GLOBAL_PATH.Text = .GlobalPath.Value
@@ -96,7 +95,6 @@ Namespace Editors
New DownloadObjects.AutoDownloaderEditorForm.AutomationTimerChecker) New DownloadObjects.AutoDownloaderEditorForm.AutomationTimerChecker)
.EndLoaderOperations() .EndLoaderOperations()
End With End With
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
ChangeFileNameChangersEnabling() ChangeFileNameChangersEnabling()
End With End With

View File

@@ -43,7 +43,6 @@ Friend Class LabelsForm : Implements IOkCancelDeleteToolbar
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design) .MyViewInitialize(Me, Settings.Design)
.AddOkCancelToolbar(, WithDeleteButton) .AddOkCancelToolbar(, WithDeleteButton)
.DelegateClosingChecker()
If Source.Count > 0 Then If Source.Count > 0 Then
Dim items As New List(Of Integer) Dim items As New List(Of Integer)
CMB_LABELS.BeginUpdate() CMB_LABELS.BeginUpdate()
@@ -55,7 +54,6 @@ Friend Class LabelsForm : Implements IOkCancelDeleteToolbar
CMB_LABELS.EndUpdate() CMB_LABELS.EndUpdate()
CMB_LABELS.ListCheckedIndexes = items CMB_LABELS.ListCheckedIndexes = items
End If End If
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
End With End With
Catch ex As Exception Catch ex As Exception

View File

@@ -52,7 +52,6 @@ Namespace Editors
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
.MyFieldsChecker = New FieldsChecker .MyFieldsChecker = New FieldsChecker
With Host With Host
@@ -144,7 +143,6 @@ Namespace Editors
End With End With
.MyFieldsChecker.EndLoaderOperations() .MyFieldsChecker.EndLoaderOperations()
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
End With End With
Catch ex As Exception Catch ex As Exception

View File

@@ -22,7 +22,6 @@ Namespace Editors
Private Sub SiteSelectionForm_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub SiteSelectionForm_Load(sender As Object, e As EventArgs) Handles Me.Load
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.DelegateClosingChecker()
.AddOkCancelToolbar() .AddOkCancelToolbar()
CMB_SITES.BeginUpdate() CMB_SITES.BeginUpdate()
Dim sl As List(Of String) = ListAddList(Nothing, Settings.Plugins.Select(Function(p) p.Name)) Dim sl As List(Of String) = ListAddList(Nothing, Settings.Plugins.Select(Function(p) p.Name))
@@ -32,7 +31,8 @@ Namespace Editors
sl.Clear() sl.Clear()
CMB_SITES.EndUpdate() CMB_SITES.EndUpdate()
If l.Count > 0 Then CMB_SITES.ListCheckedIndexes = l : l.Clear() If l.Count > 0 Then CMB_SITES.ListCheckedIndexes = l : l.Clear()
.EndLoaderOperations() .DelegateClosingChecker = False
.EndLoaderOperations(False)
.MyOkCancel.EnableOK = True .MyOkCancel.EnableOK = True
End With End With
End Sub End Sub

View File

@@ -165,7 +165,6 @@ Namespace Editors
.MyFieldsChecker = New FieldsChecker .MyFieldsChecker = New FieldsChecker
DirectCast(.MyFieldsChecker, FieldsChecker).AddControl(Of String)(TXT_USER, TXT_USER.CaptionText) DirectCast(.MyFieldsChecker, FieldsChecker).AddControl(Of String)(TXT_USER, TXT_USER.CaptionText)
.MyFieldsChecker.EndLoaderOperations() .MyFieldsChecker.EndLoaderOperations()
.AppendDetectors()
.EndLoaderOperations() .EndLoaderOperations()
End With End With
Catch ex As Exception Catch ex As Exception

View File

@@ -26,13 +26,13 @@ Friend Class FDatePickerForm : Implements IOkCancelDeleteToolbar
With MyDefs With MyDefs
.MyViewInitialize(Me, Settings.Design, True) .MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar() .AddOkCancelToolbar()
.DelegateClosingChecker()
If _InitialValue.HasValue Then If _InitialValue.HasValue Then
DT.Checked = True DT.Checked = True
DT.Value = _InitialValue.Value.Date DT.Value = _InitialValue.Value.Date
Else Else
DT.Checked = False DT.Checked = False
End If End If
.DelegateClosingChecker = False
.EndLoaderOperations() .EndLoaderOperations()
MyDefs.MyOkCancel.EnableOK = True MyDefs.MyOkCancel.EnableOK = True
End With End With

View File

@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2022.6.6.0")> <Assembly: AssemblyVersion("2022.6.10.0")>
<Assembly: AssemblyFileVersion("2022.6.6.0")> <Assembly: AssemblyFileVersion("2022.6.10.0")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>