xidel

Xidel print the original url


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" 

Solution

  • '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".