开发者

Scrape data of a div after one or two html tags using xpath

开发者 https://www.devze.com 2023-04-03 22:22 出处:网络
Here is the code: <div id=\"content\"> <div class=\"datebar\"> 开发者_开发知识库 <span style=\"float:right\">some text1</span>

Here is the code:

<div id="content">
   <div class="datebar">
     开发者_开发知识库 <span style="float:right">some text1</span>
      <b>some text2</b>
Thursday, September 8, 2011 - 1:17 pm EDT
   </div>
</div>

I just want to extract date and time Thursday, September 8, 2011 - 1:17 pm EDT.

Any suggestions? Thanks.


div[@id = 'content']/div[@class = 'datebar']/text()

or

div[@id = 'content']/div[@class = 'datebar']/b/following-sibling::text()

Though it should be normalized after.

0

精彩评论

暂无评论...
验证码 换一张
取 消