Willy-JL / F95Checker

GNU General Public License v3.0
123 stars 20 forks source link

Download button behavior #186

Closed gimpyestrada closed 4 days ago

gimpyestrada commented 5 days ago

I've noticed that the download buttons on the Downloads tab might need some attention.

I know the gofile button just opens the f95 thread, not sure if that's on purpose.

I recall you adding a middle click that gets the actual URL for Mega. It looks like it opens a little browser window and then closes and the URL is on the clipboard. Could you leave the little browser window open so we can just click the download button on the Mega site?

gimpyestrada commented 5 days ago

Sorry, this is using version 11.0 beta 1241

Willy-JL commented 5 days ago

hi, unfortunately this is a side effect of moving to a cached api. the forum prevents abuse by bots scanning and taking down links by requiring an account to see links. the cache api i made is not authenticated, so it would make it even easier for links to be taken down. i talked with Sam about this concern, and he agreed that it is best to not include public download links this way. only masked links are exposed to the cache api, since these are opaque and still require an f95zone account (and a captcha too) to convert to the real download link.

see here for the code running on the cache api doing this: https://github.com/Willy-JL/F95Checker/blob/e15ba7e80117c31b12774f4e5b97496e8930fc4b/indexer/scraper.py#L61-L66

however, i understand that it is not ideal for users to have non-masked download links only link to the thread page. ill try to think of an alternative solution that still requires an account on clientside, but doesnt expose the links to the open internet.

Willy-JL commented 4 days ago

ive come up with a rough idea of how to improve this for users without exposing naked links to the open internet, will work on it tomorrow

Willy-JL commented 4 days ago

@gimpyestrada this is now fixed in build 1270.

the cache api replies with info on how to find the link inside the thread, but doesnt expose the link to the open internet to prevent abuse. the tool will see this, and when these links are middle clicked it will open a small browser window, which automatically finds the link in the page based on how the cache api described it, then it will copy the url.

as a user, the only difference from past behavior is that instead of immediately copying the link, you get a small popup browser for half a second, similar to how masked links always worked.

if you try this new beta, beware that this new method is not yet in all cached threads, invalidating the whole cache would cause performance issues so this will roll out gradually over the next week as games are updated / cache expires.

EDIT: beta build 1273 actually, i fixed an edge case issue where in some cases it would not locate the link correctly