atulyakumar97
news-sentiment-analysis

The spider crawls moneycontrol.com and economictimes.com to fetch news of input companies and also scores and classifies the companies to raise an early warning signal

Last updated Mar 14, 2026
26
Stars
6
Forks
0
Issues
0
Stars/day
Attention Score
12
Language breakdown
No language data available.
Files click to expand
README

News Sentiment Analysis

The program crawls moneycontrol and economictimes to fetch data of companies listed in the input.xlsx file. Once the data is scraped and a csv file is built, relative analysis is done using analyse.py to classify the companies into RED, AMBER and GREEN. Absolute scoring is done using the score.py script.

The master branch contains the source code for the application.
dist-windows branch contains the exe files and support files independant of the python installation.

Setup:

  • Click Clone or Download and then Download ZIP button to download the application.
  • Extract all files to a folder and run the applications as specified below.

How to run:

  • Make changes to input.xlsx (Configuration settings given below)
  • Run News Scraper.exe
  • Output is stored in Scrape Output.csv
  • Run Score Generator.exe and Scrape Analyser.exe for analysing scraped content.
  • Output is stored in Score Output.xlsx and Analyse Output.xlsx respectively
icons

| Application | input.xlsx columns | Output File | |--------------------|:------------------:| -------------------| | News Scraper.exe | A to F | Scrape Output.csv | | Score Generator.exe| H to L | Score Output.xlsx | | Scrape Analyser.exe| I to L | Analyse Output.xlsx |

input.xlsx

news scraper input

| Parameter | Ideal Value | Description | | -----------------|---------------------------| :------------------------------------------------------------------------------------------| | COMPANYNAME | String, exact match | Enter company names as close to the company name listed on the stocks page of Economic Times and Money Control. | | THRESHOLD | 0.75 to 0.85 | This is the percentage match between input company names and website listed company names. | | DATEFROM | DD-MM-YYYY | Data from this period will be scraped | | DATETO | DD-MM-YYYY | Data till this period will be scraped | | WEBSITE | Select at least one site | Moneycontrol or Economictimes | | ROTATING_PROXIES | 0 to 100
0 = No proxy | Used to bypass bans while scraping. Increasing proxy number might lead to slower data Scraping. |

score generator, scrape analyser

| Parameter | Ideal Value | Description | | ------------------|----------------------------------| :-------------------------------------------------------------------------------| | POSITIVE_KEYWORDS | String | Positive Keywords list| | NEGATIVE_KEYWORDS | String | Negative Keywords list | | SEARCH OPTION | Article Title or Article Content | Select which content you want the program to analyse | | NSTDDEVRED | Float (0.5, 1, 1.5, 2) | If keyword count greater than mean + (NSTDDEVRED * stddev) then the company is labelled RED| | NSTDDEVAMBER | Float (0.5, 1, 1.5, 2) | If keyword count greater than mean + (NSTDDEVAMBER * stddev) then the company is labelled AMBER |

License and Copyright

Licensed under the MIT License

🔗 More in this category

© 2026 GitRepoTrend · atulyakumar97/news-sentiment-analysis · Updated daily from GitHub