Skip to content

Instantly share code, notes, and snippets.

@shibafu528
Created November 20, 2019 14:50
Show Gist options
  • Save shibafu528/b90a75d13579af584a595e6cb1cf482e to your computer and use it in GitHub Desktop.
Save shibafu528/b90a75d13579af584a595e6cb1cf482e to your computer and use it in GitHub Desktop.
mikutter FAQからQを取り出す練習
(let ((url-request-method "GET") response)
(with-current-buffer (url-retrieve-synchronously "https://mikutter.hachune.net/faq.json")
(goto-char (point-min))
(re-search-forward "\n\n")
(set-buffer-multibyte t)
(setq response (json-read)))
(with-temp-buffer
(mapcar (lambda (faq)
(insert (cdr (assoc 'question faq)) "\n"))
response)
(buffer-substring-no-properties (point-min) (point-max))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment