GithubHelp home page GithubHelp logo

the-javapocalypse / social-media-scrapper Goto Github PK

View Code? Open in Web Editor NEW
48.0 3.0 37.0 5.99 MB

Scrape images, tweets, captions, external links and hashtags with their frequency of occurrence related to any keyword from Instagram and Twitter.

License: MIT License

Python 100.00%

social-media-scrapper's Introduction

Social Media Scrapper

A powerfull social media web crawler/web scrapper that dumps images, tweets, captions, external links and hashtags from Instagram and Twitter in an organized form. It also shows the most relevant hashtags with their frequency of occurrence in the posts.

alt text

Getting Started

Video Based Tutorial

Watch Tutorial

1. Dependencies

Download or Clone the repo, Navigate to the directory containing the files and run the following command in cmd.

python setup.py install
2. Web Driver

After downloading or cloning the repo, Download chrome webdriver or firefox webdriver and extract it in the root folder of project.

3. Twitter App

For scrapping Twitter, we need to setup a Twitter App. First of all login from your Twitter account and goto Twitter Apps. Create a new app (How to create twitter app), goto Keys and access tokens and copy Consumer Key, Consumer Secret, Access Token and Access Token Secret. We will need them later.

Usage

Once you have created a Twitter App and installed the dependencies, you are good to go. Following are the details of the variables used to initialize the scrappers.

Variable Default Description
tag Null The keyword to search
limit 20 Number of posts to scrape
Consumer_Key Null Consumer Key of Twitter App
Consumer_Secret Null Consumer Secret of Twitter App
Access_Token Null Access Token of Twitter App
Access_Token_Secret Null Access Token Secret of Twitter App
lang 'en' Language of tweets to retrieve
browser 'chrome' Either chrome or firefox to use

Built With

  • Python 3.x
  • Tweepy
  • Selenium
  • Urllib
  • openpyxl

Contributing

  • Fork it
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

Author

Muhammad Ali Zia

License

This project is licensed under the MIT License

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.