Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"created_at" should be an instanse of Date class #1138

Closed
TestPolygon opened this issue Nov 29, 2020 · 5 comments
Closed

"created_at" should be an instanse of Date class #1138

TestPolygon opened this issue Nov 29, 2020 · 5 comments

Comments

@TestPolygon
Copy link

Currently I can format a date only if the date is the "date" field. For example: {date:%Y.%m.%d}.

However, for some extractors the "date" field is missing. (That is strange that this field is missing even if the requested images are fetches with the correct "last-modified" header). For my expectation this field ("date") should be present for all extractors (if it is possible).

But there is "created_at" field. But this field is just a string and I can't format it.

@mikf
Copy link
Owner

mikf commented Nov 29, 2020

The formattable date fields are done on a per-extractor basis, usually by using other metadata fields such as created_at and parsing/converting them to a datetime object. Each site usually has its own date/time format and it is therefore not possible automate this.

Let me know for which site(s) you'd like to have a date field and I'll add it.

That is strange that this field is missing even if the requested images are fetches with the correct "last-modified" header

#858

@TestPolygon
Copy link
Author

For example, rule34, sankaku.

@mikf
Copy link
Owner

mikf commented Dec 11, 2020

rule34, sankaku, and all other *booru sites now have a formattable date field:
a3a863f, ecdea79, cc15fbe

(and getting posts from sankaku should be significantly faster)

@mikf mikf closed this as completed Dec 11, 2020
@TestPolygon
Copy link
Author

TestPolygon commented Jan 8, 2021

gfycat, redgifs also have the missed date. But there is createDate number field.

gifdeliverynetwork too.

BTW, downloading of gfycat's URLs may not work if they redirect to gifdeliverynetwork.
in this case I get [redgifs][error] HttpError: '404 Not Found' for 'https://napi.redgifs.com//v1/gfycats/...

UnpleasantMessyGuillemot AbsoluteSoreIberianmole BitterFrigidHammerheadbird

mikf added a commit that referenced this issue Jan 9, 2021
Redgifs expects all IDs and names to be lowercase
and throws a 404 if an ID contains an uppercase letter.

Gfycat on the other hand doesn't care about case,
so it's fine to just convert all IDs.

(#1138)
@mikf
Copy link
Owner

mikf commented Jan 9, 2021

56ccb99 adds a date field for gfycat and redgifs,
f2b83b8 fixes the 404 Not Found errors on redgifs/gifdeliverynetwork,
and aac00a2 adds a way to format any timestamp value like date fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants