Skip to content

Fixed instagram scraper, based on recent updates from SaveVid.app #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: scraper
Choose a base branch
from

Conversation

vonuyvicoo
Copy link

SaveVid.app had recent obfuscation measures on their new version of the API. They also changed their subdomain from savevid.app to v3.savevid.net (Domain change included)

The old API endpoint merely responds with a 404 error, but when the domain is changed to the latter it then responds with an obfuscated stringified javascript code as follows (waiting to be executed on the DOM).

This poses a problem since the scraper is a back-end library and it would be pointless to execute on the DOM.

I then devised a way to decode the obfuscated response by looking at itself. The response from SaveVid is as follows:

...javascript code that de-obfuscates the abcbcbcbc string

eval(function()("abcbcbcbbabc...."))

The revised code for the Instagram Downloader module follows these steps

  • De-obfuscate response from server
  • Extract the abcbcbcbc string
  • Use the calculating functions from the server response
  • Evaluate the abcbcbcbc string
  • Parse all URLs
  • Feed the URLs onto 'thumbnail_link' and 'download_link' JSON keys

… SaveVid.net and recent obfuscation API update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant