# gallery_get & reddit_get
**Python suite for batch-downloading images from galleries.**
## Introduction
Many galleries make it hard to download all the images from a gallery. Their image links often redirect to a viewing page rather than the image itself, making it hard to grab all the images on a page (even with popular browser plugins). To get around this, gallery_get opens the redirect-links and grabs images from there.
reddit_get grabs all imgur albums and pictures submitted by a given reddit user. It relies on gallery_get.
## Tested Versions and Galleries
Platforms, Python Versions:
* macOS (Python 2.7.2 and 3.5.1)
* Windows (Python 2.7.3 and 3.6.0)
Gallery Plugins:
* 4chan
* alphacoders
* eroshare
* fuskator
* gfycat
* gogoimage
* imagefap
* imagevenue
* imgbox
* imgur (albums and galleries)
* Pornhub (albums and single videos)
* reddit
* shimmie
* vidble
* xHamster
* xVideos
Generic Plugin works for:
* alafoto.com
* forum.phun.org
* setsdb.org
* (more)
## Installation
You can download this repository from GitHub, or grab it from PyPI:
```
$ pip install gallery_get
```
PyPI page is here: https://pypi.python.org/pypi/gallery_get
### Requirements
- Python 2.6+ or any version of Python 3
- Python packages: [selenium](https://pypi.org/project/selenium/) and [chromedriver-py](https://pypi.org/project/chromedriver-py/)
- only needed for imgur albums
- automatically installed if you use `pip install`
## Usage
### From the Command Line
```
$ [python -m] gallery_get
$ [python -m] gallery_get [URL-OF-GALLERY]
$ [python -m] gallery_get [URL-OF-GALLERY] [DEST]
```
```
$ [python -m] reddit_get
$ [python -m] reddit_get [REDDIT-USERNAME]
$ [python -m] reddit_get [REDDIT-USERNAME] [DEST]
```
If you call with no parameters, you'll be prompted for the gallery URL (for gallery_get) or reddit user (for reddit_get). You will also be prompted for a destination directory, which it will remember as the default for next time.
If you skip [DEST] it will look for the contents of last_gallery_dest.txt, falling back on the current working directory.
### From the Python Environment
```python
import gallery_get
gallery_get.run()
gallery_get.run(URL)
gallery_get.run(URL, DESTINATION)
```
```python
import reddit_get
reddit_get.run()
reddit_get.run(USER)
reddit_get.run(USER, DESTINATION)
```
Skipping parameters results in same corresponding behavior indicated above.
## Notes
If you run gallery_get or reddit_get on the same URL/user and destination more than once, it will skip the already-existing images next time (unless the size has changed). This allows you to do incremental updates.
gallery_get comes with a few "plugins" customized for certain sites, along with a generic fallback plugin that works on multiple galleries. Note that galleries will change their markup from time to time, so these plugins may need to be updated to catch up with such changes. (Which brings us to the next section...)
## Testing
I've provided a testing suite called gallery_get_test.py that will run gallery_get/reddit_get with provided URLs and users. Options are as follows
```
--noprompt don't prompt for extra galleries
--input=INPUT_PATH input CSV for testing (same format as output)
```
INPUT_PATH defaults to gallery_get_test_input.csv (provided)
The output is gallery_get_test_output.csv
To add a new gallery/user to the test:
1. run gallery_get_test.py
2. enter your gallery/user
3. repeat step 2 for additional galleries/users
4. if the output looks ok, replace gallery_get_test_input.csv with gallery_get_test_output.csv
## Contribute
Feel free to add your own plugins or make updates if you're familiar with regular expressions and/or Python logic!
Each plugin overrides the following with a string, regular expression, or function.
- title
- redirect links
- image links
- whether to use the same filename from the site, or use "001", "002", etc.
See comments in the existing plugin files for more details.
## License
Licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": "https://github.com/regosen/gallery_get",
"name": "gallery-get",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "gallery downloader reddit imgur imgbox 4chan xhamster eroshare vidble pornhub xvideos imagebam alphacoders",
"author": "Rego Sen",
"author_email": "regosen@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9c/90/c8924e193fc39a4ac54f971f38b3b9e81bba0596e5419a95d79f73d7915a/gallery_get-1.9.4.tar.gz",
"platform": null,
"description": "# gallery_get & reddit_get\n\n**Python suite for batch-downloading images from galleries.**\n\n## Introduction\n\nMany galleries make it hard to download all the images from a gallery. Their image links often redirect to a viewing page rather than the image itself, making it hard to grab all the images on a page (even with popular browser plugins). To get around this, gallery_get opens the redirect-links and grabs images from there.\n\nreddit_get grabs all imgur albums and pictures submitted by a given reddit user. It relies on gallery_get.\n\n\n## Tested Versions and Galleries\n\nPlatforms, Python Versions:\n\n* macOS (Python 2.7.2 and 3.5.1)\n* Windows (Python 2.7.3 and 3.6.0)\n\nGallery Plugins:\n\n* 4chan\n* alphacoders\n* eroshare\n* fuskator\n* gfycat\n* gogoimage\n* imagefap\n* imagevenue\n* imgbox\n* imgur (albums and galleries)\n* Pornhub (albums and single videos)\n* reddit\n* shimmie\n* vidble\n* xHamster\n* xVideos\n\nGeneric Plugin works for:\n\n* alafoto.com\n* forum.phun.org\n* setsdb.org\n* (more)\n\n## Installation\n\nYou can download this repository from GitHub, or grab it from PyPI:\n\n```\n$ pip install gallery_get\n```\n\nPyPI page is here: https://pypi.python.org/pypi/gallery_get\n\n### Requirements\n\n- Python 2.6+ or any version of Python 3\n- Python packages: [selenium](https://pypi.org/project/selenium/) and [chromedriver-py](https://pypi.org/project/chromedriver-py/)\n - only needed for imgur albums\n - automatically installed if you use `pip install`\n\n## Usage\n\n### From the Command Line\n \n```\n$ [python -m] gallery_get\n$ [python -m] gallery_get [URL-OF-GALLERY]\n$ [python -m] gallery_get [URL-OF-GALLERY] [DEST]\n```\n\n```\n$ [python -m] reddit_get\n$ [python -m] reddit_get [REDDIT-USERNAME]\n$ [python -m] reddit_get [REDDIT-USERNAME] [DEST]\n```\n\nIf you call with no parameters, you'll be prompted for the gallery URL (for gallery_get) or reddit user (for reddit_get). You will also be prompted for a destination directory, which it will remember as the default for next time.\n\nIf you skip [DEST] it will look for the contents of last_gallery_dest.txt, falling back on the current working directory.\n\n### From the Python Environment\n\n```python\nimport gallery_get\ngallery_get.run()\ngallery_get.run(URL)\ngallery_get.run(URL, DESTINATION)\n```\n\n```python\nimport reddit_get\nreddit_get.run()\nreddit_get.run(USER)\nreddit_get.run(USER, DESTINATION)\n```\nSkipping parameters results in same corresponding behavior indicated above.\n\n## Notes\n\nIf you run gallery_get or reddit_get on the same URL/user and destination more than once, it will skip the already-existing images next time (unless the size has changed). This allows you to do incremental updates.\n\ngallery_get comes with a few \"plugins\" customized for certain sites, along with a generic fallback plugin that works on multiple galleries. Note that galleries will change their markup from time to time, so these plugins may need to be updated to catch up with such changes. (Which brings us to the next section...)\n\n## Testing\n\nI've provided a testing suite called gallery_get_test.py that will run gallery_get/reddit_get with provided URLs and users. Options are as follows\n```\n --noprompt don't prompt for extra galleries\n --input=INPUT_PATH input CSV for testing (same format as output)\n```\nINPUT_PATH defaults to gallery_get_test_input.csv (provided)\nThe output is gallery_get_test_output.csv\n\nTo add a new gallery/user to the test:\n\n 1. run gallery_get_test.py\n 2. enter your gallery/user\n 3. repeat step 2 for additional galleries/users\n 4. if the output looks ok, replace gallery_get_test_input.csv with gallery_get_test_output.csv\n\n## Contribute\n\nFeel free to add your own plugins or make updates if you're familiar with regular expressions and/or Python logic!\n\nEach plugin overrides the following with a string, regular expression, or function.\n\n- title\n- redirect links\n- image links\n- whether to use the same filename from the site, or use \"001\", \"002\", etc.\n\nSee comments in the existing plugin files for more details.\n\n\n## License\n\nLicensed under the MIT License.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Gallery downloader - supports many galleries and reddit user histories",
"version": "1.9.4",
"project_urls": {
"Homepage": "https://github.com/regosen/gallery_get"
},
"split_keywords": [
"gallery",
"downloader",
"reddit",
"imgur",
"imgbox",
"4chan",
"xhamster",
"eroshare",
"vidble",
"pornhub",
"xvideos",
"imagebam",
"alphacoders"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3b59391134e28e455142e45a77b20046c05cf9aeae13ba8b1d00d1afa36eb276",
"md5": "3460de7487d8663a2fbb99c78c29c5dc",
"sha256": "f7aa1d9507eb5202296fcdc64d8149d4ba431d3bd18af1d8eea8d20e76bfb170"
},
"downloads": -1,
"filename": "gallery_get-1.9.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3460de7487d8663a2fbb99c78c29c5dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 58115,
"upload_time": "2023-07-03T01:10:00",
"upload_time_iso_8601": "2023-07-03T01:10:00.962221Z",
"url": "https://files.pythonhosted.org/packages/3b/59/391134e28e455142e45a77b20046c05cf9aeae13ba8b1d00d1afa36eb276/gallery_get-1.9.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9c90c8924e193fc39a4ac54f971f38b3b9e81bba0596e5419a95d79f73d7915a",
"md5": "c885271f18c74226ea510bb1b19ca4c2",
"sha256": "0c1c853a247bb74dc16b46ae1048e0478af710ff2cb5e43e9904ef4f05748a4e"
},
"downloads": -1,
"filename": "gallery_get-1.9.4.tar.gz",
"has_sig": false,
"md5_digest": "c885271f18c74226ea510bb1b19ca4c2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10478,
"upload_time": "2023-07-03T01:10:03",
"upload_time_iso_8601": "2023-07-03T01:10:03.260514Z",
"url": "https://files.pythonhosted.org/packages/9c/90/c8924e193fc39a4ac54f971f38b3b9e81bba0596e5419a95d79f73d7915a/gallery_get-1.9.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-03 01:10:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "regosen",
"github_project": "gallery_get",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "gallery-get"
}