TheM4hd1 / SwiftyInsta

Instagram Private API Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get all followed user , spend too time

tomtao88888 opened this issue · comments

handler.settings.delay = 0...0
handler.users.followed(byUser: .me,
with: .init(startingAt: self.nextMaxId, maxPagesToLoad: .max),

I use this code get all followed user ,  about 500 peoples, but spend

9-10 seconds, it’s slow,

I saw a iOS app with other instagram private api , get 500 followed user , only 2-3 seconds. Can we optimization it?

Hey @tomtao88888,

To achieve those speeds you would actually need to scrape the Instagram mobile web page, that's how most apps do it.
You can set it up pretty easily with a background WKWebView and injecting it the authentication cookies you get from SwiftyInsta.
So to answer your question, no: there's no way to make it faster using the Instagram Private API.

Also, keep in mind that setting the delay to 0 to your handler.settings, especially for followers and following, will result in the account being marked as spam, so try and avoid it.

i used web method login instagram
about "You can set it up pretty easily with a background WKWebView and injecting it the authentication cookies you get from SwiftyInsta." , i don't understand.
what's should i do ?

i saw this in the code

image

Sorry for the delay, I did not get notified for some reason.

SwiftyInsta does not provide scraping functionality, it's just a wrapper for the Private API.
You would need to implement it yourself, but it's gonna be the best solution for what you need.