Created
February 3, 2016 06:25
-
-
Save loisaidasam/f2a22941f096ddf3f009 to your computer and use it in GitHub Desktop.
Download your bellababy photos
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
#!/bin/bash | |
# To download your BellaBaby photos | |
# (people who come to the hospital and take photos of you and your newborn) | |
# Note: They are watermarked - you have to pay (big bucks) for the originals! | |
# This seemed to be the convention for my photos: | |
TAG="<photographer_name><date><your_last_name>" | |
# Files 1-9 have slightly different structure... | |
for i in {1..9} | |
do | |
url="https://bellababy-prod.s3.amazonaws.com/generated/$TAG/watermark/0$i-_-$i.jpg" | |
echo $url | |
wget --no-check-certificate $url | |
done | |
for i in {10..25} | |
do | |
url="https://bellababy-prod.s3.amazonaws.com/generated/$TAG/watermark/$i-_-$i.jpg" | |
echo $url | |
wget --no-check-certificate $url | |
done |
The un-watermarked images are in the same location, but are protected with URL signing.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html
https://docs.aws.amazon.com/AmazonECR/latest/APIReference/CommonParameters.html
A valid URL would looks something like this:
https://bellababy-prod.s3.amazonaws.com/generated/1234567/image/01-YOURACCESSCODE-01.jpg?X-Amz-Expires=7200&X-Amz-Date=20240401T141835Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ABCDEFGHIJKLMNOPQRST/20240401/us-east-1/s3/aws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=ab1cd2ef3gh4ij5kl6mn7op8qr9st0uv1wx2yz3ab4cd5ef6gh78901234567890
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have tried all sort of words, nothing hits the mark. someone has to report the success story!!