Patreon downloader doesn't work with URL encoded tags
salrana opened this issue · 2 comments
e.g. for the query 388683 18%2B
with the patreon api campaign with tag GUG it attempts to hit this url: https://www.patreon.com/api/posts?fields[post]=id,url,published_at&filter[campaign_id]=388683&filter[is_by_creator]=true&filter[is_draft]=false&filter[tag]=18+&include=posts&sort=-published_at with the tag decoded resulting in an empty result, whereas it ought to be hitting https://www.patreon.com/api/posts?fields[post]=id,url,published_at&filter[campaign_id]=388683&filter[is_by_creator]=true&filter[is_draft]=false&filter[tag]=18%2B&include=posts&sort=-published_at which does have a result
Looks like for other percent encoded strings it works, though Hydrus really shouldn't be converting them. Something like 2576385 patron%20rewards
produces filter[tag]=patron rewards
which does work because when it actually requests it I think it gets converted back to percent encoding (or maybe it is sent with spaces and the webserver is ok with that). The issue with your example is that +
is a reserved character so I think what's happening is Hydrus is converting it from percent encoded to regular in the GUG and then on request when it converts back to percent encoding it skips the +
because it doesn't know its supposed to be percent encoded (or it confuses the web server because +
is reserved).
A workaround for now is to trick Hydrus into not converting it by using the percent encoding for the %
char itself (%25
) to escape the first level of decoding. If you use 388683 18%252B
it should work.
Closing this because it's not an issue with the parser/GUG itself but with Hydrus and an issue has been created upstream for the problem: hydrusnetwork/hydrus#868
Please use the workaround in the above comment for the moment.