Page 4 of 7

Re: Youtube.com XY+VLC 0.5 Update 15/04/13

Posted: 16 Apr 2013 04:07
by 40k
Enternal wrote:Congratulation! The script is now very capable without the limit. It's also great that you still have the option to use VLC if you need to use it. :biggrin:
I tried the latest beta version and managed to run into a bug so I will leave the script as it is for now.

If you are interested in taking a shot at the beta you can adapt the script in the following way to unlock unlimited downloads:

Code: Select all

"Download 1 Link - XY"
 {
 global $g_PathDownloads;
 global $g_MetaTitle;
 global $g_VersionsMenuChoiceExt;
 global $g_PlayableUrl;
 
 sub "_Return-Playable-Url-XY";
 download ($g_PlayableUrl, "$g_PathDownloads\$g_MetaTitle$g_VersionsMenuChoiceExt", u);
 }

Code: Select all

"Download Multiple Links - XY"
 {
 global $g_PathVlc; 
 global $g_PathDownloads;
 global $g_YoutubeBATFile;
 global $g_YoutubeSourceUrl;
 global $g_MetaTitle;
 global $g_VersionsMenuChoiceExt;
 global $g_PlayableUrl;

 $Urls = input ("Download Multiple Links - VLC", "Paste 1 Youtube link per line followed by Enter", , m, , , );
 foreach ($a, $Urls, "<crlf>"){ //$a is intermediate, foreach loop does not accept uninitialized global?
  $g_YoutubeSourceUrl = $a;
  sub "_Return-Playable-Urls-XY";
  download ($g_PlayableUrl, "$g_PathDownloads\$g_MetaTitle$g_VersionsMenuChoiceExt", u);  
 }
 }
In both XY functions change the last parameter of the download() method from 'o' to 'u'

Re: Youtube.com XY+VLC 0.5 Update 15/04/13

Posted: 16 Apr 2013 08:26
by admin
Just FYI (don't know if it is important here): you can have both flags at once: "ou" or "uo" (sequence does not matter).

Re: Youtube.com XY+VLC 0.5 Update 15/04/13

Posted: 16 Apr 2013 08:31
by Flora_RMC
40k, congratulations! :appl: :appl:
Your scripts are exceptional: I use 2 or 3 of them quite often. They're so easy and practical... :lol:
With the recent improvements now I can download with VLC, too (before it didn't work, but now v0.5 is perfect). You really did a wonderful job.
Thank you! :biggrin:

Re: Youtube.com XY+VLC 0.5 Update 16/04/13 (Release notes!)

Posted: 17 Apr 2013 00:15
by klownboy
Thanks 40k. Nice work on 0.5. Youtube.xys is working great.

Don, thank you for the improvements to download streaming.

Re: Youtube.com XY+VLC 0.5 Update 16/04/13 (Release notes!)

Posted: 17 Apr 2013 08:16
by admin
Small suggestion:

Code: Select all

 $g_YoutubeINIFile = "<xypath>\Data\Scripts\Youtube.ini";
 $g_YoutubeBATFile = "<xypath>\Data\Scripts\Youtube.bat";
Better would be:

Code: Select all

 $g_YoutubeINIFile = "<xyscripts>\Youtube.ini";
 $g_YoutubeBATFile = "<xyscripts>\Youtube.bat";

Re: Youtube.com XY+VLC 0.5 Update 16/04/13 (Release notes!)

Posted: 17 Apr 2013 13:44
by klownboy
Yes you're absolutely right Don, my Scripts folder is "D:\Tools\Xyplorer\Scripts". I had no Data folder. So in first use of the latest youtube.sys v0.5, I ended up with a "Data" folder with a "Scripts" folder under it and inside it the youtube.ini. Your suggestion solves that.
Thanks,
Ken

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 13 May 2013 16:31
by klownboy
Hi 40k,
I attempted to download a youtube video the other day using the latest version 0.5. It was the Pepsi MAX & Jeff Gordon Present: "Test Drive" video that I had downloaded once before on another computer. The url is http://www.youtube.com/watch?v=Q5mHPo2yDG8, but the download failed whereas it works for version 0.4. To be honest I thought it had worked with version 0.5 when it was first released so I'm not sure what has happened. I've attached the 2 messages that come up when attempting to download (the URL was in the clipboard).
youtube_01.jpg
youtube_01.jpg (23.41 KiB) Viewed 3529 times
youtube_02.jpg
youtube_02.jpg (68.84 KiB) Viewed 3529 times
I downloaded a fresh/clean version, but I had the same result, no success. I was attempting to DL the highest quality mp4 or webm using XYplorer. From the message, it appears the version 0.5 code didn't strip out the quotes and obviously quotes can't be used in the file name whereas version 4 does work (in stripping the quotes) in this case. Could you try the same url to see if you have any luck or the same result?
Thanks,
Ken

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 14 May 2013 00:20
by 40k
klownboy wrote:Hi 40k,
I attempted to download a youtube video the other day using the latest version 0.5. It was the Pepsi MAX & Jeff Gordon Present: "Test Drive" video that I had downloaded once before on another computer. The url is http://www.youtube.com/watch?v=Q5mHPo2yDG8, but the download failed whereas it works for version 0.4. To be honest I thought it had worked with version 0.5 when it was first released so I'm not sure what has happened. I've attached the 2 messages that come up when attempting to download (the URL was in the clipboard).
youtube_01.jpg
youtube_02.jpg
I downloaded a fresh/clean version, but I had the same result, no success. I was attempting to DL the highest quality mp4 or webm using XYplorer. From the message, it appears the version 0.5 code didn't strip out the quotes and obviously quotes can't be used in the file name whereas version 4 does work (in stripping the quotes) in this case. Could you try the same url to see if you have any luck or the same result?
Thanks,
Ken
Hi Ken!

For my information can you confirm that specific link will download in 0.4 but not 0.5?
I have done some quick testing and my downloads are failing for random Youtube videos. I'll have to look at the code tomorrow but it seems the problem stems from changes in Youtube's video page source code. The code that generates playable video URL's is failing as well so it must be an external change.

I will investigate and get back to you :) Thanks for reporting :)

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 14 May 2013 12:04
by PeterH
The above picture shows a filename twice including double quotes (as part of the name, not just framing). From my POV this looks rather strange?
(I wonder if that's allowed at all, but at least it might be reason for problems on string handling...)

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 14 May 2013 14:09
by klownboy
Hey 40k,
I looked again at the code for the version that is working and it was not the 0.4 version. It's a rendition before that. I tried to use the original as downloaded 0.4 version and it did not work. However, this code that I've attached does work for a high quality download using XYplorer. Sorry I can't tell from what version it was derived. I had played with the menu a bit, but that about all. It looks like my post on 22 Mar 2013 17:18 (page 2 of this thread) and is probably a modified version 0.3 from what I can tell (when you incorporated using XYplorer for the first time...maybe).
Thanks,
Ken

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 16 May 2013 17:12
by 40k
klownboy wrote:Hey 40k,
I looked again at the code for the version that is working and it was not the 0.4 version. It's a rendition before that. I tried to use the original as downloaded 0.4 version and it did not work. However, this code that I've attached does work for a high quality download using XYplorer. Sorry I can't tell from what version it was derived. I had played with the menu a bit, but that about all. It looks like my post on 22 Mar 2013 17:18 (page 2 of this thread) and is probably a modified version 0.3 from what I can tell (when you incorporated using XYplorer for the first time...maybe).
Thanks,
Ken
I have to admit this issue has me a bit at a dead end.

I have personally tested and used the script with Xy 12.40 after it was released and everything worked fine. This is perhaps a week and a half ago.

Now the script is breaking left and right all the way from the URL recognition to the video link parsing and video naming. Even more mind-boggling: readurl() is not returning the same copy of a video page source code as I get when watching the source in Firefox. I've already checked if the new byte check feature broke this but it seems to work fine.

Shame on me for being a sloppy coder as I did not keep my test environments from previous renditions and so I can't just go back to see what the Youtube video page source used to look like. This is highly frustrating :evil:

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 16 May 2013 19:33
by klownboy
Hi 40k,
Sorry I can't be of much help. I've got no real coding experience other than what I've picked up in the last year or so in XY and AHK. If you need any help at all testing though please feel free to ask. The old version I sent you is still working though. I used it again this morning.
Ken

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 20 May 2013 16:23
by 40k
klownboy wrote:Hi 40k,
Sorry I can't be of much help. I've got no real coding experience other than what I've picked up in the last year or so in XY and AHK. If you need any help at all testing though please feel free to ask. The old version I sent you is still working though. I used it again this morning.
Ken
So I just tried the script again without touching the source code and it seems to be again working now. Except the VLC function is still broken but I can download videos using Xy only.

This video downloads fine:
https://www.youtube.com/watch?v=8K8WXMYkHPM

Can someone verify this before I check myself into a mental institution?

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 20 May 2013 16:55
by klownboy
Hey 40k,
Yes, the link you provided downloaded fine in both webm and mp4 at 720. However, I tried the video link I mentioned previously https://www.youtube.com/watch?v=Q5mHPo2yDG8 and it still did not work. I received the same error message I reported above...failed to create file.
Ken

Re: Youtube.com XY+VLC 0.5 (Update Xyplorer to 12.40)

Posted: 21 May 2013 22:39
by 40k
klownboy wrote:Hey 40k,
Yes, the link you provided downloaded fine in both webm and mp4 at 720. However, I tried the video link I mentioned previously https://www.youtube.com/watch?v=Q5mHPo2yDG8 and it still did not work. I received the same error message I reported above...failed to create file.
Ken
I have patched the script and the Xy function should work again. Give it a try and let me know if you find other problems. I'm working on version 0.6.