Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selecing DATA attribute with cheerio

how would i go about selecting the data-preconnect-urls value from this html?

<a class="V0MxL r-iouRA4dnjnsk" href="https://www.googleadservices.com/pagead/aclk?sa=L&amp;ai=DChcSEwjajYGGnerhAhVtANMKHS7gDKYYABAAGgJ3Yg&amp;ohost=www.google.com&amp;cid=CAESEeD2qv-1juqYmFBdcohZcFwG&amp;sig=AOD64_3EPN3EpYMWlKpKa-PyxGDbSTEInw&amp;q=&amp;ved=2ahUKEwjl6_mFnerhAhWy1eAKHacmB80Q0Qx6BAgLEAE&amp;adurl=" id="vn1s0p1c0" onmousedown="return google.arwt(this)" ontouchstart="return google.arwt(this)" data-preconnect-urls="https://www.expedia.com/" jsl="$t t-r1glFWqNI5A;$x 0;"><h3 class="sA5rQ">Expedia - Book Cheap Flights | Fly At Incredible Prices | expedia.com‎</h3><br><div class="ads-visurl"><span class="Z98Wse">Ad</span><cite class="UdQCqe">www.expedia.com/Flights/Book</cite>‎</div></a>
like image 870
Limpfro Avatar asked Jun 16 '26 06:06

Limpfro


1 Answers

From the documentation,

$('a').data('preconnect-urls')
like image 100
piuspbd Avatar answered Jun 17 '26 22:06

piuspbd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!