mirror of
https://github.com/SqrtMinusOne/lyrics-fetcher.el.git
synced 2025-12-10 17:03:03 +03:00
docs: add comments for genius behavior
This commit is contained in:
parent
12175e6965
commit
ce7858a602
3 changed files with 6 additions and 1 deletions
|
|
@ -94,3 +94,5 @@ The album cover fetching is similar. The corresponding function is set in ~lyric
|
||||||
- =sync= - as above.
|
- =sync= - as above.
|
||||||
|
|
||||||
The first argument is =track= because in EMMS all the required information is stored in tracks, and album data is deduced from tracks. So this package just takes a sample track in the album.
|
The first argument is =track= because in EMMS all the required information is stored in tracks, and album data is deduced from tracks. So this package just takes a sample track in the album.
|
||||||
|
* Troubleshooting
|
||||||
|
I've noticed that Genius can give pages with different DOMs to different people. If you have an empty buffer instead of lyrics, please attach the =curl-cookie-jar= file to the issue. It usually resides in =.emacs.d/request=.
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,9 @@ If SYNC is non-nil, the request will be performed synchronously."
|
||||||
(let* ((html (with-temp-buffer
|
(let* ((html (with-temp-buffer
|
||||||
(insert data)
|
(insert data)
|
||||||
(libxml-parse-html-region (point-min) (point-max))))
|
(libxml-parse-html-region (point-min) (point-max))))
|
||||||
|
;; Apparently, Genius can give different
|
||||||
|
;; responses to different people based on
|
||||||
|
;; cookies.
|
||||||
(lyrics-divs (or (dom-by-class html (rx bos "lyrics" eos))
|
(lyrics-divs (or (dom-by-class html (rx bos "lyrics" eos))
|
||||||
(dom-by-class html (rx bos "Lyrics__Container" (* nonl))))))
|
(dom-by-class html (rx bos "Lyrics__Container" (* nonl))))))
|
||||||
(funcall callback
|
(funcall callback
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
;; Author: Korytov Pavel <thexcloud@gmail.com>
|
;; Author: Korytov Pavel <thexcloud@gmail.com>
|
||||||
;; Maintainer: Korytov Pavel <thexcloud@gmail.com>
|
;; Maintainer: Korytov Pavel <thexcloud@gmail.com>
|
||||||
;; Version: 0.1.2
|
;; Version: 0.1.3
|
||||||
;; Package-Requires: ((emacs "27") (emms "7.5") (f "0.20.0") (request "0.3.2"))
|
;; Package-Requires: ((emacs "27") (emms "7.5") (f "0.20.0") (request "0.3.2"))
|
||||||
;; Homepage: https://github.com/SqrtMinusOne/lyrics-fetcher.el
|
;; Homepage: https://github.com/SqrtMinusOne/lyrics-fetcher.el
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue