Skip to content

Instantly share code, notes, and snippets.

@n1trux
Created April 23, 2018 05:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n1trux/b8e530ce8e6ac22c37019f8104f9bc32 to your computer and use it in GitHub Desktop.
Save n1trux/b8e530ce8e6ac22c37019f8104f9bc32 to your computer and use it in GitHub Desktop.
Count Linux games on SteamDB
#!/usr/bin/python3
from lxml import html
import requests
gamecount = int(html.fromstring(requests.get('https://steamdb.info/linux/').content).xpath('//nav[@class="tabnav-tabs"]/*/span[@class="counter"]/text()')[0].replace(',',''))
print(gamecount)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment