Git Product home page Git Product logo

Comments (9)

aandergr avatar aandergr commented on May 31, 2024 1

We committed this feature just two hours ago, which explains why it did not work with yesterday's Instaloader version 😉

You can pass multiple arguments (#hashtags/profiles/...) to Instaloader. Then, it downloads them sequentially. However, infinitely many pictures exist for each hashtag, so it will normally not terminate. However, if you already downloaded some, you can pass --fast-update option, which causes it to stop when it encounters a picture already existing on your hard drive. Alternatively, there is the --count option.

So, you could try:
instaloader --filename-pattern={profile}_{date:%Y-%m-%d_%H-%M-%S} --fast-update \#starwars \#lightsaber \#darthvader \#yourfather \#yedi

from instaloader.

Thammus avatar Thammus commented on May 31, 2024 1

The %% in our source code are only required for properly displaying in the help message when you type instaloader --help where it is printed as a single percent sign. Even on Windows the double percent signs are not required at command prompt (and will not work there). The originally presented syntax in the README works as well in bash as in Windows command prompt. Nevertheless from within a batch script escaping is required.

To overcome this issue, commit c299e9d adds the ability to use {date} inside a filename pattern without further specifying a conversion format.

from instaloader.

aandergr avatar aandergr commented on May 31, 2024

Hi Matthieu,

thanks for using Instaloader!

Our commit 8572e52 in v2-dev branch adds the options --dirname-pattern and --filename-pattern allowing to specify more exactly where to download posts.

For your proposed paths, C:\python\Scripts\ #starwars\ username_date.jpg, you could now call
instaloader --filename-pattern={profile}_{date:%Y-%m-%d_%H-%M-%S} \#starwars

You can install from our development branch via pip with
pip3 install --upgrade git+https://github.com/Thammus/instaloader@v2-dev

Best regards and happy instaloading!
Alex

from instaloader.

mmathab avatar mmathab commented on May 31, 2024

I upgraded to v2 but I did not understand there was a v2-dev with this commit which lead to this issue ticket. I thought the feature was included in the last update.

Sorry, first time python/github user!

Works!

from instaloader.

mmathab avatar mmathab commented on May 31, 2024

Love the fast update function. It did not work so well until the username in filename was implemented. It tended to stop when two images were posted at the same time from two different users, but unfortunatly it was not even the same image. It works better while combining it with the username in filename option in the v2 upgrade.

I will always make sure to keep the latest downloaded file in there to cancel the process for the next round of updates. I usually delete everything left in the folders after saving the important stuff aside.

You may close the ticket.

Thanks again

from instaloader.

mmathab avatar mmathab commented on May 31, 2024

Hi again,

Could you please confirm that we can use --filename-pattern without actually typing the format of the date

My last test was not successful when using --filename-pattern with its attributes

instaloader --filename-pattern={profile}{date:%Y-%m-%d%H-%M-%S} --fast-update #starwars

it created the folder but then the filenames were _Y-m-d_H-M-S, with the actual letters instead of real date and time values.

Thanks

from instaloader.

mmathab avatar mmathab commented on May 31, 2024

Ok, I looked the source code and by chance I was able to find that you are using double %
so the date attributes following --filename-pattern= should be {date:%%Y-%%m-%%d_%%H-%%M-%%S}

instead of {date:%Y-%m-%d_%H-%M-%S} as stated in your previous comment.

It works now yeah! Just make sure that you update the howto/readme appropriately when you get there.

from instaloader.

aandergr avatar aandergr commented on May 31, 2024

Oh, thanks for pointing this out! Actually, it is a Windows problem, where in the command line %VAR is substituted by an environment variable, and %% becomes a single percent sign. With bash there is no need to escape the percent sign.

I'm glad that we could help you! 😊

from instaloader.

mmathab avatar mmathab commented on May 31, 2024

Much more user friendly and easier to type 👍

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.