我正在尝试从以下html获取img src图像链接的值。我已经像波纹管一样尝试了c#,但这无法获取链接。我在C#中做错了什么。有人可以帮助我吗?
C#:
Picture = htmlDoc.DocumentNode.SelectSingleNode("//div[@id='imgTagWrapperId']/img").Attributes["src"].Value;
HTML:
<div id="imgTagWrapperId" class="imgTagWrapper" style="height: 700px;">
<img alt="PET N PET 1080 Counts Large Green Dog Waste Bags Unscented 60 Rolls Doggie Refill Bags" src="https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SX679_.jpg" data-old-hires="https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SL1001_.jpg" class="a-dynamic-image a-stretch-vertical" id="landingImage" data-a-dynamic-image="{"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SX466_.jpg":[466,466],"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SX569_.jpg":[569,569],"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SX425_.jpg":[425,425],"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SY355_.jpg":[355,355],"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SY450_.jpg":[450,450],"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SX679_.jpg":[679,679],"https://images-na.ssl-images-amazon.com/images/I/61xdgCf5UBL._SX522_.jpg":[522,522]}" style="max-width:679px;max-height:679px;">
</div>