!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 { L streamItems = (L) data.get("streamItems"); for i over streamItems: { print("Stream item #" + i); Map item = (Map) streamItems.get(i); Map preview = (Map) item.get("postPreview"); psl(preview); if (preview != null) { S postID = getString(preview, "postId"); Map post = (Map) preview.get("post"); //psl(post); print("Post ID: " + postID); 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); }