Skip to main content

Pulls random images from https://prnt.sc

Project description

prntscraper

  • prntscraper will allow you to scrape images from the prnt.sc website as they have predictable subheadings we can freely attempt to get random images or images in a sequential order from a specified amount to a max limit and download them into a folder. This process is also known as Fuskering This is a security issue from their end as It's highly common people store sensitive information that could easily be stolen if these images are found by the wrong people.

  • DISCLAIMER I am not responsible for the information that may be found with this package.

Installation

This module is compatible with Python3+.

  • Install latest version from git repository using pip:
$ pip install git+https://github.com/ItzBlinkzy/prntscraper.git
  • Install from PyPI:
$ pip install prntscraper

How to use

  • When setting this up make sure you have a folder called "images" in the same directory as the file importing the module.
from prntscraper.scraper import PrntScraper

# Gets random images and store them in ./images folder
my_scraper = PrntScraper()
result = my_scraper.get_random_images()
print(result)

# Gets the newest images and stores them in ./images folder  || MUST HAVE CHROMEDRIVER INSTALLED TO WORK || 
my_scraper = PrntScraper()
result = my_scraper.get_random_images(newest=True)
print(result)

# Takes inputted images and stores them in ./images folder.
my_scraper = PrntScraper()
result = my_scraper.get_input_images()
print(result)

# Gets the count of all the images in the ./images folder.
my_scraper = PrntScraper()
result = my_scraper.folder_size()
print(result)

Outputs:

get_random_images()`

How many images would you like?: 5
Completed: 100%|██████████████████████████████████████████████████| 6/6 [00:09<00:00,  1.58s/images]
Successfully downloaded 5 images. Look at ./images folder. 

get_random_images(newest=True)

  • To use the "newest" parameter you must have Chromedriver installed and inserted into PATH (C:\Program Files (x86) The version of Chromedriver must be less than or equal to your current Chrome browser version.
    • To find your version type chrome://version in the search bar

get_input_images()

Enter any two random letters in the alphabet. Example [gy]: vk
Enter a Point below 9999 to start from: 100
Enter an End Point (inclusive) below 9999 to end: 109
Completed: 100%|██████████████████████████████████████████████████| 10/10 [00:13<00:00,  1.31s/images]
Successfully downloaded 10 images. Look at ./images folder.

folder_size()

There are currently 15 images in the folder.

Pretty simple right?

Issues

Feel free to open an issue or make a pull request if you have any problems using this module.

Credits

  • ItzBlinkzy
    • You can be here too if you'd like to contribute.

Repo

* https://github.com/ItzBlinkzy/prntscraper/

License

GNU General Public License v3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prntscraper-2.4.4.2-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file prntscraper-2.4.4.2-py3-none-any.whl.

File metadata

  • Download URL: prntscraper-2.4.4.2-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for prntscraper-2.4.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92ceec1a5cfb97593b78a62cdb56d3b173785d7a9984e1fc6747b1ffe903d682
MD5 e944d1259389904116d86b1ff64d3484
BLAKE2b-256 2053596960d6622aa7f02ea06b6fb7416c3100e19ec233a0bdeb6be756661867

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page