labteral / pygram Goto Github PK
View Code? Open in Web Editor NEWUnofficial Python client for Instagram
License: GNU General Public License v3.0
Unofficial Python client for Instagram
License: GNU General Public License v3.0
my os: arch linux 64 bit
the command i ran: pip3 install pygram
result:
Defaulting to user installation because normal site-packages is not writeable
Collecting pygram
Downloading pygram-0.0.13b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/03/ba/30bdbbc96999e3217a23046474a2485fdac606e13cb79efa7ecadec4dd31/pygram-0.0.13b0-py3-none-any.whl#sha256=59be3f5bb24c853e2e23fad4b71780f0723797d980e18ef24b0dbe9df53769d6 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/03/ba/30bdbbc96999e3217a23046474a2485fdac606e13cb79efa7ecadec4dd31/pygram-0.0.13b0-py3-none-any.whl#sha256=59be3f5bb24c853e2e23fad4b71780f0723797d980e18ef24b0dbe9df53769d6 has inconsistent version: filename has '0.0.13b0', but metadata has '0.0.13b0'
Downloading pygram-0.0.12b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/65/75/0dd5fe9ce38018a6d2741f281ee9659f5a38649a2c5d6ff79073d1a9706c/pygram-0.0.12b0-py3-none-any.whl#sha256=58aba9b41ec1268da2ea89acce42b225dbf5bfe22ec8d0fafd7dd27ca09bafd8 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/65/75/0dd5fe9ce38018a6d2741f281ee9659f5a38649a2c5d6ff79073d1a9706c/pygram-0.0.12b0-py3-none-any.whl#sha256=58aba9b41ec1268da2ea89acce42b225dbf5bfe22ec8d0fafd7dd27ca09bafd8 has inconsistent version: filename has '0.0.12b0', but metadata has '0.0.12b0'
Downloading pygram-0.0.11b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/fe/b5/15e42bfb8e64c90d9d733fd7a7658f27a926124c6760e4973cc57f820703/pygram-0.0.11b0-py3-none-any.whl#sha256=3dc1772187779e4124a84e881e820ae4ba90b0e9fc2b776ae243c8d057b82f1c (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/fe/b5/15e42bfb8e64c90d9d733fd7a7658f27a926124c6760e4973cc57f820703/pygram-0.0.11b0-py3-none-any.whl#sha256=3dc1772187779e4124a84e881e820ae4ba90b0e9fc2b776ae243c8d057b82f1c has inconsistent version: filename has '0.0.11b0', but metadata has '0.0.11b0'
Downloading pygram-0.0.10b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/d5/71/6c25d287ede54dc9f952e64168bc73e8e68a8a4ffc1b18e06f71bff4d6d9/pygram-0.0.10b0-py3-none-any.whl#sha256=ee1cffc9d7c6c95851ffc1a44736f35df1d55e872c57606ac363dc603f4adb1e (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/d5/71/6c25d287ede54dc9f952e64168bc73e8e68a8a4ffc1b18e06f71bff4d6d9/pygram-0.0.10b0-py3-none-any.whl#sha256=ee1cffc9d7c6c95851ffc1a44736f35df1d55e872c57606ac363dc603f4adb1e has inconsistent version: filename has '0.0.10b0', but metadata has '0.0.10b0'
Downloading pygram-0.0.9b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/3b/ef/e4319dff0a87e30b994344510275ab44bf34eb62785e34b58f11bde18dfb/pygram-0.0.9b0-py3-none-any.whl#sha256=108864ad4bd58c16c75fc0497d7d31408440d2386424b4f07a507c5bc0ef3a35 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/3b/ef/e4319dff0a87e30b994344510275ab44bf34eb62785e34b58f11bde18dfb/pygram-0.0.9b0-py3-none-any.whl#sha256=108864ad4bd58c16c75fc0497d7d31408440d2386424b4f07a507c5bc0ef3a35 has inconsistent version: filename has '0.0.9b0', but metadata has '0.0.9b0'
Downloading pygram-0.0.8b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/c9/b5/39b16a2521aeee9f34ef64bb378adddf038c2cdf734547c4508869159bfa/pygram-0.0.8b0-py3-none-any.whl#sha256=ecad50c982b3986ef64d45b6223f056251b3d16da5258ecc8fa24031bee87384 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/c9/b5/39b16a2521aeee9f34ef64bb378adddf038c2cdf734547c4508869159bfa/pygram-0.0.8b0-py3-none-any.whl#sha256=ecad50c982b3986ef64d45b6223f056251b3d16da5258ecc8fa24031bee87384 has inconsistent version: filename has '0.0.8b0', but metadata has '0.0.8b0'
Downloading pygram-0.0.7b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/11/11/d2bf8f671862cc3c0cbe476faa4f6135dcbeeed1829b2b03df425ad76d84/pygram-0.0.7b0-py3-none-any.whl#sha256=2712bf2b07ab2657983b50e97f518941ff83098d64088ce51b3fd76d101225d4 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/11/11/d2bf8f671862cc3c0cbe476faa4f6135dcbeeed1829b2b03df425ad76d84/pygram-0.0.7b0-py3-none-any.whl#sha256=2712bf2b07ab2657983b50e97f518941ff83098d64088ce51b3fd76d101225d4 has inconsistent version: filename has '0.0.7b0', but metadata has '0.0.7b0'
Downloading pygram-0.0.6b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/8f/33/ccc237164d255ca43647778060613c41fb4663cb4477cdd9dba86fe9b5cc/pygram-0.0.6b0-py3-none-any.whl#sha256=6f403f17edce64841335f503f2788978c53e0965048cedd06453125dc35d96bc (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/8f/33/ccc237164d255ca43647778060613c41fb4663cb4477cdd9dba86fe9b5cc/pygram-0.0.6b0-py3-none-any.whl#sha256=6f403f17edce64841335f503f2788978c53e0965048cedd06453125dc35d96bc has inconsistent version: filename has '0.0.6b0', but metadata has '0.0.6b0'
Downloading pygram-0.0.5b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/07/6c/4756572db5c32aee987fc156213117f2531147ab09f0b98ced7b0003cb1b/pygram-0.0.5b0-py3-none-any.whl#sha256=c2b6b2ae08b9b719c36e7b21d04c11c7f645e68ff4722cbcb3675f04469bc2e7 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/07/6c/4756572db5c32aee987fc156213117f2531147ab09f0b98ced7b0003cb1b/pygram-0.0.5b0-py3-none-any.whl#sha256=c2b6b2ae08b9b719c36e7b21d04c11c7f645e68ff4722cbcb3675f04469bc2e7 has inconsistent version: filename has '0.0.5b0', but metadata has '0.0.5b0'
Downloading pygram-0.0.4b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/62/09/5ad84773772a61da0478e6d2193284467ce7cc0cc088e1a424c2c28415ac/pygram-0.0.4b0-py3-none-any.whl#sha256=694259cb0bf1f4d72c48db63838108db9cb7e5612b64a206cfd867d2c143152e (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/62/09/5ad84773772a61da0478e6d2193284467ce7cc0cc088e1a424c2c28415ac/pygram-0.0.4b0-py3-none-any.whl#sha256=694259cb0bf1f4d72c48db63838108db9cb7e5612b64a206cfd867d2c143152e has inconsistent version: filename has '0.0.4b0', but metadata has '0.0.4b0'
Downloading pygram-0.0.3b0-py3-none-any.whl (17 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/00/7c/efa2fd64ae703b399a1ab567c27b260b51cc50ed1696544b9f7f02a10724/pygram-0.0.3b0-py3-none-any.whl#sha256=8ee8afa642e39bd166bfce4d4f4fdaca662a153a095525044bd97c662a7474c2 (from https://pypi.org/simple/pygram/) (requires-python:>=3.6). Requested pygram from https://files.pythonhosted.org/packages/00/7c/efa2fd64ae703b399a1ab567c27b260b51cc50ed1696544b9f7f02a10724/pygram-0.0.3b0-py3-none-any.whl#sha256=8ee8afa642e39bd166bfce4d4f4fdaca662a153a095525044bd97c662a7474c2 has inconsistent version: filename has '0.0.3b0', but metadata has '0.0.3b0'
ERROR: Could not find a version that satisfies the requirement pygram
ERROR: No matching distribution found for pygram
anyone know why this happens?
I believe there is some kind of bug in the logic or order of execution for the _login function having to do with the cached login headers. When trying to log in to a different Instagram Account using the PyGram(username, password) call, I get an AuthenticationError. In addition, when copying my script between two different machines, I received the same AuthenticationError unless I also copied over the pygram-cache.json file too. I have checked and verified that my internet connection was working at the time so it likely isn't throwing any Error 500 or 400 codes which would throw the AuthenticationError.
(Requires 2 Instagram Accounts (A & B))
Sign in to Instagram Account A by calling pygram = PyGram(username, password)
as described in the ReadMe.md.
Verify the pygram-cache.json file has been generated successfully.
Sign in to Instagram Account B by calling pygram = PyGram(username, password
) as described in the ReadMe.md.
It throws the AuthenticationError and the pygram-cache.json file hasn't changed or updated because it failed to authenticate.
Traceback (most recent call last): File ".\getInstafollowers.py", line 67, in <module> pygram = PyGram(instaUserName, instaPassword) File "C:\Users\erikb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pygram\pygram.py", line 30, in __init__ self._login() File "C:\Users\erikb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pygram\pygram.py", line 137, in _login raise AuthenticationError pygram.errors.AuthenticationError
I installed the package on my windows command prompt and the crawler worked perfectly.
I need to make it work on my AWS ubuntu instance but it throws a JSONDecodeError and ActionError.
I am running a AWS with Ubunutu release 18.04 LTS.
My commands on AWS instance were:
pip3 install pygram
python3
>>> from pygram import PyGram
>>> pygram = PyGram()
>>>profile = pygram.get_profile('eminem')
Hey,
Once again, Sorry to bother you.
I am looking into login()
method and it throws me authentication error every time I try to login.
This is the piece of code I have tried.
from pygram import Pygram
pygr = PyGram('onebyzero2506', 'demo1234')
I did some debugging myself and it seems like the request is failing with status code 400. Did something change from instagram side (or) am I making some rookie mistake? :)
i am not quite sure, what this error is meant to be. The JSON file
https://www.instagram.com/eminem/?__a=1
looks ok.
Is it probably a incompability of libs? I tried to reinstall several times and set up the exact enviromment, but know i am quite unsure if thats the missing link ... Any suggestions? @brunneis
Hey,
Thanks for your work on this library. I was wondering about these constants here
https://github.com/labteral/pygram/blob/master/pygram/pygram.py#L119
Can you tell me where did you get them? Are these constants common for everyone? If not, How can I get them for my own crawler?
I am trying to port your library to go and I am kind of stuck here.
Thanks,
Rohith
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.