Page MenuHomePhabricator

Add video encoding to flickrripper.py
Closed, DeclinedPublic

Description

Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/257/
Reported by: multichill
Created on: 2010-07-13 18:09:00
Subject: Add video encoding to flickrripper.py
Assigned to: multichill
Original description:
For video's like for example http://www.flickr.com/photos/boryskozielski/4779935766/in/pool-1336393@N24/

This is so that I don't forget it. Feel free to "steal" this bug ;-\)


Version: unspecified
Severity: enhancement
See Also:
https://sourceforge.net/p/pywikipediabot/feature-requests/257

Details

Reference
bz55062

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:17 AM
bzimport set Reference to bz55062.
bzimport added a subscriber: Unknown Object (????).

multichill, I don't understand the request.

Dman, that's an old one! At the moment it's possible to upload images from Flickr, but Flickr also contains video's. Try uploading one of those (that will fail). The bot should be able to detect that it's a video and than transcode it on the fly to ogv (or some other video format).

I think this is an example of how a failure looks like:

Uploading file to commons:commons...
Reading file https://www.flickr.com/photos/henry_hemming/41103640585/play/hd/9129dfb248/
Traceback (most recent call last):
  File "pwb.py", line 257, in <module>
    if not main():
  File "pwb.py", line 250, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 119, in run_python_file
    main_mod.__dict__)
  File "./scripts/flickrripper.py", line 547, in <module>
    main()
  File "./scripts/flickrripper.py", line 539, in main
    removeCategories, autonomous)
  File "./scripts/flickrripper.py", line 349, in processPhoto
    bot.upload_image(debug=False)
  File "/home/7/federico/pwb/pywikibot/tools/__init__.py", line 1616, in wrapper
    return obj(*args, **kwargs)
  File "/home/7/federico/pwb/pywikibot/tools/__init__.py", line 1737, in wrapper
    return obj(*__args, **__kw)
  File "/home/7/federico/pwb/pywikibot/specialbots.py", line 399, in upload_image
    return self.upload_file(self.url)
  File "/home/7/federico/pwb/pywikibot/tools/__init__.py", line 1737, in wrapper
    return obj(*__args, **__kw)
  File "/home/7/federico/pwb/pywikibot/specialbots.py", line 423, in upload_file
    file_url = self.read_file_content(file_url)
  File "/home/7/federico/pwb/pywikibot/specialbots.py", line 148, in read_file_content
    infile = uo.open(file_url)
  File "/usr/lib/python2.7/urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 457, in open_https
    return self.http_error(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 381, in http_error
    return self.http_error_default(url, fp, errcode, errmsg, headers)
  File "/usr/lib/python2.7/urllib.py", line 386, in http_error_default
    raise IOError, ('http error', errcode, errmsg, headers)
IOError: ('http error', 302, 'Found', <httplib.HTTPMessage instance at 0x388d962f8c0>)
CRITICAL: Exiting due to uncaught exception <type 'exceptions.IOError'>

flickrripper is archived. If you still use that script, please reopen this task and create another to restore the archived script to the actively maintained scripts