Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Python suite for batch-downloading images from galleries.
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.
Platforms, Python Versions:
Gallery Plugins:
Generic Plugin works for:
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
pip install
$ [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.
import gallery_get
gallery_get.run()
gallery_get.run(URL)
gallery_get.run(URL, DESTINATION)
import reddit_get
reddit_get.run()
reddit_get.run(USER)
reddit_get.run(USER, DESTINATION)
Skipping parameters results in same corresponding behavior indicated above.
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...)
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:
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.
See comments in the existing plugin files for more details.
Licensed under the MIT License.
FAQs
Gallery downloader - supports many galleries and reddit user histories
We found that gallery-get demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.