I would like to extract multiple urls from a node and place them into a string array. Currently I'm saving all the text from the desired node into a string;
imgsUrl= value.text
then I am parsing the string and getting the correct url.
imgsUrl[imgUrl.find("http://"):imgUrl.find(".JPG")+4]
My issue with this is there could be 1-200 urls I need from imgsUrl, and I'm only able to obtain one of them. Is there a good solution to place all of them into an array that would be less tedious?
sample input:
sampleStr="<ul><li><a href="http://website/abc/vcd/HHD00300.JPG">HHD00300.JPG</a></li>
<li><a href="http://website/abc/vcd//HHD003002.jpg">HHD003002.jpg</a></li></ul>"
output:
print imgUrlSubString
outputs this: http://website/abc/vcd//HHD003000.JPG
expected output:
['http://website/abc/vcd//HHD003000.JPG','http://website/abc/vcd//HHD003002.JPG',....]