Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add domain based rules #18

Closed
adeekshith opened this issue Jun 8, 2021 · 10 comments · Fixed by #19 or #23
Closed

Add domain based rules #18

adeekshith opened this issue Jun 8, 2021 · 10 comments · Fixed by #19 or #23
Assignees
Labels
feature New feature or request
Milestone

Comments

@adeekshith
Copy link

adeekshith commented Jun 8, 2021

First of all, thanks for this project! Found this from F-droid circles and loved the idea❣️

What do you think about adding domain specific rules to clean URLs like these:

https://www.amazon.com/BEAST-40oz-Black-Tumbler-Stainless/dp/B08GTPXJBL/?_encoding=UTF8&smid=AHFMMW9O1FG2X&pf_rd_p=d11c243d-9bba-498d-bb87-2e184199c856&pd_rd_wg=zP7f5&pf_rd_r=43Z35PH2XY62GBS2WZ7J&pd_rd_w=2b5Rj&pd_rd_r=7cd0fb38-2890-4adc-b51e-b12056bd09ec

https://www.amazon.com/BEAST-40oz-Black-Tumbler-Stainless/dp/B08GTPXJBL/

May be the rule can be:
www.amazon.com/(.*)/dp/([0-9A-Z]+)/* -> www.amazon.com/$1/dp/$2/

Great app and clean code! Thank you!!

@adeekshith adeekshith changed the title Domain based rules Add domain based rules Jun 8, 2021
@adeekshith
Copy link
Author

Oh sorry, just noticed you have enabled Discussions. I should have posted it there.

@svenjacobs
Copy link
Owner

Hi Deekshith,

thanks for your feedback ❤️

After cleaning an URL, the app presents the number of removed parameters to the user. This is currently based on the number of found regex groups. So the regex would have to be slightly modified to catch each parameter individually. I will certainly work on this.

Thank you.

@svenjacobs svenjacobs self-assigned this Jun 9, 2021
@svenjacobs svenjacobs added the feature New feature or request label Jun 9, 2021
@svenjacobs svenjacobs added this to the 0.5 milestone Jun 9, 2021
@svenjacobs svenjacobs linked a pull request Jun 13, 2021 that will close this issue
@svenjacobs
Copy link
Owner

This has been added to version 0.5.0. The update should be available on Google Play soon and on F-Droid in a few days.

@adeekshith
Copy link
Author

Woohoo! Awesome @svenjacobs 😃🎉

@svenjacobs
Copy link
Owner

Unfortunately I forgot to add a database migration to 0.5.0. Should the app crash immediately after startup, please just delete app data and everything should be fine. Sorry for the inconvenience.

@TPS

This comment was marked as off-topic.

@svenjacobs

This comment was marked as off-topic.

@TPS
Copy link

TPS commented Jul 15, 2022

May be the rule can be:
www.amazon.com/(.*)/dp/([0-9A-Z]+)/* -> www.amazon.com/$1/dp/$2/

Technically, the string that $1 matches isn't required, either. Amazon's happy w/ solely the /dp/$2 portion.

@TPS

This comment was marked as off-topic.

@svenjacobs

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants