Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cool_dude
Visitor

Scraping Videos off some random website - Example? Tutorial

Hello Guys,

I played little bit with videoplayer today and learned some stuffs...but I would be grateful to all of you who can help me with Scraping stuffs. I want to scrap videos from some public websites to my channel (live stream and/or recorded videos). Does any of you have a tutorial or example code that does what I am looking for? Thanks in advance.

Regards,
Cool_Dude
0 Kudos
4 REPLIES 4
cool_dude
Visitor

Re: Scraping Videos off some random website - Example? Tutor

Hasn't anyone done this so far? Please
0 Kudos
gonzotek
Visitor

Re: Scraping Videos off some random website - Example? Tutor

"cool_dude" wrote:
Hello Guys,

I played little bit with videoplayer today and learned some stuffs...but I would be grateful to all of you who can help me with Scraping stuffs. I want to scrap videos from some public websites to my channel (live stream and/or recorded videos). Does any of you have a tutorial or example code that does what I am looking for? Thanks in advance.

Regards,
Cool_Dude

There's a few issues here. First off, Roku can't be seen as supporting piracy, thanks to the DMCA. So they cannot comment to help you if they're aware that you would be using copyrighted material in a manner that isn't approved by the copyrighted holder. And it isn't possible to give you specific, helpful answers without knowing which specific sites & pages you want to scrape videos from. The structure of nearly every site on the internet is different from every other one, so the specific method of scraping the video will be different too.

If the sites you want to use provide public domain or otherwise Free content(e.g. content licensed with a Creative Commons license), then you could share the specific sites here and people could potentially give you specific, helpful answers. It's much too broad of a question otherwise.

I know this is probably not the answer you wanted.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
TheEndless
Channel Surfer

Re: Scraping Videos off some random website - Example? Tutor

RokuChris already gave you some pointers (that you responded to) in the other thread you created where you asked the exact same question: viewtopic.php?f=34&t=54174
roUrlTransfer is the component you'd need to grab the HTML from the site you want to scrape. Extracting the data from that HTML, as gonzotek mentioned, is entirely dependent on the site itself.

That being said, the Roku is very limited in the video encodings that it supports, particularly when it comes to live streams. Generally speaking, if it plays on a iOS device, in most cases, it'll play on the Roku. Otherwise, you may not have much luck.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
belltown
Roku Guru

Re: Scraping Videos off some random website - Example? Tutor

The easiest way I've found to scrape web sites is to do the scraping in a script (e.g. PHP) on a server, extract the data you're interested in and return it as XML in response to a query from the Roku.

For example, PHP's loadHTML function can parse most HTML (even if not well-formed), returning a DOMDocument object, which you can examine using DOMDocument methods to extract your data. You can create the XML to send back to your Roku using the XMLWriter class, for example.

I like this method because the Roku is very good at parsing XML data, and other scripting languages make it easier to parse the HTML. Also, if you find that the web site you are scraping changes the way its pages are laid out, you can make the corresponding change in your PHP script which takes effect immediately, rather than having to update your Roku channel which takes some time to propagate to your users.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.