Page 1 of 1
Posted: Wed Feb 12, 2014 10:25 pm UTC
Can anyone recommend a guide or tutorial for scripting? I just embarked on a project in which I will hopefully find a solution for Magic: The Gathering. First step is data collection and I'd like to be able to make a script that can troll MTG's website and Star City Games (and perhaps MTGO) to get decklists, then parse the decklists down to data which is automagically sorted.
Yes, yes, it's complicated, but it'll be fun
Posted: Thu Feb 13, 2014 3:27 pm UTC
Check the sticky "New To Coding" it's full of resources.
Posted: Mon Feb 17, 2014 5:14 pm UTC
... however that link alone has too many resources and you'll get lost if you don't know what you're looking for. If you don't know absolutely anything, Python is a good language to start, and IMO it's the fittes for what you want, so I'd learn that first. It also has tons of libraries, and you'll probably want one for HTML parsing or something, so that's good.
Posted: Sun Feb 23, 2014 4:35 am UTC
In particular the usual library of choice for doing this in Python is Beautiful Soup
. (Disclaimer: I haven't used it for anything nontrivial myself.)
Posted: Sun Feb 23, 2014 9:32 pm UTC
Also, if you want to do anything that gets data from the internet in Python, use requests
. Not the built-in library, or you'll go crazy trying to figure out how to do basic stuff.