GithubHelp home page GithubHelp logo

Comments (5)

nondanee avatar nondanee commented on August 30, 2024

It is possible but need extra work

The API response a formatted time like "2 mins ago", "yesterday", "6-10", "2018-12-26"
instead of an accurate post time

So a parser is needed, and only date can be extracted without post time
I will add it as soon as possible

from weibopicdownloader.

nondanee avatar nondanee commented on August 30, 2024

I added the date information with key 'date' to the format item just now
Please replace the default logic with a new naming rule whatever you want to have

def format_name(item):
url = item['url']
name = re.sub(r'^\S+/', '', url)
name = re.sub(r'\?\S+$', '', name)
return name

For your example format (Ex. 20190606_6b084396gw1f8ta9obw9gj20rsbnve84.jpg), the following should work

-- return name
++ return item['date'].strftime('%Y%m%d') + '_' + name

from weibopicdownloader.

afterdelight avatar afterdelight commented on August 30, 2024

Should be better to add as an command option on the script instead of manually modifiy the script, I'm sure a lot of people wanna use this feature :)

from weibopicdownloader.

nondanee avatar nondanee commented on August 30, 2024

Use -n option with argument '{date:%Y%m%d}_{name}'

from weibopicdownloader.

afterdelight avatar afterdelight commented on August 30, 2024

You should put the info in front of the page. People will just put ' -n date '.

from weibopicdownloader.

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.