Git Product home page Git Product logo

Comments (7)

aandergr avatar aandergr commented on May 20, 2024

Thanks for your interest and for involving Instaloader in your research project. My latest commit, 3e13601, implements the download_hashtag() function as well as downloading a hashtag with ./instaloader.py #hashtag. The --fast-update flag is also supported, to abort the download as soon as the first already-downloaded picture is encountered.

To download only a certain number of pictures, you'd have to write a small Python snippet:

from instaloader import download_hashtag, get_anonymous_session

download_hashtag('cat', session=get_anonymous_session(), max_count=30)

Thanks a lot for offering compensation. Instaloader is an open source project, developed in our free time as a hobby. It is a pleasure for us to provide this script to the community for free. However, donations may act as a huge motivation for maintaining this project 😊 We can discuss details per email.

from instaloader.

seanpatel avatar seanpatel commented on May 20, 2024

Wow! That was fast! Thank so much. I'll try it out. Yes, I can donate to the project. Let me know how. My email = sean_patel @ icloud.com

from instaloader.

seanpatel avatar seanpatel commented on May 20, 2024

Hi, I tried the new code and it's not doing anything. I am on Windows. I did the following cmd like u suggest in u r readme.md

pip3 install git+https://github.com/Thammus/instaloader

That's not updating my installation as it's saying I am already on latest 1.2.2 version.

How do I update the library locally?

I also tried a git clone on the url to get latest. But when I run it it's quietly exiting on existing hashtag without doing anything.

Sorry, not a python guy.

from instaloader.

aandergr avatar aandergr commented on May 20, 2024

To update Instaloader via pip, you'd have to do
pip3 install --upgrade git+https://github.com/Thammus/instaloader
Without the --upgrade flag it doesn't update the package as it notices that the version string didn't change yet.

Anyway there is another thing I just noticed: The # character indicates the beginning of a comment in bash, thus calling instaloader #hashtag will just silently terminate as no arguments will be passed to Instaloader. It is necessary to escape or quote the hashtag:

instaloader "#cat"

(We certainly should mention that in our README.md)

from instaloader.

seanpatel avatar seanpatel commented on May 20, 2024

Thank you! I ran the upgrade as you suggested and this was the output.

Installing collected packages: instaloader
  Found existing installation: instaloader 1.2.2
    Uninstalling instaloader-1.2.2:
      Successfully uninstalled instaloader-1.2.2
  Running setup.py install for instaloader: started
    Running setup.py install for instaloader: finished with status 'done'
Successfully installed instaloader-1.2.2

Then I tried the following #hashtag import...

instaloader "#boxingmeme"

and it download a few and then errors out as shown below.

$ instaloader "#boxingmeme"
Retrieving pictures with hashtag #boxingmeme
[  1] #boxingmeme 2017-04-19_15-29-49 [Running the mitts with the IB▒] Traceback (most recent call last):
  File "C:\Python352-32\Scripts\instaloader-script.py", line 9, in <module>
    load_entry_point('instaloader==1.2.2', 'console_scripts', 'instaloader')()
  File "c:\python352-32\lib\site-packages\instaloader.py", line 813, in main
    not args.no_sleep, args.shorter_output, args.quiet)
  File "c:\python352-32\lib\site-packages\instaloader.py", line 726, in download_profiles
    sleep=sleep, quiet=quiet)
  File "c:\python352-32\lib\site-packages\instaloader.py", line 582, in download_hashtag
    shorter_output=shorter_output, quiet=quiet)
  File "c:\python352-32\lib\site-packages\instaloader.py", line 490, in download_node
    video_data['entry_data']['PostPage'][0]['media']['video_url'],
KeyError: 'media'

Seems to work for other hashtags... not sure if the content of that #hashtag stream is messing up your script.

Please advice!

from instaloader.

aandergr avatar aandergr commented on May 20, 2024

Indeed, they seem to have changed some details of video node metadata. Thanks for reporting this!

My latest commit, 6b345e1, should fix it.

from instaloader.

seanpatel avatar seanpatel commented on May 20, 2024

That works. Wow, you are awesome!!! Thanks ~!!!

from instaloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.