Coder Social home page Coder Social logo

ytbot's Introduction

ytbot

A YouTube bot I did for one of my tech interviews.

How to run

  1. Install requirements from requirements.txt
  2. Modify configuration in ytbot/config.py if needed
  3. Run python3 -m ytbot in the repo directory

Test with pytest.

Issues and limitations

pytest doesn't recognize the humanfriendly library well when run from command line, works in an IDE though. I consider it low-priority for now, but will try to fix it soon.

Task description

Implement a browser automation application which performs the following steps:

  1. Open Chrome browser installed on the hosting system
  2. Navigate to https://www.youtube.com
  3. Search for 'Python' and select the first video from the results list
  4. Wait until a potential pre-roll ad has been shown
  5. Drag the video duration slider to approx. the middle of the video
  6. Mute the video
  7. Read the following info from the website and write it to standard out:
    • Title of the video
    • Duration of the video
    • Name of the channel
    • Amount of views
    • Date of upload
    • Amount of likes
    • Amount of dislikes
  8. Switch to the first suggested video in the 'next' panel on the right
  9. Play the video until 10 seconds of it have elapsed
  10. Pause the video afterwards

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.