chris-greening / instascrape

Powerful and flexible Instagram scraping library for Python, providing easy-to-use and expressive tools for accessing data programmatically
https://chris-greening.github.io/instascrape/
MIT License
633 stars 109 forks source link

Unable to locate file with data dump from posts #147

Open jtopper9 opened 2 years ago

jtopper9 commented 2 years ago

First off - thanks a bunch for making this script available. Very helpful.

The scraper looks to be working fine however I'm unable to figure out where the csv file containing the scraped data is located on my machine. Due to environmental issues i'm running the script through my IDE. Any thoughts?

from selenium import Chrome

from selenium import webdriver from instascrape import Profile, scrape_posts import csv

Creating our webdriver

options = webdriver.ChromeOptions() options.add_argument("")

Path to your chrome profile

w = webdriver.Chrome("/usr/local/bin/chromedriver", options=options)

Scraping JT's profile

SESSIONID = '' headers = {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 " "KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36", "cookie": "sessionid=;"} jt = Profile("et_used_boards") jt.scrape(headers=headers)

Scraping the posts

posts = jt.get_posts(webdriver=w, login_first=True) scraped, unscraped = scrape_posts(posts, silent=False, headers=headers, pause=10)