Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun extract-next-page-number (page)
- (parse-integer (let ((nexturl
- (stp:attribute-value (first (stp:filter-recursively
- #'(lambda (x) (and (typep (stp:first-child x)
- 'stp:text)
- (equal (stp:data (stp:first-child x))
- "next >")))
- (second
- (stp:filter-recursively
- #'(lambda (x) (and (typep x 'stp:element)
- (equal (stp:local-name x)
- "td")
- (equal (stp:attribute-value x "class")
- "tiny"))) page))))
- "href")))
- (subseq nexturl (1- (length nexturl))))))
Advertisement
Add Comment
Please, Sign In to add comment