jeysonm82 / ir_webstats Goto Github PK
View Code? Open in Web Editor NEWiRacing python client interface to access drivers and series stats and results.
iRacing python client interface to access drivers and series stats and results.
Hey folks, just a note here if you've found this repo it appears to be dead.
The fine folks at iGPFun (myself included) have picked this library up and have reworked it to be more sane, secure, and efficient.
Please see the stats
submodule of https://github.com/a-tal/irace for an updated version of this Client
. Note that the updated version only supports python3
, as python2
is EOL in a matter of days (Jan 1, 2020).
When trying to get cars_driven()
:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
</head>
<body>
You are not authorized.
</body>
</html>
This is probably due to all http
urls stored in constants.py
.
After logging in, I try to get event results with
irw.event_results(16206499)
This is the error I get:
TypeError Traceback (most recent call last)
<ipython-input-11-0759defbe2a6> in <module>()
----> 1 irw.event_results(16206499)
<decorator-gen-139> in event_results(self, subsession, sessnum)
C:\Users\Mathieu\Development\iracing-test\ir_webstats\util.py in __logged_in(func, *args, **kw)
35 args2[1] = args2[1] if args2[1] is not None else irweb.custid
36
---> 37 return func(*args2, **kw)
38
39
C:\Users\Mathieu\Development\iracing-test\ir_webstats\client.py in event_results(self, subsession, sessnum)
462 r = self.__req(ct.URL_GET_EVENTRESULTS % (subsession, sessnum))\
463 .encode('utf8')
--> 464 data = [x for x in csv.reader(StringIO(r), delimiter=',',
465 quotechar='"')]
466 header_ev, header_res = data[0], data[3]
TypeError: initial_value must be str or None, not bytes
Using python 3.5 on Windows 10.
I'm attempting to limit the number of event results returned to just the last couple of days:
r = irw.results_archive(event_types=(ct.EVENT_RACE,), date_range=('2014-07-16','2014-07-18'))
print(r[1])
That prints out 76, which is my total number of races ever.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.