So here is the first upgrade to the epiphany-video-download extension. See previous post for an introduction into the extension. There are mainly two improvements.
Feedback via Notifications
First of all this extension now gives feedback when the downloading starts and ends. As this uses python-notify (which should be installed on any reasonable gnome desktop) make sure it is installed. It would be nice if I could integrate the notifications into the epiphany download manager – ideally as a ghost download process – however I couldn’t find out how (mailing list archive and developer documentation gave no success). Any hints from epiphany developers are more than welcome.
Update: Now the extension uses clive to extract the video-url and filename via --emit-cvs and makes epiphany do the actual downloading. Thanks to Toni Gundogdu (aka legatvs) for pointing me to this feature and porting this feature to clive 2.x. Well, I really can’t thank him enough as without clive this extension simply wouldn’t exist. It is just glue between epiphany and clive.
Support for more video hosting sites
In addition we now support different video hosting sites, as long as you visit the video hosting site directly. Meaning we only search threw the address bar and not the html-code for known urls. In principle we could also search and download embeded videos from Google Video, Metacafe and Guba. However as embedding from them is not that common this isn’t a high priority. Other video hosting sites (that are supported by clive) don’t seem to offer this function or at least it doesn’t seem possible to extract the original page the video is on (needed for clive) from the embeded video url.
Please report if you find pages from the (clive supported) hosting sites that this extension reports having an embeded video even though it doesn’t or vise versa. Just copy the url into a terminal and run clive <url> to see if it contains a video or not. The video hosting sites have some pages with and some without embeded videos. I mainly guessed the url structure from a few examples without being able to see the full picture.
Limitations
When you download a video from dailymotion.com clive always calls it “Dailymotion.on2” so make sure to delete or rename previously downloaded videos from that site (clive refuses to overwrite files that already exist) unless your download will fail.
Update: Proxy
The GNOME http Proxy Settings (saved via Gconf) are now passed to clive. Previously clive’s own settings were not overwritten so if you didn’t configure a proxy, the value from the environment variable http_proxy was used.
Feedback from you
So now please download or upgrade the extension. As always bugs reports, feature suggestions and comments are very welcome. More so now as this is a very young project.





13 comments
Comments feed for this article
3. Januar 2009 um 13:20
Reinout van Schouwen
Thanks for your extension contribution!
Please feel free to add a patch to http://bugzilla.gnome.org/show_bug.cgi?id=343412 in Gnome bugzilla containing your code. I’m sure that if your extension is good enough it can eventually become part of the official extension set.
22. Mai 2009 um 15:04
Peng
I recently did a clean install of Ubuntu 9.04 (Jaunty), and since I did I keep getting fails when trying to download a video. When I click the icon to download as video (say the one at http://icanhascheezburger.com/2009/05/21/funny-pictures-video-stunt-cat-take-2/ for example) the download always fails. This is what I got when I tried to download it after starting Epiphany from Terminal:
$ epiphany-browser
Traceback (most recent call last):
File „/home/peng2/.gnome2/epiphany/extensions/video-downloader.py“, line 101, in _video_button_pressed_cb
‘Started to download %s videos.’, len(embed._video_urls)) % \
AttributeError: ‘__main__.MozillaEmbed’ object has no attribute ‘_video_urls’
I’m showing that I have Clive 1.0.2-1 installed, which is the newest version available both from Ubuntu’s repos and from Launchpad PPAs. I don’t recall what I did under Ubuntu 8.10 to get it running, and it’s becomr really frustrating. Any suugestions?
22. Mai 2009 um 17:40
blauebirke
Thanks for the good report.
To rule out interactions with other extensions could you verify that the same thing happens after the following steps:
1 .deactivate all epiphany extensions
2. restart epiphany
3. activate the extension
4. restart epiphany
5 go to the url and click on the video icon
Please also verify that the md5sum of epiphany-video.py is 86099e29cb4db1fbc8202abc3df2516e (run: md5sum -t /home/peng2/.gnome2/epiphany/extensions/video-downloader.py).
22. Mai 2009 um 19:20
Peng
Thanks for the quick response. I followed the steps and still ended up with this in my terminal:
:~$ epiphany-browser
sys:1: GtkWarning: Unable to retrieve the file info for `file:///StuntCatTake2.mp4′: Error stating file ‘/StuntCatTake2.mp4′: No such file or directory
The md5sum matches, so I’m thinking I need to either roll back to the older version or see about compiling and installing clive 2.
22. Mai 2009 um 20:01
blauebirke
The Error you are getting now is very different then the one before.
What is the output of
gconftool –get ‘/apps/epiphany/directories/downloads_folder’ ‘/system/http_proxy/use_http_proxy’
From the output I’m pretty sure this has nothing to do with your clive version and it has been tested with clive 1.02. So don’t waste your time trying to install clive 2.
We can test however if you clive is working correctly. What is the output of:
clive –quiet –emit-csv http://youtube.com/watch?v=xMNvGjY__mM
23. Mai 2009 um 12:32
Peng
You’re right, that was a different error. The main error I’d been seeing in previous attempts to track down the issue is the fact that the source URI wasn’t getting completed properly.
Thanks for the good news about not needing clive 2. I really didn’t want to have to compile it at this point if I could avoid it.
Here are the outputs:
:~$ gconftool –get ‘/apps/epiphany/directories/downloads_folder’ ‘/system/http_proxy/use_http_proxy’
/
false
:~$ clive –quiet –emit-csv http://youtube.com/watch?v=xMNvGjY__mM
/usr/lib/python2.6/dist-packages/clive/modules.py:114: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
/usr/lib/python2.6/dist-packages/clive/cache.py:183: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
if ‘table exists already’ in err.message:
==> Passed:
OK: „http://youtube.com/watch?v=xMNvGjY__mM&fmt=18″,“http://www.youtube.com/get_video?video_id=xMNvGjY__mM&t=vjVQa1PpcFMEzgjc_pfrd9dYbaTuQujz3JuOaGY3iwM%3D&fmt=18″,“StuntCatTake2.mp4″,“1.89MB“
Hmm. That does seem to work, although I’m not seeing where the resulted file is.
23. Mai 2009 um 12:33
Peng
I just saw that the flash video file clive got is in /tmp. I guess that’s one problem down.
23. Mai 2009 um 12:52
blauebirke
The problem is that the download-path in epiphany is set wrong. If you right-click on a link and select „download link“ it should also fail. To fix it set the download folder in the Menu „Edit -> Prefferences; (General Tab)“.
The given clive command doesn’t download a file. clive is just just gu get the information about the video and we let epiphany download it for us. So everything is fine with clive.
Let me know if this solves the Problem.
23. Mai 2009 um 13:04
Peng
By not selecting a location to download to Epiphany should ask me where it goes, which actually doesn’t happen with this extension. I’m also getting Fail messages in the Downloads window when I attempt to download a video.
Is there a file where I can specify where Video Downloader saves files? I’ve never been prompted for the location for saving the file, and I seem to remember being able to set that before but I don’t recall it now.
23. Mai 2009 um 13:46
blauebirke
You can unset the Checkbox after you set the folder. Alternativly you can set the path via:
$ gconftool –set ‘/apps/epiphany/directories/downloads_folder’ Desktop –type=string
replacing Desktop with the path you want it to be downloaded (relative path are relative to your home folder). You want to have this set anyways as this is to location a „shift+click“ will download to.
Currently this extension can’t ask where to download the file. If you’re lucky a middle-click on the video icon will ask you for a download location, but it will play the video in a new tab if it can.
23. Mai 2009 um 14:08
Peng
I changed the location for saving files and tried to snag the vid from the link I posted above, and it failed. I closed Epiphany and launched it from Terminal and got two bits of good news. The first is the fact that clicking the icon does in fact download the video successfully, and if I center click the icon I got a dialog box that gave me the opportunity to save the MP4 file.
I’m going to call this one RESOLVED and post a note on my blog about it to help people find the solution. You may want to specify the need for setting a download folder a little more clearly, as well as the center click feature.
Thanks for all the assistance. You definitely rock.
29. Mai 2009 um 23:23
Jens Knutson
Any chance for an update compatible with ephy-WebKit?
30. Mai 2009 um 09:35
blauebirke
It has been a while since I looked into ephy-webkit. I don’t know of any documentation about the differences. However if I’m not mistaken, video downloader doesn’t use anything gecko specific. It’s just that the webkit backend hasn’t implemented everything, yet. The problematic part is the persist.
If you know more about the Webkit differences, can verify or correct me that would be very appreciated. I would be glad to port this extension to ephy-webkit