is there any way or any tools that I could use to get from a SH script, a webpage title, metadata such as descriptions, maybe a little screenshot of the webpage or anything like that?
Thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you could use curl or wget to get the webpage, and then pipe it to sed to get the contents of various tags. It’s kludgy as, but that’s kinda what you’re going to get if you’re doing this stuff with a shell script.
eg
will give you the contents of the title tag. Note that in this example it gives you the raw un-parsed source, so it looks like
IANA — Example domainsinstead ofIANA – Example domains.Have you considered using something like perl?