Common lisp 在Common Lisp中抓取HTML表?

Common lisp 在Common Lisp中抓取HTML表?,common-lisp,Common Lisp,我想从包含在HTML中的网页中提取一些信息。如何将所有表信息提取到一个分隔良好的文件中 Author|Book|Year|Comments Bill Bryson|Short History of Nearly Everything|2004 Stephen Hawking|A Brief History of Time|1998|Still haven't read. 作者|书|年|评论 比尔·布赖森|几乎所有事情的简短历史| 2004 斯蒂芬·霍金(Stephen Hawking)《时间简史

我想从包含在HTML中的网页中提取一些信息。如何将所有表信息提取到一个分隔良好的文件中

Author|Book|Year|Comments Bill Bryson|Short History of Nearly Everything|2004 Stephen Hawking|A Brief History of Time|1998|Still haven't read. 作者|书|年|评论 比尔·布赖森|几乎所有事情的简短历史| 2004 斯蒂芬·霍金(Stephen Hawking)《时间简史》(1998年)仍然没有读过。 理想情况下,我希望有一个函数,将URL和输出文件作为参数,然后给出上述输出

(defun extract-table (url filename) (extract-from-html-table (fetch-web-page url))) (extract-table "http://www.mypage.com" "output.txt") (defun提取表(url文件名) (从html表提取(获取网页url))) (摘录表格)http://www.mypage.com“output.txt”) 上述输出的示例HTML输入:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <title>Lisp</title> </head> <body> <h1>Welcome to Lisp</h1> <table class="any" style="font-size: 14px;"> <TR class="header"> <td>Author</td> <TD>Book</TD> <td>Year</td> <td>Comments</td> </TR> <tr class="odd"> <td>Bill Bryson</td> <td>Short History of Nearly Everything</td> <td>2004</td> </tr> <tr> <td>Stephen Hawking</td> <td>A Brief History of Time</td> <td>1998</td> <td>Still haven't read.</td> </tr> </table> </body> </html> 口齿不清 欢迎来到Lisp 作者 书 年 评论 比尔·布莱森 几乎所有事物的短暂历史 2004 斯蒂芬霍金 时间简史 1998 我还没读过。 从获取数据开始。要分析这个东西,您可能会发现它很有用。或者更好:您可以使用,它应该解析任意的HTML4。closure html包的Common-Lisp.net页面有一个