Skip to content

mtgban/sldownloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sldownloader

The only drop that matters is a downloaded one

sldownloader is small Go tool that retrieves Secret Lair product pages to extracts the card names and their collector numbers via Scryfall, OCR and a few heuristics. The output format is a filename (or a series of filenames) compatible with magic-preconstructed-decks decklists. These files can be dropped in taw's project folder data/boosters/sld/sld/ directly for use.


Features

  • Scrapes product pages, either from a paginated catalog API or explicit URLs.
  • Parses card lists, clening the output of any extra characters.
  • Retrieves card names from the page and associates it with Scryfall edition titles.
  • Uses OCR on the image gallery, to discover the collector number from the image itself.
  • Backfills missing numbers by inferring contiguous sequences when possible.

Installation

go install github.com/mtgban/sldownloader.git

Usage

You can run the tool by setting a starting page from which the catalog will be read (until there is no more data):

./sldownloader -page 1

or with an explict product page URL:

./sldownloader https://secretlair.wizards.com/eu/en/product/1002048/showcase-bloomburrow

License

MIT

About

The only drop that matters is a downloaded one

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages