File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,14 @@ rm -f $cookie packt*.html
23
23
log " Packt web login"
24
24
25
25
# web login
26
- curl -s --retry $rtry -m $tout -A " $agent " -b " $cookie " -c " $cookie " -d " email=$userid " -d " password=$pwd " -d " op=Login" -d " form_build_id=form-73ba86bbfb2a50719049129632c84810 " -d " form_token=2f1d586bf7df196b77d0761709d03199" -d " form_id=packt_user_login_form" https://www.packtpub.com
26
+ curl -s --retry $rtry -m $tout -A " $agent " -b " $cookie " -c " $cookie " --data-urlencode " email=$userid " -d " password=$pwd " -d " op=Login" -d " form_build_id=form-73ba86bbfb2a50719049129632c84810 " -d " form_token=2f1d586bf7df196b77d0761709d03199" -d " form_id=packt_user_login_form" https://www.packtpub.com
27
27
cex=$? ; test " $cex " -ne " 0" && { log " curl exit error code: $cex " ; exit ; }
28
28
29
29
# daily free e-book
30
30
curl -s --retry $rtry -m $tout -A " $agent " -b " $cookie " -c " $cookie " https://www.packtpub.com/packt/offers/free-learning > packt_daily.html
31
31
cex=$? ; test " $cex " -ne " 0" && { log " curl exit error code: $cex " ; exit ; }
32
32
33
- title=$( grep " dotd-title" -A 2 packt_daily.html | tail -1 | sed ' s/^[^0-9A-Za-z]*//;s/[\t ]*<\/h2>$//' )
33
+ title=$( grep " dotd-title" -A 2 packt_daily.html | tail -1 | sed ' s/^[^0-9A-Za-z]*//;s/[\t ]*<\/h2>$//' | awk ' {$1=$1};1 ' )
34
34
log " Today's free e-book: $title "
35
35
36
36
# claim
You can’t perform that action at this time.
0 commit comments