As we need to start from something, let's pick a battle page to test our code on – Operation Skorpion (en.wikipedia.org//wiki/Operation_Skorpion). The following is a screenshot of the page, with the areas in which we're interested highlighted in red:
First, we can use the function we wrote in the earlier section to collect the page as a dom object:
url = 'https://en.wikipedia.org/wiki/Opeation_Scorpion'
dom = get_dom(url)
Next, as in the previous case, we select the larger container that stores all the information we're interested in – in this case, the info card (the larger, dotted red rectangle on the screenshot). All the information we're interested in (dates, location, outcomes, belligerents, and casualties) is there, below the map:
table = dom.find('table','infobox vevent')
Now that we have the card, all we need is to pull all the information out of it, which we'll do in the next section.