Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67411

How can scrapy get the second inside of div class?

$
0
0

I'm trying to get url from in a div class. But this div has two <a href>. I can get the first one but I should get second one. How can I do this?

This is the html code of website:

<div class="active"> 
          <a href="javascript:;" class=" add-favorite  j-lightbox-popup-button " data-target="howGoingCheckoutNotRedirect"> <i data-feather="heart"></i> </a> 
          <a href="/urun/yohegoalhareketli-kale-112432"> 

This is my Python code:

product_link = container.a["href"]

It gets javascript:; inside of a["href"]


Viewing all articles
Browse latest Browse all 67411

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>