summaryrefslogtreecommitdiff
path: root/hib-dlagent
diff options
context:
space:
mode:
authorYaohan Chen <yaohan.chen@gmail.com>2013-10-18 21:18:02 -0400
committerEric Anderson <ejona86@gmail.com>2013-10-19 18:09:37 -0700
commitc8512ab578621c40d87ddb53946e4976e78b2e4a (patch)
treebde1570e22c02d03d8369f0869bfcc4893aa06c8 /hib-dlagent
parent85ea8628f420d0de3d679b0530436e9d991eb912 (diff)
downloadhib-dlagent-c8512ab578621c40d87ddb53946e4976e78b2e4a.tar.gz
hib-dlagent-c8512ab578621c40d87ddb53946e4976e78b2e4a.zip
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.
Diffstat (limited to 'hib-dlagent')
-rwxr-xr-xhib-dlagent2
1 files changed, 1 insertions, 1 deletions
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
}