Jump to content

Pipe results into a database

- - - - -

  • Please log in to reply
6 replies to this topic

#1
HR19

HR19

    Newbie

  • Members
  • Pip
  • 4 posts
If you go to the Gatherer website, you'll find a method of looking up Magic: The Gathering cards. If I spend a few weeks on it, I could probably figure out how to do what I want (well, maybe...), but I'm gonna ask here instead: How could I send a request to their server that would return all cards on file, and then pipe them into a database? I'm a pretty new programmer, I've only taken 6 or 7 classes in college, but I do have experience in Java, VB.NET, JavaScript, SQL, and C. I'm not expecting someone to do it for me (unless it's an easy and quick thing to do), I'm just looking for someone to point me in the right direction. I have a database of MTG cards with all entries short of Scars of Mirrodin, so I was even thinking about just writing a Java or VB program to look at the HTML pages one at a time, and then just suck out the information I want and put it into an existing database with just a few lines of SQL. But I wouldn't learn much doing that, since I already can do that. So I was hoping someone could point me in the right direction to find a better method that might teach me some new things.

Thanks,
HR

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You're going to have to automate the requests that you would have to do by hand.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
HR19

HR19

    Newbie

  • Members
  • Pip
  • 4 posts
What do you mean? Can you explain a bit, please?

#4
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Basically you can't just access their databases. WP suggested just making a program that automates what you would be doing by hand. So if your method for getting them now is accessing each page one at a time, filtering the results, and adding to a db, that is exactly what the program would do.

#5
HR19

HR19

    Newbie

  • Members
  • Pip
  • 4 posts
Mk. Thanks. Well, I'm really glad HTML pages are just text, because that will make this pretty easy.

#6
Momerath

Momerath

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 243 posts
Don't be surprised when they block your IP :)

#7
HR19

HR19

    Newbie

  • Members
  • Pip
  • 4 posts
For going through like 10 pages to get the Scars of Mirrodin stuff? o_O I already have a DB with everything else, I just need to update it with Scars of Mirrodin.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users