Date: Tue, 9 Feb 2016 18:11:53 +0000 (UTC) From: Alex Kozlov <ak@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r408586 - in head/www/googlebook_dl: . files Message-ID: <201602091811.u19IBr4a010801@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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/')
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602091811.u19IBr4a010801>