tomkdickinson / instagram-search-api-python Goto Github PK
View Code? Open in Web Editor NEWA python library for searching most recent hashtags via Instagrams search engine
A python library for searching most recent hashtags via Instagrams search engine
I have python 2.7.12 on Linux. When I run the script, I get a syntax error on Line 75:
File "./instagram_search.py", line 77
class HashTagSearch(metaclass=ABCMeta):
^
SyntaxError: invalid syntax
I'm an utter novice, so I can't troubleshoot it myself. I just wanted to mine Instagram tags. Please help?
Edit: Through hit and trial, I modified the line to "class HashTagSearch(ABCMeta)"
Now I get the error:
File "./instagram_search.py", line 283, in
HashTagSearchExample().extract_recent_tag("christmas")
TypeError: new() takes exactly 4 arguments (1 given)
Please help.
Sorry, wrong page
Kudos for great scrapper. However, I stumbled upon an issue - on lines 123/124 when trying to extract query id from potential query ids - the post return HTTP-403 error. maybe insta-API changed ?
url = "https://www.instagram.com/graphql/query/?query_hash=%s&variables=%s" % (
potential_id, json.dumps(variables))
Also, do you think it is possible to alter it a little in order to scrap profile pages as well ?
I'm getting a 404 when calling requests.post("https://www.instagram.com/query/", data=post_data, headers=headers).text
inside the get_next_results
method. I can't figure out why.
post.user gives a pointer of InstagramUser object. However, post.user.username gives None. What's happening?
Is there a way to web scrape instagram posts with all the available details using geo location ?
Hello,
I was having trouble with getting the correct (or in some case any) query_ids from:
def get_query_id(self, doc)
The query id was no longer to be found in c="", it can now be found in queryId:""
so just need to change line 177
for query_id in re.findall("(?<=c=\")[0-9]{1,}", text)
to
for query_id in re.findall("(?<queryId:\")[0-9]{1,}", text)
Once I change this everything worked again and I haven't had a:
ERROR:root:Could not extract Query Id, exiting
Soph
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.