c99koder / personal-influxdb

Import data from various APIs into InfluxDB
Apache License 2.0
263 stars 36 forks source link

steam.py issue #27

Closed sahara101 closed 1 year ago

sahara101 commented 1 year ago

Hey :)

I have installed influxv1 and running steam.py I get:

2023-08-23 02:50:52,360 Connecting to localhost:8086 2023-08-23 02:50:52,361 Starting new HTTP connection (1): localhost:8086 2023-08-23 02:50:52,363 http://localhost:8086 "POST /query?q=CREATE+DATABASE+%22gaming%22 HTTP/1.1" 200 None 2023-08-23 02:50:52,364 Connected to localhost:8086 2023-08-23 02:50:52,365 http://localhost:8086 "GET /query?q=SELECT+last%28%22total%22%29+AS+%22total%22+FROM+%22time%22+WHERE+%22platform%22+%3D+%27Steam%27+AND+%22total%22+%3E+0+AND+%22player_id%22+%3D+%2790175600927979536%27+GROUP+BY+%22application_id%22+ORDER+BY+%22time%22+DESC&db=gaming HTTP/1.1" 200 None 2023-08-23 02:50:52,367 Starting new HTTPS connection (1): steamcommunity.com:443 2023-08-23 02:50:52,792 https://steamcommunity.com:443 "GET /id//games/?tab=all HTTP/1.1" 200 6311 2023-08-23 02:50:52,803 Uncaught exception: Traceback (most recent call last): File "/root/steam.py", line 85, in recents = scrape_recents() File "/root/steam.py", line 79, in scrape_recents data = soup.find('script', string=re.compile('var rgGames = [{')).string AttributeError: 'NoneType' object has no attribute 'string'

Any idea?

Thanks!

c99koder commented 1 year ago

You haven't set the variables in the configuration file. You need to set your steam username and the other required parameters.

c99koder commented 1 year ago

Open Steam and click on your username in the header and then click on "Profile". It should open a page with a URL like https://steamcommunity.com/id/..., your username is what comes after the /id/ in the URL.