GithubHelp home page GithubHelp logo

olidroide / instascrape Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chris-greening/instascrape

0.0 1.0 0.0 15.34 MB

Flexible, lightweight Python 3 Instagram scraper designed for data mining

License: MIT License

Python 99.31% Shell 0.69%

instascrape's Introduction

instascrape logo

Instagram scraping for humans

What is it?

instascrape is a powerful, lightweight library for scraping Instagram data with no configurations necessary! It is designed with flexibility and developer productivity in mind so you can stop wasting valuable time collecting data and just start analyzing πŸ’ͺ

Version Language Code style: black Release License

Downloads Activity Dependencies Issues Size

Example showing tech profile scrapes

Key features

  • πŸ’ͺ Powerful, object-oriented scraping tools as well as a variety of useful functions
  • πŸ’ƒ Flexibly determines whether you want to scrape HTML, JSON, BeautifulSoup, or request and scrape the URL itself
  • πŸ’Ύ Download content to your computer as png, jpg, mp4, and mp3
  • 🎼 Expressive and consistent API for concise and elegant code
  • πŸ“Š Designed for seamless integration with Selenium, Pandas, and other industry standard tools for data collection and analysis
  • πŸ”¨ Lightweight: you don't have to build a hammer factory when all you need is the hammer
  • πŸ•ΈοΈ The only hard dependencies are Requests and Beautiful Soup; no more worrying about configurations or webdrivers
  • ⌚ Proven to work as of November, 2020

Table of Contents


πŸ’» Installation

Minimum Python version

This library currently requires Python 3.7 or higher.

pip

Install from PyPI using

$ pip3 install insta-scrape

WARNING: make sure you install insta-scrape and not a package with a similar name!


πŸ”Ž Sample Usage

All top-level, ready-to-use features can be imported using:

from instascrape import *

instascrape uses clean, consistent, and expressive syntax to make the developer experience as painless as possible.

# Instantiate the scraper objects 
google = Profile('https://www.instagram.com/google/')
google_post = Post('https://www.instagram.com/p/CG0UU3ylXnv/')
google_hashtag = Hashtag('https://www.instagram.com/explore/tags/google/')

# Scrape their respective data 
google.scrape()
google_post.scrape()
google_hashtag.scrape()

After being scraped, relevant attributes can be accessed with dot (.) or bracket ([]) notation

print(google.followers)
print(google_post['hashtags'])
print(google_hashtag.amount_of_posts)
>>> 12262794
>>> ['growwithgoogle']
>>> 9053408

πŸ“š Documentation

The official documentation can be found on Read The Docs πŸ“°


πŸ“° Blog Posts

Check out blog posts on DEV for ideas and tutorials!


πŸ™ Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome!

Feel free to open an Issue or look at existing Issues to get a dialogue going on what you want to see added/changed/fixed.

Beginners to open source are highly encouraged to participate and ask questions ❀️


πŸ•ΈοΈ Dependencies

Instascrape primarily relies on two third-party libraries for requesting and scraping Instagram HTML content:

  1. Requests: HTTP requests
  2. BeautifulSoup: Scraping and parsing HTML data.

The rest of its functionality is provided directly from Python 3's standard library for unobtrusive code under the hood with little to no overhead.


πŸ’³ License

MIT


❔ Support

Reach out to me if you have questions or ideas!


instascrape's People

Contributors

benji011 avatar chris-greening avatar dragid10 avatar fernando24164 avatar o3661606 avatar olidroide avatar paola351 avatar tarob0ba avatar

Watchers

 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.