A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
hermaj's new favourite
Posts: 2353
Joined: Wed Sep 12, 2007 1:59 am UTC
Location: Domain of Azura


Postby superglucose » 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 :P

User avatar
Posts: 1378
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: Scripting

Postby Cleverbeans » Thu Feb 13, 2014 3:27 pm UTC

Check the sticky "New To Coding" it's full of resources.
"Labor is prior to, and independent of, capital. Capital is only the fruit of labor, and could never have existed if labor had not first existed. Labor is the superior of capital, and deserves much the higher consideration." - Abraham Lincoln

Posts: 171
Joined: Thu Nov 01, 2012 1:44 pm UTC

Re: Scripting

Postby DR6 » 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.

Posts: 138
Joined: Mon Mar 02, 2009 4:02 pm UTC

Re: Scripting

Postby Nyktos » 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.)

User avatar
Posts: 152
Joined: Sat Feb 16, 2013 1:46 pm UTC

Re: Scripting

Postby 3rdtry » 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.

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 5 guests