使用rvest包从html页面中提取属性

时间:2015-04-08 18:19:19

标签: html r attributes rvest

我试图从这个网站提取数据 http://www.mycity4kids.com/Delhi-NCR/Schools_bl

<div class="normal_listing" itemscope itemtype="http://schema.org/LocalBusiness">
<div class="row rowpdng">
<div class="col-lg-2 hidden-xs" style="padding:0;">
<a href="/Delhi-NCR/Schools/Amazon-Public-School_Sector-56-Gurgaon/5038_bd"><img itemprop="logo" src="http://images.mycity4kids.com/business-image/10369/amazon-international-school130312082644.JPG" alt="Amazon Public School" title="Amazon Public School" width="108" height="60" class="img-border"/>
</a>
</div>
<div class="innerdiv">
<h1>
<a itemprop="url" class="biznme_txt" title="Amazon Public School" id="Nmeof5038" href="/Delhi-NCR/Schools/Amazon-Public-School_Sector-56-Gurgaon/5038_bd"> <span style="color:#3273da;right:0px;top:0px;" itemprop="name">Amazon Public School</span>
</a>
</h1>
<h2> <span itemprop="location" style="right:0px;top:0px;"> <a href="/Delhi-NCR/Schools_Sector-56-Gurgaon_Gurgaon_bl"  class="loclink" title="Schools in Sector 56 Gurgaon">Schools in Sector 56 Gurgaon </a> 
</span>
</h2>

我需要的信息在上面的第4行代码片段中,即&#34; / Delhi-NCR / Schools / Amazon-Public-School_Sector-56-Gurgaon / 5038_bd&#34;我无法找到一种方法。
建议尽快这样做!

0 个答案:

没有答案