Last active
July 10, 2020 18:37
-
-
Save lucafluri/528d5c168da2c87a97d44fc93a082bd6 to your computer and use it in GitHub Desktop.
test json for price tracker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "domains": { | |
| "amazon.de": { | |
| "xpath": "false", | |
| "name": [{ | |
| "path": "#productTitle", | |
| "regex": { | |
| "pattern": "", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }], | |
| "price": [{ | |
| "path": "#priceblock_ourprice", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }, | |
| { | |
| "path": "#priceblock_dealprice", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }, | |
| { | |
| "path": "#priceblock_saleprice", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| } | |
| ], | |
| "image": [{ | |
| "path": "#landingImage", | |
| "regex": { | |
| "attribute": "data-old-hires", | |
| "pattern": "", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }, | |
| { | |
| "path": "#landingImage", | |
| "regex": { | |
| "attribute": "src", | |
| "pattern": "", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| } | |
| ] | |
| }, | |
| "amazon.com": { | |
| "xpath": "false", | |
| "name": [{ | |
| "path": "#productTitle", | |
| "regex": { | |
| "pattern": "", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }], | |
| "price": [{ | |
| "path": "#priceblock_ourprice", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }, | |
| { | |
| "path": "#priceblock_dealprice", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }, | |
| { | |
| "path": "#priceblock_saleprice", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| } | |
| ], | |
| "image": [{ | |
| "path": "#landingImage", | |
| "regex": { | |
| "attribute": "data-old-hires", | |
| "pattern": "", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }, | |
| { | |
| "path": "#landingImage", | |
| "regex": { | |
| "attribute": "src", | |
| "pattern": "", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| } | |
| ] | |
| }, | |
| "officeworld.ch": { | |
| "xpath": "true", | |
| "name": [{ | |
| "path": "//*[@id='pageHeader']/div[1]/div/div[2]/div[1]/h1", | |
| "regex": { | |
| "pattern": ">(.*)<", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| }], | |
| "price": [{ | |
| "path": "//*[@id='pageHeader']/div[1]/div/div[2]/div[2]/div[1]/div[1]/div/div/div[1]/div[2]", | |
| "regex": { | |
| "pattern": "(\\d+[,.]?[\\d]*)", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| } | |
| ], | |
| "image": [{ | |
| "path": "//*[@id='currentPicture']", | |
| "regex": { | |
| "attribute": "src", | |
| "pattern": "src=\"(\\S*)\"", | |
| "remove": "", | |
| "group": 1 | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment