0
是否有可能通過jsdom(我使用它與Node.js + JQuery)來獲取多行屬性的值?帶jsdom的多行屬性
該網站刮包括該HTML:
<li><a data-title="<strong>hello world
this is a test</strong>" href="example.org</strong>">A link</a></li>
不幸的是,這被解析到
<li><a data-title="data-title"><strong>hello world
this is a test</strong>' href="example.org">A link</a></li>
,所以我不能提取的標題和href屬性例如通過JQuery:$("a").attr("data-title")
。
任何想法?
Cheerio似乎也扼殺了多行屬性: - /。我想我會切換到機械化。 – Alexander 2013-03-17 11:34:01