Welcome to the Instagram Hashtag Scraper! This Python project allows you to scrape Instagram posts based on specific hashtags. Using Selenium for browser automation and BeautifulSoup for scraping, this tool fetches posts by hashtag with customizable options to automate login, scrape content, and interact with Instagram posts.
- Scrape Posts by Hashtag: Fetch posts that match specific hashtags.
- Automate Login: Easily log in to your Instagram account.
- Customizable Options: Tailor the scraper to meet your needs.
- Data Extraction: Gather useful data from Instagram posts.
- Browser Automation: Uses Selenium for seamless interaction with the web.
- Easy to Use: Simple setup and user-friendly interface.
To get started, you need to install the necessary dependencies. Follow these steps:
-
Clone the Repository:
git clone https://github.com/youmeat6678/Instagram-Hashtag-Scraper.git cd Instagram-Hashtag-Scraper
-
Install Requirements: Ensure you have Python installed. Then, run:
pip install -r requirements.txt
-
Download ChromeDriver: Download the appropriate version of ChromeDriver for your operating system from ChromeDriver downloads. Ensure it matches your Chrome version.
-
Set Up ChromeDriver: Place the downloaded
chromedriver
executable in a directory that is included in your system's PATH.
After installation, you can start using the scraper. Here’s how:
-
Run the Scraper: Open a terminal and execute the following command:
python scraper.py --hashtag <your_hashtag>
-
Check for Output: The scraper will create a file with the scraped data in JSON format. You can find it in the same directory.
-
Custom Options: You can customize your scraping process by adding options. For example:
python scraper.py --hashtag <your_hashtag> --num_posts 100 --login <your_username> --password <your_password>
You can configure the scraper by modifying the config.py
file. Here are some options you can set:
- LOGIN: Your Instagram username.
- PASSWORD: Your Instagram password.
- NUM_POSTS: Number of posts to scrape.
- HEADLESS: Set to
True
to run Chrome in headless mode.
We welcome contributions! If you want to contribute to this project, follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/YourFeature
- Make your changes and commit them:
git commit -m "Add some feature"
- Push to the branch:
git push origin feature/YourFeature
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues or have questions, please check the Releases section for updates and fixes.
For more information on using the scraper, visit the Releases section.
- Automation
- Chrome Driver
- Hashtag Scraper
- Instagram Automation
- Instagram Bot
- Instagram Downloader
- Instagram Photos
- Instagram Scraper
- Selenium
- Social Data
- Social Media Scraper
- Web Scraping
The Instagram Hashtag Scraper is a powerful tool for anyone looking to gather data from Instagram based on hashtags. With its easy setup and customizable options, you can scrape posts efficiently. Whether you are a researcher, marketer, or just curious, this tool can help you access social media data quickly.
Happy scraping!