Created
May 7, 2019 16:32
-
-
Save vladbatushkov/feef7535f2dfee21efdb1e6fc31e7b67 to your computer and use it in GitHub Desktop.
Grab perfume products of brands starts from 4, I, O.
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
WITH ["4", "I", "O"] as list | |
MATCH (b:Brand) | |
WHERE apoc.coll.contains(list, left(b.name, 1)) = true | |
WITH "https://www.fragranceoutlet.com" + b.url as url, b | |
CALL apoc.load.html(url, { products: "a.product-grid-item p.product-title" }) YIELD value | |
UNWIND value.products as product | |
MERGE (p:Product { name: product.text }) | |
MERGE (p)-[:PRODUCED_BY]->(b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment