From c8512ab578621c40d87ddb53946e4976e78b2e4a Mon Sep 17 00:00:00 2001 From: Yaohan Chen Date: Fri, 18 Oct 2013 21:18:02 -0400 Subject: Fix URL extraction The listing page source code has changed so that href= is on its own line. The previous discover_url() picks this up and prints/uses download URLs in the form of "href='https...". This change fixes the problem. --- hib-dlagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hib-dlagent b/hib-dlagent index e55ca61..f191b7c 100755 --- a/hib-dlagent +++ b/hib-dlagent @@ -21,7 +21,7 @@ login() { discover_url() { local LISTING_PAGE="$1" - curl -s --cookie "$COOKIE_JAR" "$LISTING_PAGE" | grep "/$FILE?" | \ + curl -s --cookie "$COOKIE_JAR" "$LISTING_PAGE" | grep "/$FILE?" | grep 'data-web=' | \ sed -e "s/.* data-web='\([^']*\)'.*/\1/" | head -n 1 } -- cgit v1.2.3-54-g00ecf