Skip to content

yhejazi/mtg-web-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic: The Gathering Web Scraper

This is a web scraper that collects data of all Magic: The Gathering cards on Wizards of the Coast's Gatherer website

About the data

The Gatherer website is a database of every Magic: The Gathering card, including test cards. I scraped the data to include the following variables:

  • cardName: The card name; string
  • superType: The supertypes of a card; string
  • cardType: The types of a card (i.e. Creature); string
  • subType: The subtype of a card (i.e. Equipment); string
  • typeNum: The power/toughness or loyalty of a card if applicable; string
  • manaCost: The mana cost of a card. Symbols converted using color code; string
  • convertedMana: The converted mana cost of a card; float
  • cardSet: The set of a card; string
  • rarity: The rarity of a card; string
  • rules: The rules (text) of a card. Symbols converted using color code; string

Supertypes (defined here ): 'Basic', 'Host', 'Legendary', 'Ongoing', 'Snow', 'World'

Mana Cost Key: Black = B, Blue = U, Red = R, Green = G, White = W, Variable Colorless = X, Colorless = C, Phyrexian = P, Tap = Tap, E = Energy

Rarities: 'Common', 'Uncommon', 'Rare', 'Mythic Rare', 'Special', 'Promo'

Notes:

  • Land cards with the rarity "Land" were changed to have the rarity "Common" to keep consistent with other sets.
  • Removed token cards where cardType contains 'Token'
  • Card type 'Summon' was changed to 'Creature'

About

Magic: The Gathering card web scraper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages