Nov-04-2019, 08:53 AM
Thank you @Snippsat!
I was able to install the pip instaloader package in my Jupyter Notebook by entering following code:
When I tried to run examples of code they provided themselves to extract Instagram posts, like
The short text/number to the left of the cell in the notebook simply remained "In [*]" instead of changing to, for example, "In [2]" and nothing happened. Do you know what might be the problem here?
I also tried to run one of their advanced instaloader examples (https://instaloader.github.io/codesnippets.html) in the same Jupyter notebook as a test:
Thank you in advance!
I was able to install the pip instaloader package in my Jupyter Notebook by entering following code:
import sys !{sys.executable} -m pip install instaloaderWhen I ran the cell I got a confirmation that instaloader had been installed, but I can't get the Instaloader Module to work in Jupyter Notebooks (via Anaconda Navigator).
When I tried to run examples of code they provided themselves to extract Instagram posts, like
L = Instaloader() for post in L.get_hashtag_posts(urbanphotography): L.download_post(post, target='#'+urbanphotography)(https://instaloader.github.io/as-module....main-class, under "Instagram Structures" - "Posts")
The short text/number to the left of the cell in the notebook simply remained "In [*]" instead of changing to, for example, "In [2]" and nothing happened. Do you know what might be the problem here?
I also tried to run one of their advanced instaloader examples (https://instaloader.github.io/codesnippets.html) in the same Jupyter notebook as a test:
from datetime import datetime from itertools import dropwhile, takewhile import instaloader L = instaloader.Instaloader() posts = L.get_hashtag_posts('urbanphotography') SINCE = datetime(2007, 5, 1) UNTIL = datetime(2007, 3, 1) for post in takewhile(lambda p: p.date > UNTIL, dropwhile(lambda p: p.date > SINCE, posts)): print(post.date) L.download_post(post, '#urbanphotography')But when I ran this code in the cell, I received the following error message:
Error:C:\Users\XXX\Anaconda\lib\site-packages\win_unicode_console\__init__.py:31: RuntimeWarning: sys.stdin.encoding == '1252', whereas sys.stdout.encoding == 'UTF-8', readline hook consumer may assume they are the same
readline_hook.enable(use_pyreadline=use_pyreadline)
Could someone please help me to get it running, so I can extract the json and metadata-txt files I need? I already asked the same question in Instaloader's issue-section several days ago, but so far nobody has replied and I really need to get this working as soon as possible.Thank you in advance!