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

Add-Url Scraper project under Node JS category #166

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions Node-JS-Projects/Intermediate/Url-Scraper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<h1 align='center'><b>💥 URL SCRAPER 💥</b></h1>

<!-- -------------------------------------------------------------------------------------------------------------- -->

<h3 align='center'>Tech Stack Used 🎮</h3>
<!-- enlist all the technologies used to create this project from them (Remove co
mment using 'ctrl+z' or 'command+z') -->

<div align='center'>

![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)
![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white)

![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)

![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)

![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)

</div>

![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: Description 📃

<div>
<h3>URL-Scraper:</h3>
<p>
<ul>
<li>This project will be a Web Content Aggregator that collects and summarizes content of any website.
<li>It will fetch the headings, sub headings, and further content of the website and display it in a visually appealing manner.
<li>It can be used as a summarizer for the web page without actually going through the whole web page.
</li>
</li>
</li>
</ul></p>
</div>

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: How to run it? 🕹️

To run the application follow these steps:

**Step 1:** Fork the repository. Follow these guidelines to know all about how to fork a repository
[Forking a Repo](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)

**Step 2:** Clone the repository. [Cloning a Repo](https://help.github.com/en/desktop/contributing-to-projects/creating-an-issue-or-pull-request)

**Step 3:** Go to Url-Scrapper folder and run

`npm install`

`npm run dev`

**Step 4:** Go to `http://localhost:8001` and enter url of the webpage you want to access contents of

## Voila! Have fun using the site.

<!-- -------------------------------------------------------------------------------------------------------------- -->

## :zap: Screenshots 📸

- Web page user interface
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/de0c3993-0667-430f-9cd4-165896d6aebf)

- Input type
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/7ae0ba32-b10e-46a9-82c9-23ddda637644)

- Scraped information
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/59a6cc2f-128b-4c89-bd10-29f59493938e)

- When in case of invalid input
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/59302317-1cf6-4b46-9498-fb3d6926e8fc)

- Error message gets displayed for invalid URL
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/05876f9f-6c31-48c8-bd4b-07f7aaf23171)

- When in case of an unsafe site
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/bd43d8dd-9b13-4e41-a297-b4e902b3f6b0)

- Error is displayed for the invalid site
![image](https://github.com/Rags-Mishra/WebMasterLog/assets/83007531/f9613b79-f652-47e8-a26d-3b278e63ecad)


![Line](https://github.com/Avdhesh-Varshney/WebMasterLog/assets/114330097/4b78510f-a941-45f8-a9d5-80ed0705e847)

<!-- -------------------------------------------------------------------------------------------------------------- -->

<h4 align='center'>Developed By <b><i>RAGINI MISHRA</i></b> 👦</h4>
<p align='center'>
<a href='https://www.linkedin.com/in/ragini-mishra-5a78b3217/'>
<img src='https://img.shields.io/badge/linkedin-%230077B5.svg?style=for-the-badge&logo=linkedin&logoColor=white' />
</a>
<a href='https://github.com/Rags-Mishra'>
<img src='https://img.shields.io/badge/github-%23121011.svg?style=for-the-badge&logo=github&logoColor=white' />
</a>
</p>

<h4 align='center'>Happy Coding 🧑‍💻</h4>

<h3 align="center">Show some &nbsp;❤️&nbsp; by &nbsp;🌟&nbsp; this repository!</h3>
20 changes: 20 additions & 0 deletions Node-JS-Projects/Intermediate/Url-Scraper/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const express = require('express');
const path = require('path');
const indexRouter = require('./routes/index');

const app = express();

app.use(express.static(path.join(__dirname, 'public')));
app.use(express.urlencoded({ extended: true }));

app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'html');

app.use('/', indexRouter);

const PORT = process.env.PORT || 8001;
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});

module.exports = app;
Loading