ScriptSmith / instamancer

Scrape Instagram's API with Puppeteer
http://adamsm.com/instamancer
MIT License
398 stars 61 forks source link

Omitting fullAPI skips first 12 posts #39

Closed jasondibenedetto closed 4 years ago

jasondibenedetto commented 4 years ago

Currently having an issue when running the user command. The resulting data that is generated skips the first 12 posts on the user's timeline.

For example, the posts that are retrieved from the following commands are different...

# skips first 12 results
npx instamancer user nintendo  --count 24 --type csv

# successfully gets first 12 results
npx instamancer user nintendo  --count 24 --type csv --full
ScriptSmith commented 4 years ago

This is intentional, as the first 12 posts are embedded in the page, rather than generated from an API request.

We could try reading the initial posts from window._sharedData, but I'm not yet confident that retrieving posts from memory will be consistent in the future.

jasondibenedetto commented 4 years ago

@ScriptSmith Thanks for confirming this behaviour. Maybe we can add this to the FAQs.

EDIT: Thanks for adding that to the FAQ 97f4e55cd1c9c7802c0116c7785ae0ceaa6cd132