Jump to content


Photo

Download Video Files with this new Bookmarklet


  • Please log in to reply
17 replies to this topic

#1 jschwalbe

jschwalbe

    Member

  • Members
  • PipPip
  • 18 posts

Posted 23 August 2014 - 08:13 PM

Greetings.
 
There has been promises of a download option for quite some time. They state the problem is that the files are not easily available, or something. I'm not quite sure. 
 
In lieu of a actual working solution (in addition to the various user-created options such as http://github.com/td...n/simple-tv-api and B Anderson's -- search for that one), I decided to create a bookmarklet to show just how easy it is to allow the files to be downloaded.  It took literally 7 lines of code while watching 2 episodes of Enterprise in order enable this feature promised to us for about a year now.

downloadURL=videoPlayer._url;
regex=/tv.main.hls-(\1\d).m3u8/;
newURLsubstr="tv.4500000.10\$1";
downloadURL=downloadURL.replace(regex, newURLsubstr);
var newWin = open(downloadURL,'windowName','height=300,width=300');
download_html="<a download=\"video.mp4\" href=\"" + downloadURL + "\">Download Video File";
newWin.document.write(download_html);

Disclaimer: I haven't tested it rigorously, that's your job. I'm primarily using the simple-tv-api downloader tool which I'm helping to maintain. This is for people who don't like writing code. :)
 
How to use it:
1. Copy the following into your bookmarks (or just paste it into the URL bar in step 3):

javascript:(function()%7BdownloadURL%3DvideoPlayer._url%3Bregex%3D%2Ftv.main.hls-(%5C1%5Cd).m3u8%2F%3BnewURLsubstr%3D%22tv.4500000.10%5C%241%22%3BdownloadURL%3DdownloadURL.replace(regex%2C%20newURLsubstr)%3Bvar%20newWin%20%3D%20open(%22about%3Ablank%22%2C'windowName'%2C'height%3D300%2Cwidth%3D300')%3Bdownload_html%3D%22%3Ca%20download%3D%5C%22video.mp4%5C%22%20href%3D%5C%22%22%20%2B%20downloadURL%20%2B%20%22%5C%22%3EDownload%20Video%20File%22%3BnewWin.document.write(download_html)%7D)()

2. Load the show you want to download, and start playback.
3. Click the bookmarklet (or load from bookmarks) in the same page that's running the show.
 
A window will pop up with a download link. Click this and your download should begin. (Some browsers may require a right-click-->save as.)
 
The file will open in VLC, and probably many other players. You may have to rename it to .mp4 or .ts before it works though.
 
Let me know how it works/doesn't work and I can try to adjust accordingly.


  • hdmkv likes this

#2 JimM

JimM

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationVirginia

Posted 24 August 2014 - 03:17 AM

Thanks for providing this code (never heard of a bookmarklet before... interesting).

 

Is the download local (LAN/Home) or remote (WAN/Internet)?

 

I'm asking because my ISP limits the amount I can download.

 

I started a download (works!) but it was taking a while (local?) so I canceled the download until I know if I'm using my ISP download limit.

 

Regards.



#3 jschwalbe

jschwalbe

    Member

  • Members
  • PipPip
  • 18 posts

Posted 24 August 2014 - 04:57 AM

Is the download local (LAN/Home) or remote (WAN/Internet)?

 

It should mirror whatever the same method it's streaming in the player.  If local, the url will have a locsal IP range (such as 192.168.1._, 10.0._._, 172.20._._, etc). I think if it's remote it would be a 53._._._ address(?).

 

And they are big files (I've seen 4GB) so it'll take awhile to complete.



#4 hdmkv

hdmkv

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 24 August 2014 - 01:40 PM

Hi jschwalbe, thanks for this tool. Had no idea how to create a bookmarklet, so Google'd and found this tool to generate one.

It took literally 7 lines of code while watching 2 episodes of Enterprise in order enable this feature promised to us for about a year now.

C'mon STV, give us an official tool for STV1. Promised since launch and as recent as the last newsletter & still not here.

#5 jschwalbe

jschwalbe

    Member

  • Members
  • PipPip
  • 18 posts

Posted 24 August 2014 - 05:42 PM

If this works please post success. If it fails please post the error message. If you can't get the instructions to work, tell me where. Id like to help :)

 

 

some people are having problems with the idea of a bookmarklet and are asking about it.. it's pretty simple, just open your bookmarks manager, manually create a bookmark and your copy this as the URL: 

javascript:(function()%7BdownloadURL%3DvideoPlayer._url%3Bregex%3D%2Ftv.main.hls-(%5C1%5Cd).m3u8%2F%3BnewURLsubstr%3D%22tv.4500000.10%5C%241%22%3BdownloadURL%3DdownloadURL.replace(regex%2C%20newURLsubstr)%3Bvar%20newWin%20%3D%20open(%22about%3Ablank%22%2C'windowName'%2C'height%3D300%2Cwidth%3D300')%3Bdownload_html%3D%22%3Ca%20download%3D%5C%22video.mp4%5C%22%20href%3D%5C%22%22%20%2B%20downloadURL%20%2B%20%22%5C%22%3EDownload%20Video%20File%22%3BnewWin.document.write(download_html)%7D)()

Then when you've loaded the video to download and it's playing, go to the bookmarks menu and open this newly created bookmark.



#6 hdmkv

hdmkv

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 25 August 2014 - 07:05 AM

It's working for me... thanks again. Just need to add mp4 extension after file downloads.



#7 Christopher Chan

Christopher Chan

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 25 August 2014 - 03:52 PM

Awesome ! This works for me ! 



#8 jschwalbe

jschwalbe

    Member

  • Members
  • PipPip
  • 18 posts

Posted 27 August 2014 - 03:38 PM

Great to hear. Thanks

#9 StylinJ

StylinJ

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 27 August 2014 - 06:02 PM

Wow, this is super bad (bad as in good).

 

THANKS



#10 hdmkv

hdmkv

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 08 September 2014 - 10:54 AM

Been using your bookmarklet script often jschwalbe; love how easy it is to download.



#11 Paul Colligan

Paul Colligan

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 11 September 2014 - 03:13 PM

worked fine, changed the extenion to .mp4 - file format can't be played

 

help?

 

p



#12 pcp326

pcp326

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 14 September 2014 - 05:47 AM

Hi jschwalbe -

 

great work, thanks very much for your contribution.  I have found that this works better on Chrome v37 than Firefox v32.  I was getting "video cannot be played - file corrupted" error.  I finally figured out that that the javascript above had to be copied into the "URL" line or "location" in the properties while naming the bookmark or else the browser reverted to the previous page/site.  (added for those like me who are less skilled than the above contributors).  

 

Cheers,

Pete



#13 viper

viper

    Advanced Member

  • Members
  • PipPipPip
  • 30 posts

Posted 14 September 2014 - 08:05 AM

Nice work. Thanks jschwalbe.

 

As stated does work better in Chrome than FF.

 

Unfortunately just one more indication that the company is not customer centric and support is nearly non-existent.



#14 hdmkv

hdmkv

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 15 September 2014 - 06:43 AM

Just tried with Firefox 32.0.1 and no problem downloading and playing back (after renaming to .mp4) via MPC-HC, and via XBMC on Fire TV.

 

If you guys are having trouble, if you have VideoReDo TVSuite V4, just open the .MP4 and output it as a .TS (H.264 transport stream) and see if that plays better.



#15 blairp

blairp

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 16 September 2014 - 04:53 PM

Fantastic! Works great with Chrome on my Mac. Renamed the files .MP4 and dropped them into Plex. No issues and quality is great! 



#16 jschwalbe

jschwalbe

    Member

  • Members
  • PipPip
  • 18 posts

Posted 08 October 2014 - 09:37 AM

Glad it's working. I am selling an STV1 for $50 if anyone wants it. Or if anyone just wants to support me for doing Simple.TV's job of letting us download our recordings. ;) PM me



#17 Ronnie

Ronnie

    Member

  • Members
  • PipPip
  • 22 posts
  • LocationHouston, Texas

Posted 29 November 2014 - 05:37 AM

Worked good for me. Files were downloaded as media 100 files (?). Was able to convert them to mp4 with VLC media player.

 

Thanks jschwalbe for the tip!



#18 Codethug

Codethug

    Member

  • Members
  • PipPip
  • 15 posts

Posted 15 March 2016 - 08:06 PM

Thanks for the bookmarklet!   It educated me and inspired me to write a small Windows application that will help you download all of your shows at once.  

 

Try out the Simple.TV Downloader for Windows at https://github.com/codethug/SimpleTv

 

All you have to do is run it like this, and it will download all of your shows:

 

SimpleTv.Downloader.exe -u username@somewhere.com -p "P@ssw0Rd" -d c:\tvshows






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users