From owner-svn-ports-head@freebsd.org Tue Feb 9 18:11:54 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FA42AA3738; Tue, 9 Feb 2016 18:11:54 +0000 (UTC) (envelope-from ak@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C5CE1B5E; Tue, 9 Feb 2016 18:11:54 +0000 (UTC) (envelope-from ak@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u19IBrgi010803; Tue, 9 Feb 2016 18:11:53 GMT (envelope-from ak@FreeBSD.org) Received: (from ak@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u19IBr4a010801; Tue, 9 Feb 2016 18:11:53 GMT (envelope-from ak@FreeBSD.org) Message-Id: <201602091811.u19IBr4a010801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ak set sender to ak@FreeBSD.org using -f From: Alex Kozlov Date: Tue, 9 Feb 2016 18:11:53 +0000 (UTC) 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 X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2016 18:11:54 -0000 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/')