Git Product home page Git Product logo

atinstagram's Introduction

ATinstagram

Initial Setup:

  1. Download this project as a .zip and extract the contents
  2. Ensure you have installed Google Chrome (version 97*)
  3. Install selenium (use "pip3 install selenium")
  4. Fill in the credentials.txt file in the auth folder with your Instagram login information (credentials for an account created for this project can be made available upon request)

*If your version of Google Chrome is 96 or 98, visit https://chromedriver.chromium.org/downloads and replace the executable with the one that is compatible with your version of Chrome


Steps to use:

  1. Go into the src folder and call "python CollectData.py <hashtag> <# of pages to parse> <end cursor>" **
  2. Check the data folder for the results

**Only the input parameter is required. The default number of pages to parse is 20, and API calls do not require an end cursor to parse recent posts


To analyze the data:

  1. Add file "data_thinned.csv" into the top level of the /data/ folder
  2. Go into the src folder and call "python Analyze.py"
  3. Check the results folder for the results (if you selected to print results)



API format: Get 3 popular posts of with 10 most recent: https://www.instagram.com/explore/tags/?__a=1

Get posts under hashtag :

https://www.instagram.com/graphql/query/?query_id=17875800862117404&variables=%7B%22tag_name%22%3A%22%22%2C%22first%22%3A%7D


Get posts under hashtag after <END_CURSOR>:

https://www.instagram.com/graphql/query/?query_id=17875800862117404&variables=%7B%22tag_name%22%3A%22%22%2C%22first%22%3A%2C%22after%22%3A%22<END_CURSOR>%22%7D

see: https://github.com/InstaPy/instapy-research/blob/master/api/old_api/README.md

To view any actual post: https://www.instagram.com/p/{shortcode} where {shortcode} is located in the node in the list of edges

atinstagram's People

Contributors

nhalsteadvt avatar tashijeshong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.