
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Usage:
Right-click onto a link to a YouTube video or at the background of the YouTube site showing the video and choose action -> Download YouTube Video -> ...
About:
I made some modifications to the original YouTube Service Menu. It didn't work for me, so I looked at the source. I added a different method to guess the video_id and I added additional parameters to the query string to download the video.
With this Konqueror/KDE service menu it is possible to download a YouTube video
by right clicking a link to the video and choosing "Download YouTube Video" from the
actions menu.
For more details see:
http://bitbucket.org/panzi/youtube-service-menu/wiki/Home
See also the original version(s) of this script:
http://www.kde-apps.org/content/show.php?content=37509
http://www.kde-apps.org/content/show.php?content=41432
Note:
I don't use this script myself anymore because I now use this userscript (which I also made):
http://userscripts.org/scripts/show/98782
This means this script might not be maintained in the future.
8 years ago
version 1.12a:
FIX: encoding problems
version 1.12:
NEW: chose format from menu with --format=ask.
NEW: --list option for Python script.
FIX: typos that made the script crash
version 1.11b:
FIX: Crash introduced in last version.
version 1.11a:
Updated greek translation. Thanks to Dimitrios Glentadakis.
version 1.11:
FIX: Extraction of video information. Now a different data extraction strategy
reading the flashvars of embed is used. Hopefully this is more stable.
version 1.10a:
ADD: Greek translation, thanks to Dimitrios Glentadakis (dglent)
version 1.10:
FIX: Extraction of video information. Now a different data extraction strategy
reading the flashvars of embed is used. Hopefully this is more stable.
DEP: New dependency to lxml: http://lxml.de/
NEW: Added video format 38: High Definition 3072p (mp4)
For more see:
http://bitbucket.org/panzi/youtube-service-menu/src/tip/Changelog
8 years ago
version 1.12a:
FIX: encoding problems
version 1.12:
NEW: chose format from menu with --format=ask.
NEW: --list option for Python script.
FIX: typos that made the script crash
version 1.11b:
FIX: Crash introduced in last version.
version 1.11a:
Updated greek translation. Thanks to Dimitrios Glentadakis.
version 1.11:
FIX: Extraction of video information. Now a different data extraction strategy
reading the flashvars of embed is used. Hopefully this is more stable.
version 1.10a:
ADD: Greek translation, thanks to Dimitrios Glentadakis (dglent)
version 1.10:
FIX: Extraction of video information. Now a different data extraction strategy
reading the flashvars of embed is used. Hopefully this is more stable.
DEP: New dependency to lxml: http://lxml.de/
NEW: Added video format 38: High Definition 3072p (mp4)
For more see:
http://bitbucket.org/panzi/youtube-service-menu/src/tip/Changelog
dglent
9 years ago
When i click on download, i have the follow message and the download does not start:
Traceback (most recent call last):
File "/usr/bin/get_yt_video.py", line 582, in main
file_info = get_filename(save_dir, video_id, select)
File "/usr/bin/get_yt_video.py", line 300, in get_filename
itag = showMenu(_("Save YouTube Video"),_("Chose format of »%(title)s« by »%(user)s«:") % video_info,menu)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 9: ordinal not in range(128)
If i click on download and play, it works
Report
dglent
9 years ago
example:
http://www.youtube.com/watch?v=Wlz6rE4vPGQ
Report
panzi
8 years ago
Also for some reason I don't get notified when someone posts a new comment here. So if you want a bug to be noticed add it to the issue tracker (already did this for this bug): https://bitbucket.org/panzi/youtube-service-menu/issues?status=new&status=open
Report
BJIacTeJIuH
4 years ago
Report
dglent
8 years ago
thanks
Report
dglent
9 years ago
When i click on download, i have the follow message and the download does not start:
Traceback (most recent call last):
File "/usr/bin/get_yt_video.py", line 582, in main
file_info = get_filename(save_dir, video_id, select)
File "/usr/bin/get_yt_video.py", line 300, in get_filename
itag = showMenu(_("Save YouTube Video"),_("Chose format of »%(title)s« by »%(user)s«:") % video_info,menu)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 9: ordinal not in range(128)
If i click on download and play, it works
Report
KevinKofler
9 years ago
Report
dglent
9 years ago
Report
dglent
9 years ago
Report
panzi
9 years ago
Report
dglent
9 years ago
example: http://www.youtube.com/watch?v=aLEhh_XpJ-0
I have this message in the konsole:
Traceback (most recent call last):
File "/usr/bin/get_yt_video.py", line 504, in main
file_name, vid_url = get_filename(save_dir, video_id, select)
File "/usr/bin/get_yt_video.py", line 223, in get_filename
m = re.search(r"^\s*yt\.playerConfig\s*=\s*(.*);\s*$",script.text,re.M)
File "/usr/lib64/python2.7/re.py", line 142, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or buffer
Report
panzi
9 years ago
http://priyadi.net/archives/2004/11/04/using-bookmarklet-in-konqueror/
Then simply copy the whole script starting after "user strict"; and paste it in the location filed of the minitools bookmark editor. Add javascript: in front and void(0) at the end of the script.
Report
panzi
9 years ago
It's because there is no version of this video with itag 22 (mp4 720p). There is only one with itag 18 (mp4 360p). Because there is no way to dynamically generate the menu of a user script I just list some common ones, that actually might not be supported by every video.
Use my user script (linked in the description above) to get a nice download menu inside the YouTube interface that only presents you with the actually supported options. If your browser supports user scripts, that is. (They are also called greasemonkey scripts sometimes.)
If your browser does not support users scripts, it might be possible to turn it into a bookmarklet.
Report
dglent
9 years ago
For the userscript, i dont know how to adapt to konqueror.
I found this link http://blog.ssokolow.com/archives/2007/01/30/konqueror-with-bookmarklets/
i follow the instructions but realy say i did nt have any result and the userscript above i dont know where to add it in the bookmarklets of konqueror.
Report
panzi
9 years ago
Report
dglent
9 years ago
Traceback (most recent call last):
File "/usr/bin/get_yt_video.py", line 506, in main
file_name, vid_url = get_filename(save_dir, video_id, select)
File "/usr/bin/get_yt_video.py", line 272, in get_filename
{"name":name, "options": "\n".join("<li><b>%s:</b> %s</li>" % (key, select[key]) for key in sorted(select))})
ValueError: <p>Video "Say Say Say by Paul McCartney and Michael Jackson by GiraldiMedia" does not support given options:</p><ul><li><b>itag:</b> 22</li></ul>
I tried with other videos too, same result.
Report
dglent
9 years ago
http://glenbox.free.fr/rpm/mga1/noarch/youtube-servicemenu-kde4-1.10a-1mgr1.noarch.rpm
Report
dglent
9 years ago
http://www.mageia-gr.org/rpm/1/noarch/kde-youtube-servicemenu-1.11a-1mgr1.noarch.rpm
Report
rangerGR
10 years ago
Quote:Type=Service
MimeType=application/octet-stream;
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
under [Desktop Entry]
Report
rangerGR
10 years ago
Quote: $ get_yt_video.py
File "/usr/bin/get_yt_video.py", line 347
except Exception, e:
^
SyntaxError: invalid syntax
Report
panzi
9 years ago
Also I never tried to run the script using Python 3. Under most (all?) distributions Python 2 is still the standard.
Report
rangerGR
9 years ago
Arch linux uses python 3 by default, so I had to change
#!/usr/bin/env python
to
#!/usr/bin/env python2
in order to make it work.
Report
dglent
10 years ago
http://glenbox.free.fr/files/youtube-servicemenu/el.po
but i added manualy the file in: /usr/share/get_yt_video/el/LC_MESSAGES/get_yt_video.mo
and i have the messages always in english
Report
dglent
10 years ago
http://glenbox.free.fr/files/youtube-servicemenu/get_yt_video.desktop
it is ok now
Report
panzi
10 years ago
Report