Code Monkey home page Code Monkey logo

theirtube's Introduction

TheirTube Scraper

Theirtube is a Youtube filter bubble simulator that provides a look into how videos are recommended on other people's YouTube. ๐Ÿ”—their.tube.

TheirTube scraper allows to retireve your own Youtube recommendation results on your local environment

Scraper Image

Installation

The main dependancy of theirtube is puppeteer ver 2.1.1, node-schedule ver 1.3.2 running on node.js ver 12

git clone https://github.com/kihapper/TheirTube.git

cd TheirTube

npm install 

npm run scrape

When activating for the first time, it will require you to login to your Youtube account on puppeteer. When you login, your login-cookie information will be saved under /cookies/theirtube_cookie , allowing you to access to your Youtube accout on the next run scrape command. When you want to switch between accounts, swap this cookie to login to different channels.

Usage

By default you can run the scraper everyday at a certain time. To specify when the program will run,you can set up a timer for a scheduled run. For instance, the below code will activate everyday on 17:31 your local time.

npm run scrape -- --scrapeHour=17 --scrapeMinute=31 

Data Structure

The youtube top page will be saved in the following JSON format. You can specify where you want to save your files in theirtube.js

    {
     "title": "Video Title",
     "url": "https://www.youtube.com/VIDEO-URL",
     "channel": "Channel Name",
     "channel_url": "https://www.youtube.com/CHANNEL-URL",
     "channel_icon": "https://www.youtube.com/CHANNEL-ICON-URL.jpg",
     "thumbnail": "https://www.youtube.com/THUMBNAIL-URL",
     "viewnum": "XX views",
     "date": "XX days ago"
    }

Screenshot

Everytime it gets the data, it will also get a screenshot of the Youtube top-page. You can see them in the /screenshot/images folder.

.
โ”œโ”€โ”€ screenshot
โ”‚   โ””โ”€โ”€ 2020-07-22
โ”‚       โ”œโ”€โ”€ 2020-07-22persona1.jpg
โ”‚       โ”œโ”€โ”€ 2020-07-22persona2.jpg
โ”‚       โ”œโ”€โ”€ 2020-07-22persona3.jpg

Scraper Image

theirtube's People

Contributors

kihapper avatar openjck 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.