An open API service indexing awesome lists of open source software.

https://github.com/sazumivicky/web-scraping-random-name

This is a Node.js application that scrapes random names from a website and exposes an API endpoint to retrieve these names.
https://github.com/sazumivicky/web-scraping-random-name

random random-name-generators sazumi sazumiviki scraper scraping webdriverio

Last synced: 2 months ago
JSON representation

This is a Node.js application that scrapes random names from a website and exposes an API endpoint to retrieve these names.

Awesome Lists containing this project

README

        

# Web Scraping Random Name

This is a Node.js application that scrapes random names from a website and exposes an API endpoint to retrieve these names.

## Installation

1.

Clone the repository:

```bash
git clone https://github.com/SazumiVicky/web-scraping-random-name.git
```
1.

Navigate to the project directory:

```bash
cd web-scraping-random-name
```
2.

Install dependencies:

```bash
npm install
```

Usage


Start the server

```bash
node index.js
```
2.

Once the server is running, you can access the random names by making a GET request to:


```bash
http://localhost:3000/get/names/random
```
3.

Example using cURL:


```bash
curl http://localhost:3000/get/names/random
```

Example response:

```json
[
{
"name_1": {
"First Name": "Clara",
"Last Name": "Middleton"
}
},
{
"name_2": {
"First Name": "Phillip",
"Last Name": "Gutierrez"
}
},
...
]

```

Dependencies

- [express - Web framework for Node.js](https://www.npmjs.com/package/express)
- [webdriverio - Library for browser automation](https://www.npmjs.com/package/webdriverio)
- [cheerio - Implementation of jQuery for the server-side](https://www.npmjs.com/package/cheerio)

Contributing


Contributions are welcome! Feel free to open an issue or submit a pull request.