Created
May 11, 2019 16:57
-
-
Save vladbatushkov/4c6061432ab78332f35e297f00018367 to your computer and use it in GitHub Desktop.
Parse followers of band by genre.
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
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