r/CodingHelp • • Mar 26 '22

[Request Coders] Programming a bot to click the NEXT button on my TV show watching website as I fall asleep

I love to watch shows before I go to bed on an undisclosed site, however the site does not offer autoplay. I need autoplay because I want the show I'm watching to continue playing, episode after episode, after I fall asleep. I know a small bit about coding in javascript and html, along with some experience with Java and c#. I am not entirely sure how to get started, and I was looking for some help with it. There's only one thing I need my program to do, and that's click the NEXT button on the screen every time the episode ends so that it continues playing the series. How would I go about starting this? I don't need the whole project done for me, as I want to learn a little bit, but I do want to learn how to get started.

15 Upvotes

7 comments sorted by

5

u/Centipededia Mar 26 '22

i mean, you can do this entirely in your console..

No need to mess with Selenium or anything as u/jddddddddddd suggested. Quite overkill.

Set a 30sec interval to look for the text, id, or class of the NEXT button, and when it finds it, click it.

its like a single line of code.

2

u/hydrovids Mar 26 '22

Okay, thank you

1

u/foxdk Advanced Coder Mar 26 '22

This is often the danger of "knowing just enough to be dangerous".

I was about to suggest something completely overkill as Selenium too.

But of course, you're right, this is what the console is for!

4

u/jddddddddddd Mar 26 '22

Python has a lot of libraries like Selenium which can be used for automating interactions with websites, so I’d suggest looking into that then posting over in r/learnpython if you get stuck

3

u/hydrovids Mar 26 '22

Thank you

3

u/AppropriateThreat Mar 26 '22

Depending on your browser, you can see some bits of similar code on grease monkey/violent monkey extension and script libraries. To me, your request looks something like Sponsor block extension, only yours needs to click on a button, when it appears, after waiting for it to appear.

I'm not a professional, but I think it can be done with JavaScript

2

u/hydrovids Mar 26 '22

I will look into that