so I have HTML files which have a specific portion I'd like to extract. These HTML addresses are in a text file. A sample HTML webpage, taken from this textfile would look like this, and I'd want to get part 009514HB.JPG which is different for every HTML file.
My .txt file would be something like this -
https://www.dermquest.com/image-library/image/5044bfd0c97267166cd653c8 https://www.dermquest.com/image-library/image/5044bfcfc97267166cd61ff4 https://www.dermquest.com/image-library/image/5044bfd0c97267166cd6310a https://www.dermquest.com/image-library/image/5044bfd0c97267166cd6310b https://www.dermquest.com/image-library/image/5044bfcfc97267166cd61ff5 https://www.dermquest.com/image-library/image/5044bfd0c97267166cd64278 https://www.dermquest.com/image-library/image/5044bfcfc97267166cd61ff6 https://www.dermquest.com/image-library/image/5044bfcfc97267166cd61ff7 https://www.dermquest.com/image-library/image/5044bfd0c97267166cd63c1b https://www.dermquest.com/image-library/image/5044bfcfc97267166cd619b1 https://www.dermquest.com/image-library/image/5044bfcfc97267166cd619b4 https://www.dermquest.com/image-library/image/5044bfcfc97267166cd625a3 https://www.dermquest.com/image-library/image/5044bfd0c97267166cd64844 https://www.dermquest.com/image-library/image/5044bfcfc97267166cd619ba https://www.dermquest.com/image-library/image/5044bfd0c97267166cd63ce3 https://www.dermquest.com/image-library/image/5044bfd0c97267166cd64437 https://www.dermquest.com/image-library/image/5044bfd1c97267166cd67203
and if I click open one of those html pages using a text editor I can find the information I need..
*** some code here*** <figure> <a href="/imagelibrary/large/009514HB.JPG" target="_blank" class="preview-image"><img src="/imagelibrary/medium/009514HB.JPG" alt="acne keloidalis nuchae"/></a> </figure> ...
Now I would like to get these numbers from various HTML files, and then append these numbers to
https://www.dermquest.com/imagelibrary/large. For example, I would want my final txt file to have urls which are like this, [slightly NSFW]
https://www.dermquest.com/imagelibrary/large/009514HB.JPG This line would be easier for me to wget the images! I don't know a lot about SED or AWK so any sort of advice/help would be great.
tl;dr: The links point to a webpage not an image, so when I wget I'm downloading html pages rather than images I want. This is how I think I could do it but any better solutions would be helpful too!