!752 p { S username = "stefanreich"; Map data = loadMediumJSON(username); printStructureLines(data); pcall { Map user = (Map) data.get("user"); print("Name: " + user.get("name")); print("Bio: " + user.get("bio")); print("Image ID: " + user.get("imageid")); // Could do more here, like Twitter name } pcall { Map references = (Map) data.get("references"); psl("References: ", references); Map posts = (Map) references.get("Post"); psl("Posts: ", posts); for (S postID : keys(posts)) { print("Post " + postID); Map post = posts.get(postID); psl("Post: ", post); S uniqueSlug = getString(post, "uniqueSlug"); S link = "https://medium.com/@" + username + "/" + uniqueSlug; S title = getString(post, "title"); print("Title: " + title); print("Probable link: " + link); //psl(post); print(); } } } sbool loadMediumJSON_verbose; static Map loadMediumJSON(S username) { S html = loadPageWithUserAgent("https://medium.com/@" + username, "Mac Safari"); if (loadMediumJSON_verbose) print(html); S prefix = [[window["obvInit"](]]; int i = indexOf(html, prefix); if (i < 0) null; int j = indexOf(html, "\n", i); if (j < 0) null; S json = dropSuffix(")", trim(substring(html, i+l(prefix), j))); ret jsonDecodeMap(json); }