Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ndtv News Scraper Using MongoDB #367

Open
coding-to-music opened this issue Jan 24, 2022 · 0 comments
Open

Ndtv News Scraper Using MongoDB #367

coding-to-music opened this issue Jan 24, 2022 · 0 comments

Comments

@coding-to-music
Copy link
Owner

coding-to-music commented Jan 24, 2022

NdtvNewsScraperUsingMongoDB

https://github.com/coding-to-music/NdtvNewsScraperUsingMongoDB

https://github.com/raj123raj/NdtvNewsScraperUsingMongoDB

Using Mongoose, Node JS, Cheerio, NDTV news website is scraped and data is loaded into Mongo DB database

This is a full-stack JavaScript app built using MongoDB, Mongoose, Node.js, Express.js, Handlebars.js, HTML, and CSS. It scrapes the NDTV homepage and stores article titles and links

Get new articles, save favorites, and write notes

To see updated news stories, click Get new articles at the top of the Home page. To view the full article, click the View article on NDTV link.

When you see an article in the list that you want to mark as a favorite, click Save article, and read it again by clicking Saved articles in the top menu bar. After you have an article in your saved list, you can comment on it by clicking Add note.

Note: There is no login system, so all saved articles and comments are visible to and can be deleted by all users.

Local set up for development purposes

These must be installed to run the app locally: For any Node JS projects, this is the mandatory step

IDE

Visual Studio Code is the best IDE to code Node JS and Mongoose related projects

Important instructions

  1. You first need to make a local MongoDB database named ndtvnews.
  2. Then, in a terminal window, navigate into the folder where you downloaded this app and type npm install. All the dependencies mentioned in package.json file will be installed and this is a mandatory step
  3. To start the app, type node server.js and open your browser to localhost:3000.
  4. In case if 3000 port is used by some other process in your system, feel free to change the port number in "server.js"

set the file .env with connection details for MongoDB Atlas (get from the Atlas dashboard)

MONGODB_URI="mongodb+srv://userid:[email protected]/NDTV-News-Scraper?retryWrites=true&w=majority"

To start the app, type node server.js and open your browser to https://localhost:3000

node server.js

Technology

Adding a note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant