【发布时间】:2018-03-23 09:45:51
【问题描述】:
嘿伙计们,所以我试图访问下面代码中的链接,但是唯一具有名称的 div 在 href 内。如果它在 div 内,我知道如何到达 href 但不是这样。有人可以帮忙吗?
<div>
<a href="/economic-research/blog/EconomicPublications/algeria-country-report-mar17.pdf">
<div class="CountryRiskReportLink">
Algeria Country Report
</div></a>
</div>
【问题讨论】:
-
你想要href属性里面的值吗?请清除您的要求
-
抱歉,当我不能仅参考 CountryReportLink 时,我希望能够获得 /economic-research/blog/EconomicPublications/algeria-country-report-mar17.pdf
-
很抱歉,它所在的未命名 Div 位于具有多个其他未命名 Div 的网页内,这就是为什么 CountryReportLink 是我唯一的参考
标签: php simple-html-dom