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
- 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
[![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:
- 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**.

View File

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

View File

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

View File

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

View File

@@ -536,7 +536,8 @@ Namespace API.Instagram
End Try
End Sub
#End Region
Private Sub GetUserId()
#Region "GetUserId"
<Obsolete> Private Sub GetUserId_Old()
Try
Dim r$ = Responser.GetResponse($"https://www.instagram.com/{Name}/?__a=1",, EDP.ThrowException)
If Not r.IsEmptyString Then
@@ -552,6 +553,23 @@ Namespace API.Instagram
End If
End Try
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"
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}"

View File

@@ -31,8 +31,6 @@ Namespace API.Reddit
With MyDefs
.MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar()
.AppendDetectors()
.DelegateClosingChecker()
Select Case MyOptions.ViewMode
Case CView.Hot : OPT_VIEW_MODE_HOT.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
Responser.StatusCode = HttpStatusCode.ServiceUnavailable Or
Responser.StatusCode = HttpStatusCode.GatewayTimeout Then
MyMainLOG = $"Reddit is currently unavailable ({ToString()})"
MyMainLOG = $"[{CInt(Responser.StatusCode)}] Reddit is currently unavailable ({ToString()})"
Else
If Not FromPE Then LogError(ex, Message) : HasError = True
Return 0

View File

@@ -224,7 +224,8 @@ Friend Class ChannelViewForm : Implements IChannelLimits
.SmallImageList = New ImageList With {.ColorDepth = ColorDepth.Depth32Bit, .ImageSize = s}
End With
CMB_CHANNELS.Enabled(False) = Not CMB_CHANNELS.Checked
MyDefs.EndLoaderOperations()
MyDefs.DelegateClosingChecker = False
MyDefs.EndLoaderOperations(False)
SetLimitsByChannel(, False)
End Sub
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
.MyViewInitialize(Me, Settings.Design)
.AddOkCancelToolbar()
.DelegateClosingChecker()
.MyOkCancel.EnableDelete = False
If Settings.Channels.Count > 0 Then
RefillList()
Else
MsgBoxE("Channels not found", vbExclamation)
End If
.AppendDetectors()
.EndLoaderOperations()
End With
Catch ex As Exception

View File

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

View File

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

View File

@@ -28,10 +28,11 @@ Namespace Editors
With MyDefs
.MyViewInitialize(Me, Settings.Design)
.AddOkCancelToolbar()
.DelegateClosingChecker()
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 Not Collection.IsEmptyString And Collections.Contains(Collection) Then CMB_COLLECTIONS.SelectedIndex = Collections.IndexOf(Collection)
.DelegateClosingChecker = False
.EndLoaderOperations(False)
End With
Catch ex As Exception
MyDefs.InvokeLoaderError(ex)

View File

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

View File

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

View File

@@ -52,7 +52,6 @@ Namespace Editors
With MyDefs
.MyViewInitialize(Me, Settings.Design, True)
.AddOkCancelToolbar()
.DelegateClosingChecker()
.MyFieldsChecker = New FieldsChecker
With Host
@@ -144,7 +143,6 @@ Namespace Editors
End With
.MyFieldsChecker.EndLoaderOperations()
.AppendDetectors()
.EndLoaderOperations()
End With
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
With MyDefs
.MyViewInitialize(Me, Settings.Design, True)
.DelegateClosingChecker()
.AddOkCancelToolbar()
CMB_SITES.BeginUpdate()
Dim sl As List(Of String) = ListAddList(Nothing, Settings.Plugins.Select(Function(p) p.Name))
@@ -32,7 +31,8 @@ Namespace Editors
sl.Clear()
CMB_SITES.EndUpdate()
If l.Count > 0 Then CMB_SITES.ListCheckedIndexes = l : l.Clear()
.EndLoaderOperations()
.DelegateClosingChecker = False
.EndLoaderOperations(False)
.MyOkCancel.EnableOK = True
End With
End Sub

View File

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

View File

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

View File

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