Scrape Pinterest images using the Pinterest API class
mainThe recommended way to use pinscrape is via the Pinterest class. This approach allows you to search for keywords, download images using multiple workers, and retrieve specific board details.
Note: The scraper.scrape method is deprecated. Use the Pinterest class instead.
from pinscrape import scraper, Pinterest
keyword = "messi"
output_folder = "output"
proxies = {}
number_of_workers = 10
images_to_download = 1
# Recommended usage
p = Pinterest(proxies=proxies, sleep_time=2) # you can also pass `user_agent` here.
images_url = p.search(keyword, images_to_download)
p.download(url_list=images_url, number_of_workers=number_of_workers, output_folder=output_folder)