megasena

Megasena results parser.


License
Other
Install
pip install megasena==0.3.1

Documentation

megasena

megasena is as python module that allows the download and encoding of the results into other formats (from the original html table).

Usage example:

>>> from megasena import megasena
>>> m = megasena.Megasena()
>>> m.get_results()
>>> m.parse_results()
>>> print m.most_drawn_number_by_position()
{
    "04": 40, 
    "05": 42, 
    "27": 39, 
    "29": 38, 
    "12": 35, 
    "30": 38
}
>>> print m.most_drawn_number_by_contest()
{
    "05": 192, 
    "04": 187, 
    "53": 183, 
    "42": 177,
    ...
    "09": 141, 
    "26": 132, 
    "22": 132
}
>>> mynumbers = [4, 5, 30, 33, 41, 52]
>>> m.check_drawn_dozens(mynumbers)
[u'1']