I can’t extract links to resources found by Google during a search (page: https://google.com/search?q=example) with this request:
//div[contains(@class, 'g')]//a[descendant::h3]/@href.
example of a piece of HTML:
<div class="N54PNb BToiNc cvP2Ce" data-snc="pTmkif">
<div class="kb0PBd cvP2Ce A9Y9g jGGQ5e" data-snf="x5WNvb" data-snhf="0">
<div class="yuRUbf">
<div>
<span jscontroller="msmzHf" jsaction="rcuQ6b:npT2md;PYDNKe:bLV6Bd;mLt3mc"><a jsname="UWckNb" href="https://ru.wikipedia.org/wiki/%D0%93%D0%BE%D0%B4" data-ved="2ahUKEwjq8e-bmf6HAxXNPxAIHS7EGq4QFnoECB0QAQ" ping="/url?sa=t&source=web&rct=j&opi=89978449&url=https://ru.wikipedia.org/wiki/%25D0%2593%25D0%25BE%25D0%25B4&ved=2ahUKEwjq8e-bmf6HAxXNPxAIHS7EGq4QFnoECB0QAQ"><br>
<h3 class="LC20lb MBeuO DKV0Md">Год — Википедия</h3>
<div class="notranslate HGLrXd NJjxre iUh30 ojE3Fb">
<div class="q0vns">
a link of this kind works:
//div[contains(@class, 'g')]//a/@href
New contributor