Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IG Scraper Update #942

Open
iAmAndrewCarroll opened this issue Aug 10, 2023 · 1 comment
Open

IG Scraper Update #942

iAmAndrewCarroll opened this issue Aug 10, 2023 · 1 comment
Labels
beginner-friendly For beginners good first issue Good for newcomers hacktoberfest Supporting Hacktoberfest up-for-grabs

Comments

@iAmAndrewCarroll
Copy link

Instagram Scraper with Scrapfly Integration

This project demonstrates how to ethically scrape and download images and videos from an Instagram profile using Selenium and the Scrapfly library. The scraping process is optimized using headless Chrome and Scrapfly's API for ethical and efficient data extraction.

Getting Started

  1. Clone the repository to your local machine:

    git clone https://github.com/your-username/instagram-scraper.git
    cd instagram-scraper

  2. Install the required dependencies:
    pip install -r requirements.txt

Set up Scrapfly API Key

Before running the scripts, set your Scrapfly API key as an environment variable. You can obtain your API key by signing up at Scrapfly.

export SCRAPFLY_KEY="your_api_key_here"

Usage

'scrapscrape.py'

This script uses Selenium and Scrapfly to scrape an Instagram profile for images and videos and saves them to the 'downloads' folder.

python scrapescrape.py

'igscraper.py'

This script uses Selenium to scrape an Instagram profile for image and video links.

python igscraper.py

'iglist.py'

This script uses Selenium to generate and display a list of download URLs for images and videos from an Instagram profile.

python iglist.py

Running Tests

'list_tests.py'

This script contains a test that generates and displays a list of download URLs for images and videos.

pytest list_tests.py

'tests.py'

This script contains a test that scrapes and downloads limited posts from an Instagram profile.

pytest tests.py

Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please open an issue or create a pull request.

License

This project is licensed under the MIT License

I didn't invent any of this. Use it at your own risk. Logan Reese is the homie on keys.

@iAmAndrewCarroll iAmAndrewCarroll added beginner-friendly For beginners good first issue Good for newcomers hacktoberfest Supporting Hacktoberfest up-for-grabs labels Aug 10, 2023
@TitasDas
Copy link

TitasDas commented Sep 5, 2023

Can this scrape from a private profile that an user doesn't follow? If not, I really don't see what your additions are here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner-friendly For beginners good first issue Good for newcomers hacktoberfest Supporting Hacktoberfest up-for-grabs
Projects
None yet
Development

No branches or pull requests

2 participants