-
Notifications
You must be signed in to change notification settings - Fork 75
Add InstagrAPI script #281
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
Conversation
|
||
The server should now be running within that session, and accessible at http://127.0.0.1:8000 | ||
|
||
You can set this in the orchestration.yaml file like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth saying "in the Auto Archiver orchestration.yaml file..."?
scripts/instagrapi_server/.gitignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this empty file needed? Perhaps it needs the secrets
folder, or that might already be covered by the root gitignore
Nice! Looks good to me. Only a few minor comments :) |
Tests are failing here now - not sure why, could be because the poetry.lock file changed. Does that need to change? |
Requires setting up an Instagrapi API deployment and providing an access token and API endpoint. | ||
Requires either getting a token from using a hosted [(paid) service](https://api.instagrapi.com/docs) and setting this in the configuration file. | ||
Alternatively you can run your own server. We have a basic script which you can use for this which can be ran locally or using Docker. | ||
For more information, read the [how to guide](https://auto-archiver.readthedocs.io/en/latest/how_to/run_instagrapi_server.html) on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally this shouldn't be hard-coded to the latest version. Should use:
[how to guide](../../../how_to/run_instagrapi_server.md)
( I think I got the reference right!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more information, read the [how to guide](https://auto-archiver.readthedocs.io/en/latest/how_to/run_instagrapi_server.html) on this. | |
For more information, read the [how to guide](../../../how_to/run_instagrapi_server.md) on this. |
Just followed the guide and set everything up – it all works! Will approve once the tests are fixed :) |
That's great to hear! I'm slightly devastated that I couldn't get it to authenticate directly in Docker, but at least this is an option 😂 |
I just debugged this, and I think it's because you're putting quotes around the username/password in the .env file. If I remove those, it works for me. More info: docker/compose#3702 (comment) |
Ohh that actually works! I have a script in that case, and will just update the docs to match. |
# run_instagrapi_server.sh | ||
# Usage: | ||
# From repo root: ./scripts/instagrapi_server/run_instagrapi_server.sh | ||
# From repo root: ./scripts/instagrapi_server/run_instagrapi_server.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
Add scripts for running a local fastAPI server, or docker instance of InstagrAPI which can be used for the Instagram API Extractor.
Previously it was expected to use the paid service https://api.instagrapi.com/docs.
These scrips use the same naming of endpoints, but only defining the paths currently used by the Auto Archiver Instagram API Extractor.
The setup process required currently involves a few steps (run server locally once to create settings file, this requires installing the requirements etc) as the first time authentication was being rejected when running in Docker.
There might be additional settings we could pass to the script which would allow verification in Docker which would simplify the process and allow the container to be setup an run with a single script, (tried with adding device and user agent, but still rejected.)