html - Have list of URLs and the page of each URL has a specific link; any way to extract those links? -


the urls have reddit links, e.g.

http://www.reddit.com/r/pics/comments/22im98/this_blew_my_mind_a_real_restored_picture_of/

and each of links have picture/link @ top of page (usually imgur). here's picture/link above reddit link

http://imgur.com/dymrl5f

so there way use wget/curl/awk/sed/grep/cut/etc. give reddit link , imgur link?

thanks

using multi-platform web-scraping cli xidel xpath expression extract url of link class thumbnail:

url='http://www.reddit.com/r/pics/comments/22im98/this_blew_my_mind_a_real_restored_picture_of/'  xidel -q -e '//a[contains(@class, "thumbnail")]/@href' "$url" 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -