Skip to content

help creating pattern to remove linkid from amazon #400

Answered by PabloOQ
pokegamer5547 asked this question in Q&A
Discussion options

You must be logged in to vote

I think the URL Cleaner module is better suited for this task, or at least makes more sense to me.

Just edit the file like the following. Coincidentally, amazon is the first that shows in the built in catalog, which is where I get the urlPattern and exceptions fields

{
  "customRules": {
    YOUR RULES HERE
  },
  "providers": {
    "amazon": {
... rest of the file ...

And in YOUR RULES HERE paste the following:

    "amazon": {
      "urlPattern": "^https?:\\/\\/(?:[a-z0-9-]+\\.)*?amazon(?:\\.[a-z]{2,}){1,}",
      "rules": [
        "linkId"
        ],
        "exceptions": [
          "^https?:\\/\\/(?:[a-z0-9-]+\\.)*?amazon(?:\\.[a-z]{2,}){1,}\\/gp\\/.*?(?:redirector.html|cart\\/ajax-u…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@pokegamer5547
Comment options

@PabloOQ
Comment options

PabloOQ Nov 23, 2024
Collaborator

@pokegamer5547
Comment options

@TrianguloY
Comment options

Answer selected by pokegamer5547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants