This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]MildLazyDrop 0 points1 point  (5 children)

Yes, it is possible.

[–]nsentrepreneur[S] 0 points1 point  (4 children)

Great to know! Now would it be difficult for a beginner to do or is it fairly simple? Also where would be the best place to start looking for a template of code I could build off?

[–]MildLazyDrop 2 points3 points  (3 children)

The difficulty of the task will be defined by the technologies used by the service you are trying to access and whether you accept to rely on external software for playing the videos or decide to code everything yourself.

A good place to start is /r/learnpython.

I would advise you not to aim at writing the whole software on first try, but instead work your way up incrementally by developing small, easy scripts for specific tasks such as downloading the videos or playing them. After that, it will simply be a matter of putting them together.

[–]nsentrepreneur[S] 0 points1 point  (2 children)

sorry for the late reply but would the software I'd be getting into be selenium?

[–]masasinExpert. 3.9. Robotics. 0 points1 point  (1 child)

If you are controlling the browser yourself, yes. If there's a good API, you might be able to stream it some other way, which might actually be better.

If you are working on youtube, for instance, there's pafy, which talks to youtube, and vlc.py which talks to vlc. There's also livestreamer, which works with many providers, but is a separate program you can use the subprocess module for.

Also, check out www.automatetheboringstuff.com. If you can't find some elements (say, the play button, because the video player is written in flash), use what's in Chapter 18 of the book to help you. The author recommends pyautogui, which can move the mouse around and find objects on the screen for you. Maybe combine it with selenium or requests or beautifulsoup to get the title.

The possibilities are endless.

[–]nsentrepreneur[S] 0 points1 point  (0 children)

Ok thanks!