{ "info": { "author": "Patrice FERLET", "author_email": "metal3d@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: POSIX :: Linux", "Programming Language :: Cython", "Topic :: Internet", "Topic :: Multimedia :: Video" ], "description": "===========\nPython Quvi\n===========\n\nThis is a first attempt to wrap libquvi into python.\n\n-----------------\nHow it is made ?\n-----------------\n\nThis is based on Cython. The main functions are defined into cpython.pxd file and Quvi class is developed into quvi.pyx file.\nCompilation is made with Cython using the simple command::\n\n python setup.py build_ext\n\nYou can also compile .so file in you current directory::\n\n\tpython setup.py build_ext --inplace\n\nTo install library on system, you may use as root or by sudo::\n\n python setup.py install\n\nRemember you can use ``virtualenv`` to try quvi without impact on your system::\n\n mkdir /tmp/py-virt\n virtualenv /tmp/py-virt\n source /tmp/py-virt/bin/activate\n setup python.py install\n\nThis will install quvi into a virtual environment. To deactivate virtual environment, in the same terminal session::\n\n deactivate\n\n-----\nUsage\n-----\n\nAfter having compiled quvi, you can use it as a python module. Module defines a class named ``Quvi``. This is a simple usage::\n\n import quvi\n\n #instance:\n q = quvi.Quvi()\n q.parse(\"http://a.youtube.url\")\n print q.get_properties()\n\nYou will see a dict definition that have severals information given by libquvi.\n\nIt's possible to use ``multiprocessing`` module or ``threads`` module to handle several instances. See this example::\n\n import quvi\n from multiprocessing import Process\n\n #this function will be called in thread\n def getInfo(url):\n q = quvi.Quvi()\n q.parse(url)\n print q.get_properties()\n\n #urls to parse\n url = \"http://www.youtube.com/watch?v=...\"\n url2 = \"http://www.youtube.com/watch?v=...\"\n\n #processes list\n processes = []\n processes.append( Process(target=getInfo, args=(url,)) )\n processes.append( Process(target=getInfo, args=(url2,)) )\n\n #start and join threads\n [p.start() for p in processes]\n [p.join() for p in processes]\n\n print \"done\"\n\nBoth url will be handle in a thread. So this will be about twice quicker than parsing each url one by one.\n\nAnother usecase would be to get the properties of the best format available::\n\n from quvi import Quvi\n\n def get_properties_best_quality(url):\n q = Quvi()\n\n url = \"http://www.youtube.com/watch?v=0gzA6Xzbh1k\"\n if q.is_supported(url):\n formats = q.get_formats(url)\n best_format = formats[-1]\n q.set_format(best_format)\n q.parse(url)\n properties = q.get_properties()\n return properties\n return none\n\nAnd downloading the video::\n\n def get_video(filename, url):\n properties = get_properties_best_quality(url)\n if properties is not None:\n to_dl = properties[\"mediaurl\"]\n filename += properties[\"filesuffix\"]\n urlretrieve(to_dl, filename)\n\n\n-------------------------\nWhy this python library ?\n-------------------------\n\nBecause Quvi command line is really nice and I wanted to get youtube, dailymotion, vimeo (etc...) movies information into my python project. Calling \"quvi\" command line may be used, but having a real library implementation is the best way to have good performances.\n\nUsing Cython is pretty cool\n\n-----------------\nWhat's next ?\n-----------------\n\nFor now, you can only get media information from a page you ask to parse. I will continue to develop this library to improved and use properties provided by C library (version, nextmediaurl...)\n\nIf you want to develop with me, fork the project on GitHub, then process some merge request :)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/metal3d/python-libquvi", "keywords": null, "license": "LGPLv2.1+", "maintainer": null, "maintainer_email": null, "name": "Quvi", "package_url": "https://pypi.org/project/Quvi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Quvi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/metal3d/python-libquvi" }, "release_url": "https://pypi.org/project/Quvi/0.1/", "requires_dist": null, "requires_python": null, "summary": "libquvi wrapper module", "version": "0.1" }, "last_serial": 785477, "releases": { "0.0.1-alpha": [ { "comment_text": "", "digests": { "md5": "b25aea619e28dc30eb864ef92f8338d8", "sha256": "1f5f5a5e05f7430409ef05244acd1b38f94e1f26b143611e9ca38bed1469a237" }, "downloads": -1, "filename": "Quvi-0.0.1-alpha.tar.gz", "has_sig": false, "md5_digest": "b25aea619e28dc30eb864ef92f8338d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6355, "upload_time": "2011-09-26T13:25:59", "url": "https://files.pythonhosted.org/packages/fb/95/2c7de95dc78734ad6c6e1a4c0d803b7ab565ff59ad95b130ba0eaabd87a9/Quvi-0.0.1-alpha.tar.gz" } ], "0.0.1-b1": [ { "comment_text": "", "digests": { "md5": "d1af4e68ee4dd62bd4ffe6c1dafd5cb2", "sha256": "bb986fd2c156af741b50b0062ecca8195045d64787d0a9a132edaf6ed3848ad3" }, "downloads": -1, "filename": "Quvi-0.0.1-b1.tar.gz", "has_sig": false, "md5_digest": "d1af4e68ee4dd62bd4ffe6c1dafd5cb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8439, "upload_time": "2012-03-17T17:05:43", "url": "https://files.pythonhosted.org/packages/e3/d6/a833e26c6f6cbdef8f2461baf963dc1451c3551c129f46dab9d86bfc2bef/Quvi-0.0.1-b1.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "287bc19794f6b6c1b4c8ce2130665348", "sha256": "8bf4d712a718ced9ed742e69246c3c61d13097faeb5dc3daac8d690688541227" }, "downloads": -1, "filename": "Quvi-0.1.tar.gz", "has_sig": false, "md5_digest": "287bc19794f6b6c1b4c8ce2130665348", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8442, "upload_time": "2012-08-15T08:36:55", "url": "https://files.pythonhosted.org/packages/e7/3f/facbe39cd869076eb70c90cd4560c504f3c1eee2e360a3846f1560dfa790/Quvi-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "287bc19794f6b6c1b4c8ce2130665348", "sha256": "8bf4d712a718ced9ed742e69246c3c61d13097faeb5dc3daac8d690688541227" }, "downloads": -1, "filename": "Quvi-0.1.tar.gz", "has_sig": false, "md5_digest": "287bc19794f6b6c1b4c8ce2130665348", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8442, "upload_time": "2012-08-15T08:36:55", "url": "https://files.pythonhosted.org/packages/e7/3f/facbe39cd869076eb70c90cd4560c504f3c1eee2e360a3846f1560dfa790/Quvi-0.1.tar.gz" } ] }