Skip to content

Maxim-Mazurok/family-search-image-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

FamilySearch Image Downloader

A tool for researchers to download and stitch high-resolution images from FamilySearch.

Disclaimer: This tool is for research purposes only. Please respect the data provider's terms of service and usage limits. Built using Antigravity with Gemini 3 Pro High.

Requirements

  1. Python 3
  2. ImageMagick
    • This tool uses ImageMagick's montage command to stitch the downloaded tiles into a single high-resolution image.
    • macOS: brew install imagemagick
    • Linux: sudo apt-get install imagemagick
    • Windows: Download and install from imagemagick.org. Ensure "Add to PATH" is selected during installation.

Installation

  1. Clone this repository or download the script.
  2. (Optional) Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate  # On Windows use: venv\Scripts\activate
  3. Install dependencies:
    pip install requests

Usage

python downloader.py <URL_ENDING_IN_0_0.jpg> [OUTPUT_FILENAME] [--cookies "COOKIE_STRING"]
  • URL: The URL of the first tile (0_0.jpg).
  • OUTPUT_FILENAME: (Optional) The name of the resulting image file. Defaults to result.jpg.
  • --cookies: (Required for protected images) The cookie string from your browser session.

Example

python downloader.py "https://sg30p0.familysearch.org/.../0_0.jpg" my_record.jpg --cookies "sessionId=...; name=..."

How to Find the URL and Cookies

To use this tool, you need to find the direct URL of the image tiles and your session cookies.

Tip: For the best results, zoom in all the way on the image using the website's interface before inspecting the element. The site serves different tiles based on your zoom level (e.g., .../13/ vs .../10/). Zooming in ensures you find the URL for the highest resolution version.

  1. Open Developer Tools:

    • Open the image you want to download in your web browser (Chrome, Firefox, Safari, etc.).
    • Right-click on the image and select Inspect or Inspect Element. This will open the Elements tab.
  2. Find the Image Tile URL:

    • In the Elements tab, you will see the HTML structure of the page.
    • Look for <img> tags near where you inspected. These represent the tiles that make up the image.
    • Find an <img> tag with a src attribute ending in .jpg (e.g., .../10/0_0.jpg).
  3. Copy the URL:

    • Double-click the src url to select it, or right-click the link and choose Copy link address.
    • This is your <URL_ENDING_IN_0_0.jpg> argument.
  4. Copy the Cookies:

    • Go to the Network tab in Developer Tools.
    • Reload the page if necessary to see requests.
    • Click on the request for the image tile (or the main page request).
    • In the Headers tab, scroll down to Request Headers.
    • Find the Cookie header.
    • Right-click the value of the Cookie header and Copy value.
    • This is your COOKIE_STRING. Paste it inside quotes for the --cookies argument.

    Note: The cookie string can be very long. Make sure to copy the entire string.

How it Works

  1. Discovery: The script probes the URL by systematically incrementing row and column indices to determine the full dimensions of the image grid.
  2. Download: It downloads all individual tiles concurrently to a temporary folder (tiles_temp).
  3. Stitch: It invokes ImageMagick to combine these tiles into a single seamless image file.

About

A tool for researchers to download and stitch high-resolution images from FamilySearch.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages