Xidel print the original url

111 views Asked by At

I am trying to extract url from a webpage and follow them and I am skipping the 4XX and 5XX.My question is Is it possible to print the URL of the request that is returning 200 using xidel

xidel -s --error-handling=4xx=skip,5xx=skip "URL" -e "PRINT URL" 
1

There are 1 answers

6
Reino On BEST ANSWER

'https://videlibri.sourceforge.net/xidel_readme.txt':

Xidel also defines the following global default variables:

   $raw         Unparsed input text
   $url         Url the input was retrieved from (past redirect)
   $host, $path Respective part of the url
   $json        Parsed JSON input, if it was JSON
   $headers     All HTTP headers, including status code

So, you're looking for -e "$url".