Skip to content

A Selenium-based Facebook comments collection and analyzer tool. Connected with a Django REST for powering the Class-based Views and a React.JS interface. MySQL is used as a data store.

Notifications You must be signed in to change notification settings

adarsh2104/facebook_comments_analysis

Repository files navigation

A REST API based applications with following salient features:

Stacks Used:

  • Python 3.7
  • Django 3.2.6
  • React.JS/CSS
  • MySQL

Frontend: React.JS

  1. Home Page:
  • A Form where the user can specify the keyword and start the search.
  • Previous search keywords are shown as search suggestions.

2.Query Search:

  • Added a loader component to show processing request react-loader

3.Results Page:

  • Comments arranged in tabular format with percentage of sentiment scores.
  • Cummalative sentiment is dispalayed along with the search term.
  • Conditional rendering of elements attributes based on state variables.

Backend: Python + Djnago REST + Django REST

4.Views:

  • Class Based API Views for GET and POST requests.
  • Used Django for Rest APIs.
  • Model Serializers for serializing/deserializing objects of PostComment and SearchKeyword Models.
  • Added logger for debugging the project.

5.Models:

  • Models for saving Search Keywords and PostComments
  • Implemented Foreign Key relation between the models.

6.Utils:

  • Selenium based request client for collecting comments from Facebook posts,taking screenshots and getting matching results.
  • Saperate directory for saving Search termwise comments screenshots
  • Text analyzer implemented using NTLK package

Running the code : On Ubuntu

Frontend:

Navigate to the frontend-app directory:

cd frontend-app

Install the dependencies from npm:

sudo npm install

Run the dev server (starts on localhost:3001/3000):

sudo npm start

Backend:

To get the Django server running:

Install the requirements from pip

pip install -r requirements.txt

Run django's development server (starts on localhost:8000):

python manage.py runserver

NOTE:

Add your own Facebook login credentials in Django settings file for testing the project. 🌟🌟🌟

About

A Selenium-based Facebook comments collection and analyzer tool. Connected with a Django REST for powering the Class-based Views and a React.JS interface. MySQL is used as a data store.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published