git: 79ea4fb2e9b8 - main - www/googlebook_dl: Update to 20221117
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 20 Nov 2022 14:04:39 UTC
The branch main has been updated by ak: URL: https://cgit.FreeBSD.org/ports/commit/?id=79ea4fb2e9b87ab1f8b8f36171f61c493847d01e commit 79ea4fb2e9b87ab1f8b8f36171f61c493847d01e Author: Alex Kozlov <ak@FreeBSD.org> AuthorDate: 2022-11-20 14:00:26 +0000 Commit: Alex Kozlov <ak@FreeBSD.org> CommitDate: 2022-11-20 14:00:26 +0000 www/googlebook_dl: Update to 20221117 - Add GDPR support Reported by: Mark Anderes <a*****89@gmail.com> --- www/googlebook_dl/Makefile | 2 +- www/googlebook_dl/files/googlebook_dl.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/www/googlebook_dl/Makefile b/www/googlebook_dl/Makefile index 6b82fb26ec65..adce8ca52aa4 100644 --- a/www/googlebook_dl/Makefile +++ b/www/googlebook_dl/Makefile @@ -1,5 +1,5 @@ PORTNAME= googlebook_dl -PORTVERSION= 20160213 +PORTVERSION= 20221117 CATEGORIES= www MASTER_SITES= # none DISTFILES= # none diff --git a/www/googlebook_dl/files/googlebook_dl.sh b/www/googlebook_dl/files/googlebook_dl.sh index d00d46116a9f..0fd44a6c0fa5 100644 --- a/www/googlebook_dl/files/googlebook_dl.sh +++ b/www/googlebook_dl/files/googlebook_dl.sh @@ -109,6 +109,7 @@ get_cookie() # get cookie unset cookie_str cookie_str=$(wget ${optcommon} -S -U"${ua}" -O/dev/null \ + --header 'Cookie: CONSENT=YES+' \ "${baseurl}${bookid}&pg=PA1&jscmd=click3" 2>&1 | \ sed -ne '/Set-Cookie:/s/^.*\(NID[^=]*=.*domain=.google.com; HttpOnly\).*$/\1/p') @@ -145,6 +146,7 @@ get_page() # fetch urls # NB! signatures tied to cookie and ip urls=$(wget ${optcommon} -U"${ua}" --header "Cookie: ${cookie_str}" -O- \ + --header 'Cookie: CONSENT=YES+' \ "${url}" | tr '}' '\n' | \ sed -ne 's/^.*"src":"\(https:\/\/[^"]*\)".*$/\1/; /pg=/s/\\u0026/\&/gp') @@ -158,6 +160,7 @@ get_page() got_pages=$((${got_pages} + 1)) wget ${optcommon} -U"${ua}" --header "Cookie: ${cookie_str}" \ + --header 'Cookie: CONSENT=YES+' \ -O"${bookid}/${page}.png" "${url}&w=${pagewidth}" _return=$?