newhouse / url-tracking-stripper

An open-source Chrome Extension that will remove the tracking parameters from URLs to keep them short and cleaner for sharing, bookmarking, etc. It will also skip any known redirects and take you straight to the target URL instead of passing you through an intermediate URL.
MIT License
190 stars 26 forks source link

Remove affiliate/tracking links using patterns? #16

Closed arana-krypteia closed 6 years ago

arana-krypteia commented 6 years ago

The website RedFlagDeals is pretty horrible in replacing URLs with affiliate/tracking redirects. The practice is pretty pernicious since all the actually useful content is user generated and any URLs posted in the forum are auto converted to affiliate/tracking redirects without providing any real notice.

Anyway, is it possible to introduce simple pattern detection to remove affiliate/tracking redirects? The Firefox add-on Clean-Links used to do this really well, but it has unfortunately been discontinued (and didn't work with chrome).

EXAMPLES

http://redirectingat.com/?id=2927x594702&xs=1&url=https%3A%2F%2Fwww.bestbuy.ca%2Fen-ca%2Fproduct%2Finsignia-insignia-47-80-fixed-tv-wall-mount-ns-htvmf1703-c%2F10422985.aspx

http://www.amazon.ca/gp/redirect.html?ie=UTF8&location=https%3A%2F%2Fwww.amazon.ca%2FSony-XBR49X900E-49-Inch-Ultra-Model%2Fdp%2FB01N284JCN%3Fth%3D1&tag=redflagdealsc-20&linkCode=ur2&camp=15121&creative=330641

http://www.dpbolvw.net/click-749547-10657534?url=https%3A%2F%2Fwww.newegg.ca%2FProduct%2FProduct.aspx%3FItem%3D0V4-0007-002B3%26ignorebbr%3D1&sid=rfdcb

http://www.tkqlhce.com/click-749547-11365101?url=https%3A%2F%2Fwww.homedepot.ca%2Fen%2Fhome%2Fp.multitool-16in1.1000803816.html&sid=rfdcb

http://click.linksynergy.com/deeplink?id=CAqD7bLWUPI&mid=40842&murl=https%3A%2F%2Fwww.gearbest.com%2Fcell-phones%2Fpp_1017631.html%3Fwid%3D4&u1=rfdcb

newhouse commented 6 years ago

hi @arana-krypteia sorry for the delay but I'll take a closer look soon when I get some time. Still an issue for you, yes?

newhouse commented 6 years ago

actually, @arana-krypteia can you please provide an example of a page URL on RedFlagDeals as an example that contains links like the above? I don't want to stumble around that site all day! thanks!

arana-krypteia commented 6 years ago

Amazon Affiliate Redirect: https://forums.redflagdeals.com/amazon-ca-amazon-echo-dot-2nd-gen-pre-order-49-99-2142958/

RedirectingAt https://forums.redflagdeals.com/best-buy-bestbuy-activeon-lx-dx-cx-actioncams-sale-2140529/#p28432030

LinkShare https://forums.redflagdeals.com/a-xiaomi-usb-type-c-45w-charger-pd-2-0-compliant-2120924/#p28136413

Commission Junction https://forums.redflagdeals.com/home-depot-ryobi-40v-hedge-trimmer-tool-only-57-20-shipped-2143035/#p28472905

basically, most of these redirects have pretty obvious structure and distinct tracking parameters that it should be easy to strip en masse using patterns

newhouse commented 6 years ago

ah, ok, I see it. Let me think about this one as to whether or not to implement as it's pretty specific to this site...but maybe not, and I should just add some "known redirect skipping" that would include affiliates. Need to think about it, but good suggestion

newhouse commented 6 years ago

ok @arana-krypteia this has been added in version 4.0.0 which I just pushed out to Google, so if you update your extension (or it will happen automatically) you should get this change! Closing this issue for now, but let me know if you have any comments!