Skip to content

A Python project for scraping Instagram posts based on specific hashtags. This tool uses Selenium for browser automation and BeautifulSoup for scraping content from Instagram. It's designed to fetch posts by hashtag, with customizable options to automate login, scrape content, and interact with Instagram posts.

License

Notifications You must be signed in to change notification settings

youmeat6678/Instagram-Hashtag-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Hashtag Scraper 🐍📸

GitHub repo size GitHub stars GitHub issues GitHub license

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.

Table of Contents

Features

  • 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.

Installation

To get started, you need to install the necessary dependencies. Follow these steps:

  1. Clone the Repository:

    git clone https://github.com/youmeat6678/Instagram-Hashtag-Scraper.git
    cd Instagram-Hashtag-Scraper
  2. Install Requirements: Ensure you have Python installed. Then, run:

    pip install -r requirements.txt
  3. Download ChromeDriver: Download the appropriate version of ChromeDriver for your operating system from ChromeDriver downloads. Ensure it matches your Chrome version.

  4. Set Up ChromeDriver: Place the downloaded chromedriver executable in a directory that is included in your system's PATH.

Usage

After installation, you can start using the scraper. Here’s how:

  1. Run the Scraper: Open a terminal and execute the following command:

    python scraper.py --hashtag <your_hashtag>
  2. Check for Output: The scraper will create a file with the scraped data in JSON format. You can find it in the same directory.

  3. 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>

Configuration

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.

Contributing

We welcome contributions! If you want to contribute to this project, follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/YourFeature
  3. Make your changes and commit them:
    git commit -m "Add some feature"
  4. Push to the branch:
    git push origin feature/YourFeature
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

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.

Topics

  • Automation
  • Chrome Driver
  • Hashtag Scraper
  • Instagram
  • Instagram Automation
  • Instagram Bot
  • Instagram Downloader
  • Instagram Photos
  • Instagram Scraper
  • Selenium
  • Social Data
  • Social Media Scraper
  • Web Scraping

Conclusion

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!

About

A Python project for scraping Instagram posts based on specific hashtags. This tool uses Selenium for browser automation and BeautifulSoup for scraping content from Instagram. It's designed to fetch posts by hashtag, with customizable options to automate login, scrape content, and interact with Instagram posts.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages