Steam Workshop ¶
Scrape Steam Workshop Data
logger = logging.getLogger(__name__)
module-attribute
¶
REQUEST_TIMEOUT = (25, 30)
module-attribute
¶
GET_SERVER_INFO_URL = 'https://api.steampowered.com/ISteamWebAPIUtil/GetServerInfo/v1/'
module-attribute
¶
get_server_info(api_key)
¶
Fetch server information from the Steam Web API
Source code in api/steam_workshop.py
is_server_online(api_key)
¶
Check if the server is online based on the GetServerInfo response
extract_links(workshop_items)
¶
Extract links from workshop items
has_next_page(soup)
¶
Check if there is a next page
Source code in api/steam_workshop.py
handle_request_exception(e)
¶
Handle request exceptions
Source code in api/steam_workshop.py
fetch_workshop_item_links(steam_id, api_key)
¶
Fetch each workshop item's link, navigating through all pages
Source code in api/steam_workshop.py
parse_stats_table(stats_table)
¶
Parse the stats table and return a dictionary of stats
Source code in api/steam_workshop.py
fetch_individual_workshop_stats(item_url)
¶
Fetch Author Stats from a Workshop Item
Source code in api/steam_workshop.py
fetch_all_workshop_stats(item_links)
¶
Fetch Stats for all of the items in Steam User's Workshop
Source code in api/steam_workshop.py
Source Code ¶
View the complete source code for this module on GitHub: api/steam_workshop.py