{
"info": {
"author": "Vinta Chen",
"author_email": "vinta.chen@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: Chinese (Traditional)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Multimedia :: Graphics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities"
],
"description": "Haul\n====\n\n.. image:: https://travis-ci.org/vinta/Haul.png?branch=master\n :alt: Build Badge\n :target: https://travis-ci.org/vinta/Haul\n\n.. image:: https://coveralls.io/repos/vinta/Haul/badge.png?branch=master\n :alt: Coverage Badge\n :target: https://coveralls.io/r/vinta/Haul\n\n.. image:: https://badge.fury.io/py/haul.png\n :alt: Version Badge\n :target: http://badge.fury.io/py/haul\n\n.. image:: https://d2weczhvl823v0.cloudfront.net/vinta/haul/trend.png\n :alt: Bitdeli Badge\n :target: https://bitdeli.com/free\n\n\nFind thumbnails and original images from URL or HTML file.\n\nDemo\n====\n\n`Hauler on Heroku `_\n\nInstallation\n============\n\non Ubuntu\n\n.. code-block:: bash\n\n $ sudo apt-get install build-essential python-dev libxml2-dev libxslt1-dev\n $ pip install haul\n\non Mac OS X\n\n.. code-block:: bash\n\n $ pip install haul\n\nFail to install haul? `It is probably caused by lxml `_.\n\nUsage\n=====\n\nFind images from ``img src``, ``a href`` and even ``background-image``:\n\n.. code-block:: python\n\n import haul\n\n url = 'http://gibuloto.tumblr.com/post/62525699435/fuck-yeah'\n result = haul.find_images(url)\n\n print(result.image_urls)\n \"\"\"\n output:\n [\n 'http://25.media.tumblr.com/3f5f10d7216f1dd5eacb5eb3e302286a/tumblr_mtpcwdzKBT1qh9n5lo1_500.png',\n ...\n 'http://24.media.tumblr.com/avatar_a3a119b674e2_16.png',\n 'http://25.media.tumblr.com/avatar_9b04f54875e1_16.png',\n 'http://31.media.tumblr.com/avatar_0acf8f9b4380_16.png',\n ]\n \"\"\"\n\nFind original (or bigger size) images with ``extend=True``:\n\n.. code-block:: python\n\n import haul\n\n url = 'http://gibuloto.tumblr.com/post/62525699435/fuck-yeah'\n result = haul.find_images(url, extend=True)\n\n print(result.image_urls)\n \"\"\"\n output:\n [\n 'http://25.media.tumblr.com/3f5f10d7216f1dd5eacb5eb3e302286a/tumblr_mtpcwdzKBT1qh9n5lo1_500.png',\n ...\n 'http://24.media.tumblr.com/avatar_a3a119b674e2_16.png',\n 'http://25.media.tumblr.com/avatar_9b04f54875e1_16.png',\n 'http://31.media.tumblr.com/avatar_0acf8f9b4380_16.png',\n # bigger size, extended from above urls\n 'http://25.media.tumblr.com/3f5f10d7216f1dd5eacb5eb3e302286a/tumblr_mtpcwdzKBT1qh9n5lo1_1280.png',\n ...\n 'http://24.media.tumblr.com/avatar_a3a119b674e2_128.png',\n 'http://25.media.tumblr.com/avatar_9b04f54875e1_128.png',\n 'http://31.media.tumblr.com/avatar_0acf8f9b4380_128.png',\n ]\n \"\"\"\n\nAdvanced Usage\n==============\n\nCustom finder / extender pipeline:\n\n.. code-block:: python\n\n from haul import Haul\n from haul.compat import str\n\n\n def img_data_src_finder(pipeline_index,\n soup,\n finder_image_urls=[],\n *args, **kwargs):\n \"\"\"\n Find image URL in
's data-src attribute\n \"\"\"\n\n now_finder_image_urls = []\n\n for img in soup.find_all('img'):\n src = img.get('data-src', None)\n if src:\n src = str(src)\n now_finder_image_urls.append(src)\n\n output = {}\n output['finder_image_urls'] = finder_image_urls + now_finder_image_urls\n\n return output\n\n MY_FINDER_PIPELINE = (\n 'haul.finders.pipeline.html.img_src_finder',\n 'haul.finders.pipeline.css.background_image_finder',\n img_data_src_finder,\n )\n\n GOOGLE_SITES_EXTENDER_PIEPLINE = (\n 'haul.extenders.pipeline.google.blogspot_s1600_extender',\n 'haul.extenders.pipeline.google.ggpht_s1600_extender',\n 'haul.extenders.pipeline.google.googleusercontent_s1600_extender',\n )\n\n url = 'http://fashion-fever.nl/dressing-up/'\n h = Haul(parser='lxml',\n finder_pipeline=MY_FINDER_PIPELINE,\n extender_pipeline=GOOGLE_SITES_EXTENDER_PIEPLINE)\n result = h.find_images(url, extend=True)\n\nRun Tests\n=========\n\n.. code-block:: bash\n\n $ cd tests\n $ python test.py\n\n\nHistory\n=======\n\n1.3.2 (2013-11-05)\n++++++++++++++++++\n\n- Bug fixed: `#12 `_\n\n\n1.3.1 (2013-10-24)\n++++++++++++++++++\n\n- Add `is_found` attribute for `HaulResult`\n- Add `to_ordered_dict()` method for `HaulResult`\n- `A demo site on Heroku `_\n\n\n1.3.0 (2013-10-16)\n++++++++++++++++++\n\n- Use unicode for every string\n- Fix running test.py from another directory\n- Rename module `models` to `core`\n- Remove in_ignorecase()\n\n\n1.2.0 (2013-10-15)\n++++++++++++++++++\n\n- Improve error handling\n\n\n1.1.0 (2013-10-04)\n++++++++++++++++++\n\n- Custom finder / extender pipeline support\n\n\n1.0.0 (2013-10-03)\n++++++++++++++++++\n\n- Initial release",
"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/vinta/Haul",
"keywords": "haul web image content scraper parser crawler",
"license": "The MIT License (MIT)\n\nCopyright (c) 2013 Vinta\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"maintainer": null,
"maintainer_email": null,
"name": "haul",
"package_url": "https://pypi.org/project/haul/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/haul/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/vinta/Haul"
},
"release_url": "https://pypi.org/project/haul/1.3.2/",
"requires_dist": null,
"requires_python": null,
"summary": "An Extensible Image Crawler",
"version": "1.3.2"
},
"last_serial": 2805995,
"releases": {
"1.0.0": [],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "d5e102183b3a848f77030f188f0196e6",
"sha256": "58cf4f9bf68c425bf3245a65d260db7ec6d4ec6b1100156949edda652a05331c"
},
"downloads": -1,
"filename": "haul-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d5e102183b3a848f77030f188f0196e6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7438,
"upload_time": "2013-10-04T02:51:42",
"url": "https://files.pythonhosted.org/packages/07/4c/ad2fd066738f523e7227619ee75471ecea115897b926501d9d9fc2377f1d/haul-1.1.0.tar.gz"
}
],
"1.2.0": [
{
"comment_text": "",
"digests": {
"md5": "8d748fe4c93f46de9b923000484eea87",
"sha256": "d3f3d55ab0a364495d4c1587e474f8175ca9585c3ac9f583cba5c53a652f467f"
},
"downloads": -1,
"filename": "haul-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "8d748fe4c93f46de9b923000484eea87",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8076,
"upload_time": "2013-10-14T16:48:45",
"url": "https://files.pythonhosted.org/packages/88/b7/5fcb8bafe6aa2c007ebd95fee591d605eba8e8160135740555870ae5aefa/haul-1.2.0.tar.gz"
}
],
"1.3.0": [
{
"comment_text": "",
"digests": {
"md5": "c8beb92794ca4a99e530fb70c84612f5",
"sha256": "b58e9fea2a9e9c09790b0c1283a1e3e7a37c7376b3b66055754b97d8b1c6231e"
},
"downloads": -1,
"filename": "haul-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "c8beb92794ca4a99e530fb70c84612f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8456,
"upload_time": "2013-10-16T02:01:29",
"url": "https://files.pythonhosted.org/packages/35/d8/b046b8712fb11cf19eea2c7b4d3b3f48eb70676b1a77b2dce65ee4a04fec/haul-1.3.0.tar.gz"
}
],
"1.3.1": [
{
"comment_text": "",
"digests": {
"md5": "3660e762dcee943131fdf3616d1df4a5",
"sha256": "bb7bd366da53de69841dae16a703a8ba865c1ff8077eb022c3934715045f17bd"
},
"downloads": -1,
"filename": "haul-1.3.1.tar.gz",
"has_sig": false,
"md5_digest": "3660e762dcee943131fdf3616d1df4a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8791,
"upload_time": "2013-10-23T20:10:47",
"url": "https://files.pythonhosted.org/packages/0d/fe/60b502e75d7c6b2eb4f533ad8693deb78c141cc08ddbf82ac3049efdeca5/haul-1.3.1.tar.gz"
}
],
"1.3.2": [
{
"comment_text": "",
"digests": {
"md5": "a5f25a930976e4513d37d357d8846216",
"sha256": "6b5664ed9b389d6e8ba6537f64887cb0ae80178f43677328acf6f9036c6cf5dd"
},
"downloads": -1,
"filename": "haul-1.3.2.tar.gz",
"has_sig": false,
"md5_digest": "a5f25a930976e4513d37d357d8846216",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8825,
"upload_time": "2013-11-04T19:18:01",
"url": "https://files.pythonhosted.org/packages/10/35/08b709f7bf1d38ae347aa6a92746fa513a2fa4ab393dccaa339394cbb5f8/haul-1.3.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a5f25a930976e4513d37d357d8846216",
"sha256": "6b5664ed9b389d6e8ba6537f64887cb0ae80178f43677328acf6f9036c6cf5dd"
},
"downloads": -1,
"filename": "haul-1.3.2.tar.gz",
"has_sig": false,
"md5_digest": "a5f25a930976e4513d37d357d8846216",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8825,
"upload_time": "2013-11-04T19:18:01",
"url": "https://files.pythonhosted.org/packages/10/35/08b709f7bf1d38ae347aa6a92746fa513a2fa4ab393dccaa339394cbb5f8/haul-1.3.2.tar.gz"
}
]
}