-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Use url-retrieve
to fetch weather info
#17
Comments
Hello Condy0919, If we would to drop the curl dependency, the capability to fetch multiple cities like this Unless we manage fetching multiple cities ourselves; consequently making multiple requests. I will be taking a look into it. |
(dolist (city '("Nuremberg" "Hamburg" "Berlin"))
(url-retrieve (format "https://wttr.in/%s?format=3" city)
(lambda (_status)
(let ((buf (current-buffer))
(end (1+ url-http-end-of-headers)))
(with-temp-buffer
(insert-buffer-substring buf end)
(decode-coding-region (point-min) (point-max) 'utf-8)
(message "%s" (buffer-string))))))) Since |
I created a new pull request removing the curl dependency. Would you like to test it before a merge to |
It works, thanks. |
No requirement of curl, so it can run on windows out of box.
The text was updated successfully, but these errors were encountered: