So I want to scrape this webpage:
And I tried codes like this:
$(".article-cover-img").attr("src")
And everything similar to that, but I can't get the src value of the image. How can I do that?
CodePudding user response:
Try this :
$(".article-cover-img > img").attr("src");
because you are selecting div instead of img element.
i hope it was useful.