Open mgudemann opened 1 month ago
It looks like reddit wants to charge emacs for free content.
Can you eval
this function and try again?
(defun reddigg--promise-json (url)
"Promise a json from URL."
(promise-new
(lambda (resolve reject)
(url-retrieve (url-encode-url url)
(lambda (status)
(if (plist-get status :error)
(funcall reject (plist-get status :error))
(condition-case ex
(with-current-buffer (current-buffer)
(if (not (url-http-parse-headers))
(funcall reject (buffer-string))
(goto-char url-http-end-of-headers) ; Move to the end of headers
(funcall resolve (reddigg--parse-json-buffer))))
(error (funcall reject ex)))))))))
hi @thanhvg this works without problems, thanks
I get
403
on all subreddits. Initially I though it was that theold.reddit...
URLs are not accessible anymore, but copy/pasting for examplehttps://old.reddit.com/r/popular.json?count=25
into the browser does work. I tried changing theUser-Agent
but that did not help. Any ideas?