Fixed instagram scraper, based on recent updates from SaveVid.app #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
The revised code for the Instagram Downloader module follows these steps