Code Monkey home page Code Monkey logo

youtube-video-scraper's Introduction

Building a YouTube Scraper REST API with Puppeteer by following the TDD approach

Scrapes YouTube video data with ID, and returns title, description, channel, views and gameName (if it's a game video)

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Installed local Node.js environment
  • Package manager to install packages. Yarn or npm

Clone the repo in your environment

git clone https://github.com/gnurgeldiyev/youtube-video-scraper.git

Installing

# move into project folder
cd youtube-video-scraper

# install the dependencies
yarn install

# rename the .env.sample
mv .env.sample .env

# add your variables
nano .env

Running the server

yarn start

Example

# GET - /{videoId}
curl localhost:3000/h8OX0FNWANM
Response
{
  "status": true,
  "title": "Recognizing Ignaz Semmelweis and Handwashing",
  "description": "Today’s Doodle follows the official guidelines ...",
  "channel": "GoogleDoodles",
  "views": "56188961"
}

Running the tests

yarn test

Built With

License

This project is licensed under the MIT License - see the LICENSE.md file for details

youtube-video-scraper's People

Contributors

aaabdyrahmanov avatar gnurgeldiyev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.