I'm trying to scrape some game files off a chess site in Python and I've run into a problem. My plan is to lift off all the game ids from the html and plug them into some url to download them. The hard part is actually getting the game ids.
The relevant html looks something like this:
<a class="games right-4" href="/livechess/game?id=1012106017"> View</a>
<a class="games right-4" href="/livechess/game?id=982464559"> View</a>
<a class="games right-4" href="/livechess/game?id=1011988271"> View</a>
I'm interested in the id=...
part. Also, there are no other occurrences beginning with /livechess/...
in the page.
How can I extract these ids using regular expressions? I've tried reading up some stuff but it's confusing me more than it's helping.