Skip to content

Instantly share code, notes, and snippets.

@loisaidasam
Created February 3, 2016 06:25
Download your bellababy photos
#!/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
@timbuktumor
Copy link

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

@Aviator85
Copy link

I know the last post before this one says its URL signed images - just wondering if anyone had luck with this?

@Aviator85
Copy link

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

is there a way to figure out the signature and apply it to each linked photo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment