prntscget ~curl
prnt.sc gallery downloader
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
prnt.sc
get
This command-line program downloads your Lightshot (prnt.sc
) gallery and saves it to disk. It is very slow by default so as to be dead certain not to trigger rate-limiting measures; it's meant to be run over a period of hours or even days. The delays between images can be specified when running the program (default values are naturally subject to tweaking; feedback appreciated). An interrupted run will be resumed on next execution.
Heavily inspired by Wipie/LightShotGalleryDownloader-CLI.
How to get
Either download a binary from the Releases page, or clone the source and build it yourself.
$ git clone https://github.com/zorael/prntscget.git
How to build
You need a D compiler and the official dub
package manager. On Windows it comes bundled in the compiler archive, while on Linux it may have to be installed separately. Refer to your repositories.
$ dub build
How to use
usage: prntscget [options] [json file]
-c --cookie Cookie to download gallery of (see README).
-d --dir Target image directory.
-s --start Starting image position.
-n --num Number of images to download.
-r --retries How many times to retry downloading an image.
-D --delay Delay between image downloads, in seconds.
-t --timeout Download attempt read timeout, in seconds.
--dry-run Download nothing, only echo what would be done.
Gallery access cookie
To have the program gain access to your gallery, you need to extract the value of the __auth
cookie that your browser sets when logging into the page, and pass it to the program.
Browser | Action |
---|---|
Firefox | 1. <kbd>Shift</kbd>+<kbd>F9</kbd> 2. Cookies tab3. Select the cookie provider https://prntscr.com 4. Copy the value of the __auth cookie |
Chrome | 1. <kbd>F12</kbd> 2. Click on Application at the top3. Cookies section4. Select the cookie provider https://prntscr.com 5. Copy the value of the __auth cookie |
Pass this value to the program with the -c
switch.
$ ./prntscget -c thesecretsixtyfourletterauthcookiestringgoeshere
This fetches a list of 10,000 of your images and saves it to a file in the current directory (default target.json
), then starts downloading the images therein.
Subsequent executions of the program will reuse this file, so you only need to supply the cookie once, or whenever you want to update the list with new images.
A target.json
fetched for use with Wipie/LightShotGalleryDownloader-CLI can be used directly as-is.
But downloading takes ages
By default it conservatively downloads one image every 60 seconds, which is probably overkill, but safe. To speed it up, pass a smaller number with the --delay
flag.
$ prntscget --delay 10
Feedback appreciated; likely the default can be safely lowered.
License
This project is licensed under the MIT license - see the LICENSE file for details.
Built with
Acknowledgements
- Registered by JR
- ~curl released 3 years ago
- zorael/prntscget
- MIT
- Copyright © 2021, JR
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.3 2021-Nov-06 0.1.2 2021-Jun-17 0.1.1 2021-Jun-12 0.1.0 2021-Jun-12 ~master 2021-Nov-20 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
13 downloads total
-
- Score:
- 0.8
- Short URL:
- prntscget.dub.pm