This script allows you to scrape and count the number of pins from a specified Pinterest profile. It uses Selenium for web automation and BeautifulSoup for HTML parsing.
Note: Tested on 15k unsorted pins.
- Ensure you have Python installed on your machine.
- Install Chrome (Don't use portable version) and download ChromeDriver. They must be the same version, you can download it from here (Srcroll down, search for chromedriver of your version) or from Releases.
- Install the required packages:
pip install requests beautifulsoup4 selenium
- Open Chrome and log in to Pinterest then you can close it.
- Set the profile path to the path of the Chrome profile. You can find it in the Chrome settings.
# For example: profile_path = 'C:/Users/YOUR_USER/AppData/Local/Google/Chrome/User Data'
- Set path to the ChromeDriver:
# For example: chromedriver_path = 'C:/Users/YOUR_USER/Downloads/chromedriver-win64/chromedriver.exe'
- Run the script:
python pin_counter.py
- When prompted, enter the URL of the Pinterest profile you want to scrape. The URL should be in the format:
https://{region}.pinterest.com/{username}/_pins/ - Script will start after 30 seconds. Wait a while and the script will count the number of pins.
- Give the repository a star and follow me on GitHub. :P
This project is licensed under the MIT License.