use python to calc lottery ratio and fetch data from web