STaylor8 / get-flash-videos

Automatically exported from code.google.com/p/get-flash-videos
0 stars 0 forks source link

Support for Youku #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am working on a creating a module to download from youku, where virtually all 
video names 
are in Unicode.

The download progress screen (where it says xx% downloaded) does not support 
Unicode output, 
instead of erasing the current line and writing the new percentage, I get a new 
line for each 
percentage.

For example:

./get_flash_videos http://v.youku.com/v_show/id_XOTA4ODg2NTI=.html
Downloading http://v.youku.com/v_show/id_XOTA4ODg2NTI=.html
Using method 'youku' for http://v.youku.com/v_show/id_XOTA4ODg2NTI=.html
Downloading 
http://119.97.130.22/1961eae6340/02006401004A093EE7A473012D4F1E4A3D13E8-905C-
4D1A-033B-F1E86083A312.flv...

MV__来自四川的歌声.flv: 1% (48.27 / 4727.52 KiB)
MV__来自四川的歌声.flv: 2% (95.32 / 4727.52 KiB)
MV__来自四川的歌声.flv: 3% (142.37 / 4727.52 KiB)
...

This is with version 1.12 of the script.

Original issue reported on code.google.com by tkshii on 24 May 2009 at 5:56

GoogleCodeExporter commented 9 years ago
On a side note, why do we not allow spaces in the filename?

Original comment by tkshii on 24 May 2009 at 5:57

GoogleCodeExporter commented 9 years ago
Sorry, this turned out to be a non-issue.  I was using the 
Encode::Escape::Unicode module too unscape unicode sequences 
and it turns out that was adding an extra newline character at the end of all 
output.

Not using the module fixed the problem.

Original comment by tkshii on 24 May 2009 at 9:09

GoogleCodeExporter commented 9 years ago
Can't figure out how to upload a code contribution so might as well do it here. 
 Adds support for youku.com.

Original comment by tkshii on 24 May 2009 at 9:24

Attachments:

GoogleCodeExporter commented 9 years ago
Looks good, I've got a few changes:
- Don't use error ".." and exit, just die, we handle that and print an error.
- Reindent code (picky I know, but everything is 2 spaces currently).

Original comment by monsieur...@gmail.com on 25 May 2009 at 10:21

GoogleCodeExporter commented 9 years ago
Done in r154/r155. Thanks!

Original comment by monsieur...@gmail.com on 25 May 2009 at 10:35

GoogleCodeExporter commented 9 years ago
Also, to answer your question about spaces:

<msvid> zakflashvideo: "On a side note, why do we not allow spaces in the 
filename?"
<zakflashvideo> because in general, spaces in filenames are lame
<msvid> but anyway
<msvid> you've gone and added &
<msvid> which is even lamer in unix
<zakflashvideo> well
<msvid> so people may have to quote the filenames
<msvid> so if we're allowing that we should allow spaces
<zakflashvideo> that was because it was the easiest way getting a sane video 
name
<msvid> ...
<zakflashvideo> where people used ampersands
<zakflashvideo> anyway, I seriously don't want spaces in the filenames
<zakflashvideo> remove & if you must
<zakflashvideo> but I don't want spaces

So yeah, I think I see a need for it to be configurable, but I don't really 
want to
be adding too many options, needs some thought.

Original comment by monsieur...@gmail.com on 25 May 2009 at 10:50

GoogleCodeExporter commented 9 years ago
I vote to keep the space stripping then, keeping things simple is good.  It 
just seemed odd and arbitrary when I 
was testing youku.

Original comment by tkshii on 26 May 2009 at 2:36