[wallhaven.cc] add imageByFragment that picks up default saved filename#2538
Conversation
|
Will also put in draft/ potentially close as they have IQDB search for actual ByFragment. Will close if/when IQDB search implemented |
The oldest thing they have still uses an ID in the scheme of I made it very restrictive explicitly to avoid false positives, it really should only match file names that have 6 characters / digits at the end, before the extension, with some kind of separator before.
Huh, I've never actually noticed that feature. I've looked into it a bit, and it's not mentioned in the API docs. Playing around with it a bit, it's just a POST to their search endpoint , maybe it just works for API search too. Otherwise this will be a whole new thing, I already see XSRF tokens and Cloudflare cookies, plus the login requirement for NSFW would probably need credentials or a session cookie in the scraper. I'll look into it more later, but this really might be a feature of it's own. |
|
would have to be in python but imo would be leagues above trying to match filename |
|
Just an update after looking into it a bit:
|
|
Current broken state sequestered into its own subbranch wallhaven-imageByFragtment-iqdb, can't get it to work right now. |
405 is method not allowed, maybe PUT instead of POST? but hm cdp is supported on python but it's a lot weirder |
cc05b01 to
ad9c669
Compare
|
Thanks for your hard work, I don't think it's quite worth struggling through cloudflare just for IQDB, there is a standalone IQDB.org which is what it's probably based on. I'll merge it since it's better than nothing and we'll just have to wait for IQDB api to eventually be opened up |
Generated by an automatic template. Can be removed if not applicable.
Scraper type(s)
Examples to test
SFW because NSFW needs account and API token
https://wallhaven.cc/w/9dqojx
https://wallhaven.cc/w/yxd8jk
Short description
When right-click saving a wallpaper from wallhaven, the default filename has a predictable structure ("wallhaven-."). This change adds image fragment scraping to allow automatically picking up IDs that are a clear and separable postfix to the filename.