A Python application for scraping and storing Snapchat profile data.
This application utilizes Selenium and MongoDB to scrape and store Snapchat profile data. It includes a Flask server to handle requests for scraping profiles and fetching stored data.
- Scrapes Snapchat profile data using Selenium.
- Stores the scraped data in MongoDB.
- Provides an API endpoint for scraping profiles in the background.
- Fetches and displays stored profiles.
- Python 3.x
- Flask
- MongoDB
Follow the steps below to set up and run the Snapchat Profile Scraper:
-
Clone the Repository:
git clone https://github.com/yabesh12/snapchat-scraper.git
-
Navigate to the Project Directory:
cd snapchat-profile-scraper
-
Create a Virtual Environment:
python -m venv venv
-
Activate the Virtual Environment:
-
On Windows:
.\venv\Scripts\activate
-
On Unix or MacOS:
source venv/bin/activate
-
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Flask Application:
python app.py
To scrape a Snapchat profile, make a POST request to:
http://localhost:8000/scrape-user-profile/
Include the profile URL in the request body:
{
"profile_url": "https://www.snapchat.com/add/username"
}
To fetch all stored profiles, make a GET request to:
http://localhost:8000/get-all-profiles/