Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Created May 11, 2019 16:57
Show Gist options
  • Save vladbatushkov/4c6061432ab78332f35e297f00018367 to your computer and use it in GitHub Desktop.
Save vladbatushkov/4c6061432ab78332f35e297f00018367 to your computer and use it in GitHub Desktop.
Parse followers of band by genre.
MATCH (b:Band)-[:OF]->(g:Genre { name: "Rock" })
CALL apoc.load.html("https://last.fm/music/" + replace(b.name, " ", "+") + "/+listeners", { data: "h4.user-list-name a" }) YIELD value
UNWIND value.data as n
MERGE (p:Person { name: n.text })
MERGE (p)-[:LIKES]->(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment