Skip to content

Track the frequency of youtube algorithm suggestions. Uses a chrome extension to scrape youtube as you browse it and offload to a mongo database with association to you. Preprocessing is done to capture every word in suggested video titles as well as some extra metadata. Uses Nextjs app for displaying stats @ algomon.kyle-jeffrey.com.

Notifications You must be signed in to change notification settings

KyleAlanJeffrey/algomon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algomon: The Youtube Algorithm Monitor

LIVE ENDOINT: http://algomon.kyle-jeffrey.com/

based on boilerplate: Chrome Extension TypeScript Starter

Page Querying

Primarily use:

  • document.querySelectorAll("ytd-compact-video-renderer")
  • document.querySelectorAll("ytd-rich-item-renderer")

TODO

  • For bubble word cloud, add hover to view what videos the words were used in. Have a poupup around the word with the thumbnails and titles of the videos.
  • Might want to swap wordcloud components or just write my own
  • Possibly figure out a way to grab tags?
  • Add some way of tracking what a user is. It'd be kinda annoying to write a whole auth system but is probably the correct thing to do. Maybe could just use ip address as an identifier until then.
  • Add a tracker for videos watched and time spent on videos. This could be a cool way to see how much time you've spent on youtube.
  • Currently we don't track number of times a video has been recommended, only which have. Start tracking this.
  • Add a daily viewing.

Breakup time spent browsing to time spent watching. alt text

Word cloud as a snapshot across periods of time. alt text

Breakdown of most common words in video titles across the last n months. alt text

Use trends for words https://www.npmjs.com/package/react-trend

"Youtube really wants me to watch these videos" - Show most recommended videos

Current Work

In order to have the database track the number of times a video and word have been seen, we wipe the browser indexDB on every new page loaded.

Issues

  • The indexedDb is only accessible from content_scripts and not the extension popup. This means the data is only accessible when on youtube.

Project Structure

extension: Chrome Extension directory

  • src/typescript: TypeScript source files
  • src/assets: static files
  • dist: Chrome Extension directory
  • dist/js: Generated JavaScript files
npm install
npm run build
npm run watch

frontend: Next App Frontend

npm install
npm run dev
npm run start
npm run build

server: Nest api server

The nest start:prod is very cpu intensive and dies on my baby ec2 instance, so run build and the run node dist/main,js instead.

npm install
npm run start:dev
npm run start:prod
npm run build

Load Extension in Chrome

Basic Guide here: https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world

The dist directory after eithering building or watching will be the directory to load into chrome.

Networking

Generate SSL Certificate using lets encrypt: https://netshopisp.medium.com/how-to-install-certbot-on-debian-11-for-lets-encrypt-ssl-768562a8de0 Host SSL server using apache: https://www.ssltrust.com/help/setup-guides/debian-ubuntu-ssl-install-guide

About

Track the frequency of youtube algorithm suggestions. Uses a chrome extension to scrape youtube as you browse it and offload to a mongo database with association to you. Preprocessing is done to capture every word in suggested video titles as well as some extra metadata. Uses Nextjs app for displaying stats @ algomon.kyle-jeffrey.com.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published