It is currently 26 Apr 2024, 04:10
   
Text Size

card lists

Discuss anything concerning this site and its contents

Moderator: CCGHQ Admins

card lists

Postby Incantus » 01 Nov 2008, 14:21

Does anyone know where i can find a list of each expansion along with the cards in that expansion? Preferably in an easy to parse format (comma or tab separated)?
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: card lists

Postby Snacko » 01 Nov 2008, 15:25

You can do either:
1) parse an existing mwsBase or a csv dump of it
2) parse csv card base of deckbuilder / card generator which is a preprocessed GH mwsBase
3) parse directly from gatherer
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: card lists

Postby Incantus » 01 Nov 2008, 17:24

Yeah, i ended up writing a screenscraper for gatherer. One issue is that the expansion name in the text export is only the most recent expansion, and i would like to get card lists for each expansion. But a quick python fixed that ;)

But for future reference, where do i get csv card base of deckbuilder (I can't export from MWS since I don't have windows)
Incantus
DEVELOPER
 
Posts: 267
Joined: 29 May 2008, 15:53
Has thanked: 0 time
Been thanked: 3 times

Re: card lists

Postby Snacko » 01 Nov 2008, 17:40

It's included in the main package.
Most of the time there isn't a csv base only download, it's located data/cards.csv.
Just to let you know MWS built-in export to csv doesn't work, however you can use cdsExplorer via wine to export any mws sets / cards masterbase.

You can easily get per expansion text spoilers / or any other formats from gatherer, however if you want to have all the info like artist, flavor etc you need to spider each card separately (that's how I do to get all the translations up to date).
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: card lists

Postby frwololo » 18 Feb 2009, 00:56

sorry to revive an old thread, but I have a script that might be of interest for that.
It also happens to download card pictures.
I didn't create it (original creator's name in the file), but slightly modified it (in a bad way. I'd say I un-improved it). Anyone with python experience can probably change it to fit their needs.
http://code.google.com/p/wagic/source/b ... builder.py
http://code.google.com/p/wagic/source/b ... s/gatherer
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times

Re: card lists

Postby messels » 20 Feb 2009, 23:13

hi, i was wondering if you'd be willing to share your scraper? i'm trying to put together a db of all the cards for easy download--so everyone can develop mtg-solutions without having to go through all the riga-ma-roll every time. i have all the card names, etc but as you mentioned to get artist name, etc you have to do it card-by-card. i've not written any scrapers so haven't a clue to start and would love the extra help.

lmk if this can be arranged.

first post here so big thanks for all the HQ scans. AMAAAAZING work y'all. :)
messels
 
Posts: 2
Joined: 20 Feb 2009, 21:56
Has thanked: 0 time
Been thanked: 0 time

Re: card lists

Postby messels » 20 Feb 2009, 23:15

OKAY, i see that i'm a total dof for asking before finishing to read the thread. my bad. #-o
messels
 
Posts: 2
Joined: 20 Feb 2009, 21:56
Has thanked: 0 time
Been thanked: 0 time

Re: card lists

Postby Huggybaby » 21 Feb 2009, 03:15

lol Glad you got it sorted, and welcome to the forum. :)
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: card lists

Postby frwololo » 24 May 2009, 03:26

Anyone would have a script for the latest Gatherer site ? I saw that they didn't update it with Alara Reborn...
Edit: Nevermind, created my own script
frwololo
DEVELOPER
 
Posts: 265
Joined: 21 Jun 2008, 04:33
Has thanked: 0 time
Been thanked: 3 times


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 25 guests


Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 25 guests

Login Form