Created
August 28, 2021 06:15
-
-
Save brendannee/763fd11b13d968a7e4f5e4867a706629 to your computer and use it in GitHub Desktop.
Download a list of webpages as pdfs and use the last part of the path as the filename
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while read p; do | |
DOWNLOADURL=$(echo $p | grep / | cut -d/ -f5 | awk '{print $1".pdf"}') | |
chrome --headless --print-to-pdf=$DOWNLOADURL $p; sleep 5 | |
done <list.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment