DrKain / tidy-url

A node package & userscript that removes tracking or garbage parameters from URLs making them shorter, cleaner and a lot nicer to read.
MIT License
58 stars 18 forks source link

Broken: amazon tracking links #88

Closed LeGrosSancho closed 1 year ago

LeGrosSancho commented 1 year ago

URL before cleaning:

Current result when cleaning:

Expected outcome:

Extra Information:

Additional context By the way I also noticed that the result we get from TidyURL.clean() has an empty "removed" array, is it expected? Here is a screenshot of the info object:

Screenshot 2023-07-28 at 13 46 17
DrKain commented 1 year ago

Thanks for reporting, I'll look into this shortly. The removed array would contain a list of parameters that have been removed, but in this case the issue is with the amp rule

LeGrosSancho commented 1 year ago

Oh okay I see thanks a lot! So if I need to check whether the link has changed or not, do you suggest to check difference or reduction (or something else)?

DrKain commented 1 year ago

If I remember right: difference is the number of characters removed and reduction is a percentage, they were originally meant for debugging.
The best way to check if the link has changed: data.url !== data.info.original

LeGrosSancho commented 1 year ago

Okay I see, I will do it that way then, thanks a lot once again 🙏

DrKain commented 1 year ago

The updated rule should now return the correct URL, please let me know if you have any more issues with it

EpokK commented 1 year ago

Thanks @DrKain for fixing this so quickly.

LeGrosSancho commented 1 year ago

Hey, I'm sorry, I messed up in the original report, I inverted current and expected... We're expecting this instead:

URL before cleaning:

Current result when cleaning:

Expected outcome:

Could you have a look when you have some time please ? 😬

DrKain commented 1 year ago

I might be missing something here, but didn't the old rule return the expected outcome?

Input: https://m7267kld.r.us-west-2.awstrack.me/L0/https:%2F%2Fauth.pathapplication.com%2Fprovider%2Fchange-password/1/SOME_RANDOM_ID_1/SOME_RANDOM_ID_2
Clean: https://auth.pathapplication.com/provider/change-password/1/SOME_RANDOM_ID_1/SOME_RANDOM_ID_2
New Host: true
35.86% smaller (52 characters)
LeGrosSancho commented 1 year ago

Thanks for the revert. 🙏 Indeed looks like the link was cleaned correctly on your side, I think it's a misunderstanding with the report we received which wasn't clear... I will ask for some more details

Sorry for the inconvenience, but thanks a lot for your reactiveness.

DrKain commented 1 year ago

Hi @LeGrosSancho, any update on this? Is it safe to close?

DrKain commented 1 year ago

I'm going to give this 3 more days before closing. As far as I can see there is no issue with this package, so I'll wait a few more days before closing. If you or someone else wants to chime in here I'm more than happy to look into it, but with the lack of information there's really not much I can do here.

LeGrosSancho commented 1 year ago

Hey sorry I completely missed the notifications 😬 Indeed, we did not received any updates on this report on our side, so I think we can close it completely. Thanks, and again sorry for the inconvenience 😕