Git Product home page Git Product logo

twitter-scrapping's Introduction

Twitter-Scrapping MIT LICENSE MAINTAINED BADGE

Application Link: https://shamhiruthik-twitter-scrapping-twitter-scraper-app-m9zje5.streamlit.app/

Demo Video Link:

About

This Web application basically scrapes information from Twitter. Users can scrape data by entering any keyword or hashtag respectively to the Timeline.

Built using

  • Streamlit
  • Snscrape
  • MongoDb
  • Python Script

Overview:

I have Created a GUI using streamlit that contains the follwing features

  • Can enter any keyword or Hashtag to be searched,
  • select the starting date
  • select the ending date
  • Number of tweets needs to be scrapped.

After scraping is done, it has the following options

  • Download data as CSV
  • Download data as JSON
  • Upload data to DATABASE
  • Display All the Tweets scraped
  • All the Uploaded Collections in Database are Displayed in the left side

WORKING:

Step1: Initially I collected the Keyword, Start date, End date, and Number of tweets from the user using streamlit

Step 2: The above details are fed to TwitterSearchScraper and TwitterHashtagScraper. A dataframe is created to store the entire scraped data Now we can download this scraped data in the form of CSV or JSON format

Step3: The database connection is established using pymongo A new collection will be created and data is uploaded into that collection if the user wish to upload

Step4: A separate sidebar is created to display all the collections that are uploaded to the database, On clicking any collection, we can see the documents in that collection

Demo Images

1. Web App

s1

2. Request Tweet

s2

3. Results

s3

Installation and Running

open cmd:

  1. C:\Users\shamhiruthik> pip install virtualenv

  2. C:\Users\shamhiruthik> virtualenv my_twitter_env

  3. C:\Users\shamhiruthik> cd my_twitter_env

  4. C:\Users\shamhiruthik\my_twitter_env> cd Scripts

  5. C:\Users\shamhiruthik\my_twitter_env\Scripts>activate # It will activate the virtual environment

  6. (my_twitter_env) C:\Users\shamhiruthik> mkdir TwitterScraper #create a folder

  7. (my_twitter_env) C:\Users\shamhiruthik> cd TwitterScraper # download the above files from this repository and place inside this folder

  8. (my_twitter_env) C:\Users\shamhiruthik\TwitterScraper> pip install -r requirements.txt # it will install all the required modules in the environment

  9. (my_twitter_env) C:\Users\shamhiruthik\TwitterScraper> streamlit run Twitter_Scraper_App.py # Now run the app using streamlit

  10. You can now view your Streamlit app in your browser.

twitter-scrapping's People

Contributors

shamhiruthik avatar

Stargazers

 avatar

Watchers

 avatar  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.