Given several hundred numerically ordered html files, each having multiple image tags but only one image with the id I'm looking for and following the convention <img title="$titleText" src="$imgURL" id="foo" border="0" />, (where $imgURL and $titleText are unique to each page and are not predictable as the page's URL is), how would I go about extracting the $imgURL and $titleText strings in bash?
So far I'm looking at for count in `seq 1 400`; do page=https://website/$count.html; imgURL=[somehow get $imgURL from $page]; titleText=[somehow get $titleText from $page]; echo -e "$countn$imgURLn$titleTextnn" >> some-file; done but with no real idea how to accomplish the parts in brackets beyond "it'll probably have to involve at least two of sed/grep/curl/wget".
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 325
تاريخ: دوشنبه
4 مرداد
1395 ساعت: 14:45