Comments (16)
I guess I could give this a shot...
from instascrape.
@beckettnormington Your example actually gave me an idea for a to_csv method so now you can write straight to .csv without the overhead of creating a pandas.DataFrame
prior. If you want though feel free to continue with your implementation of the DataFrame, I like the emphasis of integrating pandas
when working with instascrape because of obv data science connotations
from instascrape.
First CSV example converted to IPython. Now gonna work on a fun Matplotlib example comparing the Big Tech companies' posts and likes to see which one has the best reception overall.
from instascrape.
Selenium didn't detect ChromeDriver, so that dampened my plans. 😞
from instascrape.
Alright, will try! I converted my Instagram CSV example to IPython. PR: #20
from instascrape.
I can provide some examples too :D
from instascrape.
Working on converting that CSV example to IPython
from instascrape.
Then getting to an actual example.
from instascrape.
@Paola351 Go for it!!! Feel free to make it as simple/complex as you want, I love to see what people come up with. If you're familiar with Jupyter Notebook and want to do a detailed writeup that would be welcomed but is not mandatory.
from instascrape.
Ok! I will code a simple Jupyter notebook able to load the library, load a profile, retrieve the post with maximum number of likes of that profiles, it is ok for you? @chris-greening
from instascrape.
Ok! I will code a simple Jupyter notebook able to load the library, load a profile, retrieve the post with maximum number of likes of that profiles, it is ok for you? @chris-greening
@Paola351 That would be an awesome example! You'll likely have to implement some sort of dynamic functionality if there are more than like 10 posts on a profile to get all the posts because of AJAX. If you check out profile_scrape.py there's a subclass of Profile that uses selenium that does exactly that. Feel free to reuse that code or come up with your own implementation!!
from instascrape.
Alrighty, I'll make 2 versions! I'm currently adding detailed explanations to each snippet / line.
from instascrape.
Selenium didn't detect ChromeDriver, so that dampened my plans. 😞
@beckettnormington You'll have to download a chromedriver compatible with your version of chrome/OS. See this link for details
from instascrape.
I used the latest stable release for Windows 10 and added it to PATH, but it still wasn't detected.
from instascrape.
I used the latest stable release for Windows 10 and added it to PATH, but it still wasn't detected.
@beckettnormington I've had the same problem in the past, try passing the path to your driver with selenium.webdriver.Chrome(executable_path=r'C:\path\to\your\chromedriver.exe')
from instascrape.
Ok! I will code a simple Jupyter notebook able to load the library, load a profile, retrieve the post with maximum number of likes of that profiles, it is ok for you? @chris-greening
@Paola351 That would be an awesome example! You'll likely have to implement some sort of dynamic functionality if there are more than like 10 posts on a profile to get all the posts because of AJAX. If you check out profile_scrape.py there's a subclass of Profile that uses selenium that does exactly that. Feel free to reuse that code or come up with your own implementation!!
I've checked that but it seems not working. Once i open the apple page on instagram, neither images are loaded or posts' info retrieved. I think It's a little bit trickier than i though :S
P.S..
nevermind, i figured it out
from instascrape.
Related Issues (20)
- instascrape.exceptions.exceptions.InstagramLoginRedirectError: Instagram is redirecting you to the login page instead of the page you are trying to scrape. This could be occuring because you made too many requests too quickly or are not logged into Instagram on your machine. Try passing a valid session ID to the scrape method as a cookie to bypass the login requirement HOT 2
- Even after passing a valid cookie, the Instagram account gets disabled (update: permanently) HOT 2
- no of profiles during a day HOT 1
- Cannot retreive video_url from post object HOT 1
- Unable to locate file with data dump from posts
- TypeError: 'NoneType' object is not subscriptable on location scrape
- Biography field brings own bio
- Error : 'Post' object has no attribute 'video_url' HOT 1
- requests lib throwing `Invalid value NaN (not a number)` Error HOT 1
- ValueError while Scrapping Posts HOT 9
- KeyError: 'ProfilePage'
- Getting an Error while I call method "scrape" HOT 2
- ValueError: Invalid value NaN (not a number)
- JSONDecodeError within scrape() method HOT 6
- I want to grab the recent reels video views from the profile page (username/reels/)? Is that possible?
- TypeError:Profile.__init__() missing 1 required positional argument: data
- json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1) HOT 3
- Error scraping photos: ModuleNotFoundError: No module named 'helpers' HOT 2
- its gives an error when i try to download the reel HOT 1
- MissingCookiesWarning: Request header does not contain cookies! It's recommended you pass at least a valid sessionid otherwise Instagram will likely redirect you to their login page.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instascrape.