svn commit: r408586 - in head/www/googlebook_dl: . files
Alex Kozlov
ak at FreeBSD.org
Tue Feb 9 18:11:54 UTC 2016
Author: ak
Date: Tue Feb 9 18:11:52 2016
New Revision: 408586
URL: https://svnweb.freebsd.org/changeset/ports/408586
Log:
- Update check after cookie format change
- Switch to https
Modified:
head/www/googlebook_dl/Makefile
head/www/googlebook_dl/files/googlebook_dl.sh
Modified: head/www/googlebook_dl/Makefile
==============================================================================
--- head/www/googlebook_dl/Makefile Tue Feb 9 17:49:22 2016 (r408585)
+++ head/www/googlebook_dl/Makefile Tue Feb 9 18:11:52 2016 (r408586)
@@ -2,7 +2,7 @@
PORTNAME= googlebook_dl
PORTVERSION= 20120817
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= # none
DISTFILES= # none
Modified: head/www/googlebook_dl/files/googlebook_dl.sh
==============================================================================
--- head/www/googlebook_dl/files/googlebook_dl.sh Tue Feb 9 17:49:22 2016 (r408585)
+++ head/www/googlebook_dl/files/googlebook_dl.sh Tue Feb 9 18:11:52 2016 (r408586)
@@ -120,7 +120,7 @@ get_cookie()
# fail if wget returned non-zero exitcode or cookies.txt is empty
_return=$?
cookie_str="$(grep '^.google.com[[:space:]]' "${cookie}" 2>/dev/null | \
- sed -ne 's/^.*\(ID=.*\)$/\1/p')"
+ sed -ne 's/^.*\(NID[^=]*=.*\)$/\1/p')"
if [ ${_return} -ne 0 -o -z "${cookie_str}" ]; then
rm "${cookie}" 2>/dev/null
out 'E\n' "cannot get cookie: ${cookie_str}"
@@ -154,7 +154,7 @@ get_page()
urls=$(wget -T5 -t2 -q -U"${ua}" --no-cache \
--load-cookies "${cookie}" -O- \
"${url}" | tr '}' '\n' | grep "{\"pid\":\"P.*\",\"src\":" | \
- sed 's/^.*"src":"\(http:\/\/[^"]*\)".*$/\1/;s/\\u0026/\&/g' | sort -u)
+ sed 's/^.*"src":"\(https:\/\/[^"]*\)".*$/\1/;s/\\u0026/\&/g' | sort -u)
for url in ${urls}; do
page=$(echo "${url}" | sed 's/^.*&pg=\([^&]*\)&.*$/\1/')
More information about the svn-ports-all
mailing list