Category Archives: VtM Rivals Deckbuilder Project

A VtM Rivals Deckbuilder #2

Between work and Portal coming to the Switch (see my “the cake is a lie” posts) I’ve not had much chance to work on this project.

However I found a little time yesterday to look at my first hurdle in getting to that sweet sweet card data, getting passed the login screen.

My Python code

The main problem with the login was extracting the hidden token from the page to pass into the login payload.

I know the login is working because I get the “<Response [200]>”. Which means it has been successful.

However when I try and get the database page all I get is the login page back. So now that’s my next hurdle. I’ve logged in, now to get the database page back. Oh and I need to get rid of those two warnings. They may not solve the problem I have but getting rid of them won’t hurt.

See you on the next post when I have something to report.

A VtM Rivals Deckbuilder #1

Temptation got the better of me. Well for the moment.

Let’s face it the odds of this being completed are low. There is a lot working against it. One of the main forces working against it is that I start nights for the next two and a half weeks. Basically my shift is 8pm to 5am. This starts tonight.

In the meantime let’s pretend I’m doing stuff.

So before you start building a deckbuilding app of any kind you need a card database. I know it seems obvious, but still.

There are a handful of options of getting one.

  • An official source – yep I could approach Renegade and ask them if they’d let me have the data. Not very likely, plus there might be a lot of legal paper stuff to sign.
  • Find a third party source – not a reliable option. You just don’t know how accurate it is. Plus it may not be all the cards available.
  • Enter it manual myself! Life is too short for this.
  • Web scrape the data from the Renegade website. This is the option I’ll be going with.

This morning having given in to temptation I started looking at scraping the data I need from the Renegade website.

I’m actually writing this deckbuilder using Pythonista on an iPad. So that’s Python 3.6 and the libraries that come with it. Which is a more limited set than available on a more open platform.

To scrape the data I’m going to be using the requests library.

Which means I have a steep little learning curve to do, along with refreshing my Python. It’s not as if I use this stuff daily, especially web scraping using the requests library.

The first hurdle to overcome before I can get to scraping the data I need is getting passed the login screen. To be able to get to the deckbuilding page you have to be logged in.

So that’s my first bit of focused Python and requests learning.

More soon (hopefully).