Open arisboch opened 8 months ago
Posts with alphanumeric IDs are now supported (https://github.com/mikf/gallery-dl/commit/a416d4c3d5b5b315342d19514085006c47bcc323).
This might also fix the other [sankaku][error] snackbar__…
errors, not sure though.
Thanks a bunch, that did the trick.
Could you also please add a directory and file template field for the new post IDs?
I can't figure out how to do this in general. I would have thought and hoped that these new IDs can somehow be gotten by converting an existing value (numeric ID, MD5) to another format/base, but that doesn't seem to work.
New IDs are all 11 characters long and in base 62 (ASCII letters and digits) from what I can tell.
We could obviously just take the given ID for post URLs, but it would be missing for everything else like tag searches.
So I figured out how to get alphanumeric IDs (https://github.com/mikf/gallery-dl/commit/34a4ddc3996b19cacea8c8c88a432ec9104a068b, "id-format": "alnum"
), but you can only have either new-style IDs or the old numeric IDs. Both at the same time would theoretically be possible by repeating each API call, once with Api-Version: 2
header and once without.
https://forum.sankakucomplex.com/t/converting-between-legacy-numeric-new-alphanumeric-post-ids/48568
What is the algorithm or formula to convert from the old numeric post ID format to the new alphanumeric ID format?
The admin wrote:
if the algorithm was public, there wouldn’t be much point in the change, no? they use a similar hashing method to a service like youtube. the hash key is just obviously the same between Chan and Idol
@mikf
id-format=alnum
seem not working for the idol site, maybe it drop legacy id.
since the id is not int
now, i suppose we can't use op like > < ==
with id
in filter
anymore, right?
id-format
only works on chan.sankakucomplex / sankaku.app, but it never did on idol.sankakucomplex. The idol site had both id
and id_alnum
for as long as that was possible, but it removed numeric IDs completely some time ago (32262a048ba4fb0bcc5f21b93830228c81209e96).
It is possible to compare str
with > < ==
, but this is kind of pointless here since IDs are no longer in any predictable order. Comparing date
values might be an alternative.
Since a few days or weeks or so, the Sankaku image booru changed their IDs from purely numeric to alphanumeric (among others apparent changes to their API). Downloads now sometimes fail with various errors or do succeed, but with nonsensical IDs. Here are a few examples:
An attempt to download posts with containing more... extreme content throws the following error message, even though I do have a premium account and could view these kinda posts in the browser without problems:
Another post with extreme content throws the following error: