Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
[
{
"TIMESTAMP": "2018-09-17 00:09:21.499540",
"id": 910569150160041,
"name": "A Rus vs V Flink",
"sport-id": 9,
"start": "2018-09-17T02:00:00.000Z",
"in-running-flag": false,
"allow-live-betting": true,
"category-id": [
[
{
"TIMESTAMP": "2018-09-05 22:59:44.398534",
"id": 900652866170042,
"name": "C Suarez Navarro vs M Keys",
"sport-id": 9,
"start": "2018-09-05T23:10:00.000Z",
"in-running-flag": false,
"allow-live-betting": true,
"category-id": [
update_bf.py
from trader.tasks import BFCommand
import sys
class Command(BFCommand):
help = 'Refreshes betfair NI data'
def handle(self, *args, **options):
self.betfair_get(False,0)
sys.exit()
from __future__ import absolute_import , unicode_literals
import requests
import django
from betfairlightweight.endpoints import Betting
django.setup()
import datetime
import logging
import re
import bz2
import os
import fileinput
from betfairlightweight import APIClient
from betfairlightweight.streaming import StreamListener, MarketStream
import csv
import pandas
class HistoricalStream(MarketStream):
def __init__(self, listener):