I am scraping information from the following website: "http://www.mobygames.com/game/wheelman/view-moby-score". Here is my code
url_credit = "http://www.mobygames.com/game/wheelman/view-moby-score"
response = requests.get(url_credit, headers=headers)
soup = BeautifulSoup(response.text, "lxml")
table = soup.find("table", class_="reviewList table table-striped table-condensed table-hover").select('tr[valign="top"]')
for row in table[1:]:
print(row)
x = soup.select('td[class="left"]').get("colspan")
My desired output is something like this:
platform total_votes rating_category score total_score
PlayStation3 None None None None
Windows 6 Acting 4.2 4.1
Windows 6 AI 3.7 4.1
Windows 6 Gameplay 4.0 4.1
The main problem is having platform name on the platform column for corresponding observations. How could I get it?