Your Name 6 سال پیش
کامیت
4bfc93988e
79فایلهای تغییر یافته به همراه5471 افزوده شده و 0 حذف شده
  1. 7 0
      collectSports/__init__.py
  2. BIN
      collectSports/__pycache__/__init__.cpython-36.pyc
  3. BIN
      collectSports/__pycache__/__init__.cpython-37.pyc
  4. BIN
      collectSports/__pycache__/items.cpython-36.pyc
  5. BIN
      collectSports/__pycache__/items.cpython-37.pyc
  6. BIN
      collectSports/__pycache__/settings.cpython-36.pyc
  7. BIN
      collectSports/__pycache__/settings.cpython-37.pyc
  8. 31 0
      collectSports/biz/__init__.py
  9. BIN
      collectSports/biz/__pycache__/__init__.cpython-36.pyc
  10. BIN
      collectSports/biz/__pycache__/zqleague.cpython-36.pyc
  11. 34 0
      collectSports/biz/zqchain.py
  12. 34 0
      collectSports/biz/zqleague.py
  13. 33 0
      collectSports/biz/zqmatch.py
  14. 3346 0
      collectSports/conf/hg0088.json
  15. 22 0
      collectSports/conf/settings.json
  16. 85 0
      collectSports/items.py
  17. 23 0
      collectSports/main.py
  18. 0 0
      collectSports/mcollect/__init__.py
  19. BIN
      collectSports/mcollect/__pycache__/__init__.cpython-36.pyc
  20. BIN
      collectSports/mcollect/__pycache__/__init__.cpython-37.pyc
  21. 11 0
      collectSports/mcollect/hg0088/LinkPool.py
  22. 40 0
      collectSports/mcollect/hg0088/Resolver.py
  23. 116 0
      collectSports/mcollect/hg0088/Storage.py
  24. 15 0
      collectSports/mcollect/hg0088/__init__.py
  25. BIN
      collectSports/mcollect/hg0088/__pycache__/Resolver.cpython-36.pyc
  26. BIN
      collectSports/mcollect/hg0088/__pycache__/Resolver.cpython-37.pyc
  27. BIN
      collectSports/mcollect/hg0088/__pycache__/Storage.cpython-36.pyc
  28. BIN
      collectSports/mcollect/hg0088/__pycache__/__init__.cpython-36.pyc
  29. BIN
      collectSports/mcollect/hg0088/__pycache__/__init__.cpython-37.pyc
  30. 78 0
      collectSports/mcollect/hg0088/fcache/hg0088.today.js
  31. 144 0
      collectSports/mcollect/hg0088/fcache/hg0088.zaopan.js
  32. 30 0
      collectSports/mcollect/hg0088/fcache/hg0088.zhibo.js
  33. 42 0
      collectSports/mcollect/hg0088/tmpl/chain.tmpl
  34. 46 0
      collectSports/mcollect/hg0088/tmpl/today.tmpl
  35. 60 0
      collectSports/mcollect/hg0088/tmpl/zaopan.tmpl
  36. 25 0
      collectSports/mcollect/hg0088/tmpl/zhibo.tmpl
  37. 0 0
      collectSports/mcollect/hg3535/__init__.py
  38. 103 0
      collectSports/middlewares.py
  39. 0 0
      collectSports/models/__init__.py
  40. BIN
      collectSports/models/__pycache__/__init__.cpython-36.pyc
  41. BIN
      collectSports/models/__pycache__/model.cpython-36.pyc
  42. BIN
      collectSports/models/__pycache__/zqLeague.cpython-36.pyc
  43. 65 0
      collectSports/models/model.py
  44. 6 0
      collectSports/models/zqChain.py
  45. 6 0
      collectSports/models/zqLeague.py
  46. 4 0
      collectSports/models/zqLeagueOut.py
  47. 6 0
      collectSports/models/zqMatch.py
  48. 12 0
      collectSports/pipelines.py
  49. 0 0
      collectSports/pipelines/__init__.py
  50. BIN
      collectSports/pipelines/__pycache__/__init__.cpython-36.pyc
  51. BIN
      collectSports/pipelines/__pycache__/__init__.cpython-37.pyc
  52. BIN
      collectSports/pipelines/__pycache__/sports.cpython-36.pyc
  53. BIN
      collectSports/pipelines/__pycache__/sportslst.cpython-36.pyc
  54. BIN
      collectSports/pipelines/__pycache__/sportslst.cpython-37.pyc
  55. 44 0
      collectSports/pipelines/sports.py
  56. 40 0
      collectSports/pipelines/sportslst.py
  57. 74 0
      collectSports/requirements.txt
  58. 92 0
      collectSports/settings.py
  59. 5 0
      collectSports/spiders/__init__.py
  60. BIN
      collectSports/spiders/__pycache__/__init__.cpython-36.pyc
  61. BIN
      collectSports/spiders/__pycache__/__init__.cpython-37.pyc
  62. BIN
      collectSports/spiders/__pycache__/demo.cpython-36.pyc
  63. BIN
      collectSports/spiders/__pycache__/setdata.cpython-36.pyc
  64. BIN
      collectSports/spiders/__pycache__/sports.cpython-36.pyc
  65. BIN
      collectSports/spiders/__pycache__/sports.cpython-37.pyc
  66. BIN
      collectSports/spiders/__pycache__/sportslst.cpython-36.pyc
  67. BIN
      collectSports/spiders/__pycache__/sportslst.cpython-37.pyc
  68. 20 0
      collectSports/spiders/demo.py
  69. 9 0
      collectSports/spiders/setdata.py
  70. 109 0
      collectSports/spiders/sports.py
  71. 97 0
      collectSports/spiders/sportslst.py
  72. 1 0
      pycomm/.gitignore
  73. 2 0
      pycomm/README.md
  74. 298 0
      pycomm/__init__.py
  75. 88 0
      pycomm/db.py
  76. 56 0
      pycomm/mongo.py
  77. 43 0
      pycomm/redisop.py
  78. 58 0
      pycomm/sqlite.py
  79. 11 0
      scrapy.cfg

+ 7 - 0
collectSports/__init__.py

@@ -0,0 +1,7 @@
+import sys,os
+ROOT_PATH=os.path.dirname(os.path.abspath(__file__))
+sys.path.append(ROOT_PATH+'../pycomm/')
+sys.path.append(ROOT_PATH)
+import pycomm
+sysSettings=pycomm.ldjson(ROOT_PATH+'/conf/settings.json')
+pycomm.setCache('conf',sysSettings)

BIN
collectSports/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/__pycache__/__init__.cpython-37.pyc


BIN
collectSports/__pycache__/items.cpython-36.pyc


BIN
collectSports/__pycache__/items.cpython-37.pyc


BIN
collectSports/__pycache__/settings.cpython-36.pyc


BIN
collectSports/__pycache__/settings.cpython-37.pyc


+ 31 - 0
collectSports/biz/__init__.py

@@ -0,0 +1,31 @@
+import pycomm
+from pycomm import db, redisop, mongo
+
+
+def getCurrentSource():
+    conf = pycomm.getCache('conf')
+    return conf['currentSource']
+
+
+def getMongo():
+    conf = pycomm.getCache('conf')
+    mongoConf = conf['mongo']
+    return mongo.DBMongo(mongoConf['host'], mongoConf['dbname'], mongoConf['user'], mongoConf['password'],
+                         mongoConf['port'])
+
+
+# 得到数据库配置
+def getDB():
+    conf = pycomm.getCache('conf')
+    pConf = conf['pgsql']
+    pdb = db.DB(pConf['host'], pConf['port'], pConf['user'], pConf['password'], pConf['dbname'], 'pgsql')
+    return pdb
+
+
+# 得到redis配置
+def getRedis():
+    conf = pycomm.getCache('conf')
+    rConf = conf['redis']
+    redisobj = redisop.RedisHelper(rConf['host'], rConf['port'], rConf['password'])
+    redisConn = redisobj.getConn()
+    return redisConn

BIN
collectSports/biz/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/biz/__pycache__/zqleague.cpython-36.pyc


+ 34 - 0
collectSports/biz/zqchain.py

@@ -0,0 +1,34 @@
+import biz
+import pycomm
+from biz.baseBiz import baseBiz
+class zqChain(baseBiz):
+    def init(self):
+        self.csrc=biz.getCurrentSource()
+        
+    
+    def getOutUid(self,lgid):
+        return self.csrc+str(lgid)
+    def update(self,data):
+        da={}
+        for i in data:
+            da[i]=data[i]
+        uid=self.getOutUid(da['league_id'])
+        hasLeague=self.getLeague(da['league_id'])
+        da['out_uid']=uid
+        da['src']=self.csrc
+        da['out_league_id']=da['league_id']
+        da.pop('league_id')
+        if hasLeague==-1:
+            self.zqLeague.save(da)
+        else:
+            self.zqLeague.update(da," out_uid='%s'" % uid)
+
+
+    def getLeague(self,oleague_id):
+        cond={}
+        cond['where']="out_uid='%s'" %(self.getOutUid(oleague_id))
+        cond['fields']="league_id"
+        data=self.zqLeague.select(cond)
+        if not data:
+            return -1
+        return data

+ 34 - 0
collectSports/biz/zqleague.py

@@ -0,0 +1,34 @@
+import biz
+import pycomm
+from models.zqLeague import zqLeague as zlm
+class zqLeague(object):
+    def __init__(self):
+        self.csrc=biz.getCurrentSource()
+        self.zqLeague=zlm()
+    
+    def getOutUid(self,lgid):
+        return self.csrc+str(lgid)
+    def update(self,data):
+        da={}
+        for i in data:
+            da[i]=data[i]
+        uid=self.getOutUid(da['league_id'])
+        hasLeague=self.getLeague(da['league_id'])
+        da['out_uid']=uid
+        da['out_league_id']=da['league_id']
+        da.pop('league_id')
+        if hasLeague==-1:
+            self.zqLeague.save(da)
+        else:
+            self.zqLeague.update(da," out_uid='%s'" % uid)
+
+
+    def getLeague(self,oleague_id):
+        cond={}
+        cond['where']="out_uid='%s'" %(self.getOutUid(oleague_id))
+        cond['fields']="league_id"
+        
+        data=self.zqLeague.select(cond)
+        if not data:
+            return -1
+        return data

+ 33 - 0
collectSports/biz/zqmatch.py

@@ -0,0 +1,33 @@
+import biz
+import pycomm
+from models.zqMatch import zqMatch as zlm
+class zqMatch(object):
+    def __init__(self):
+        self.csrc=biz.getCurrentSource()
+        self.zqLeague=zlm()
+    
+    def getOutUid(self,lgid):
+        return self.csrc+str(lgid)
+    def update(self,data):
+        da={}
+        for i in data:
+            da[i]=data[i]
+        uid=self.getOutUid(da['league_id'])
+        hasLeague=self.getLeague(da['league_id'])
+        da['out_uid']=uid
+        da['out_league_id']=da['league_id']
+        da.pop('league_id')
+        if hasLeague==-1:
+            self.zqLeague.save(da)
+        else:
+            self.zqLeague.update(da," out_uid='%s'" % uid)
+
+
+    def getLeague(self,oleague_id):
+        cond={}
+        cond['where']="out_uid='%s'" %(self.getOutUid(oleague_id))
+        cond['fields']="league_id"
+        data=self.zqLeague.select(cond)
+        if not data:
+            return -1
+        return data

+ 3346 - 0
collectSports/conf/hg0088.json

@@ -0,0 +1,3346 @@
+{
+    "root" : [
+    {
+        "plodds": "tema_ball",
+        "prodds": "sw_OUH",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "home_tema_ball_big",
+                "rodds": "ior_OUHO",
+                "ratio": "0",
+                "ratio_name": "ratio_ouho",
+                "latio": "大",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "home_tema_ball_small",
+                "rodds": "ior_OUHU",
+                "ratio": "0",
+                "ratio_name": "ratio_ouhu",
+                "latio": "小",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+            "plodds": "tema_ball",
+            "prodds": "sw_OUH",
+            "enabled": 0,
+            "items": [
+                {
+                    "lodds": "guest_tema_ball_big",
+                    "rodds": "ior_OUCO",
+                    "ratio": "0",
+                    "ratio_name": "ratio_ouco",
+                    "latio": "大",
+                    "oddsv": "",
+                    "handle": "",
+                    "uid": ""
+                },
+                {
+                    "lodds": "guest_tema_ball_small",
+                    "rodds": "ior_OUCU",
+                    "ratio": "0",
+                    "ratio_name": "ratio_oucu",
+                    "latio": "小",
+                    "oddsv": "",
+                    "handle": "",
+                    "uid": ""
+                }
+            ]
+        },
+    {
+        "plodds": "sw_WM",
+        "prodds": "sw_WM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_WMH1",
+                "rodds": "ior_WMH1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMH2",
+                "rodds": "ior_WMH2",
+                "ratio": "",
+                "latio": "",
+                "ratio_name": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMH3",
+                "rodds": "ior_WMH3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMHOV",
+                "rodds": "ior_WMHOV",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMC1",
+                "rodds": "ior_WMC1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMC2",
+                "rodds": "ior_WMC2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMC3",
+                "rodds": "ior_WMC3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMCOV",
+                "rodds": "ior_WMCOV",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WM0",
+                "rodds": "ior_WM0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WMN",
+                "rodds": "ior_WMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DC",
+        "prodds": "sw_DC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DCHN",
+                "rodds": "ior_DCHN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DCCN",
+                "rodds": "ior_DCCN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DCCN",
+                "rodds": "ior_DCCN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_W3",
+        "prodds": "sw_W3",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_W3H",
+                "rodds": "ior_W3H",
+                "ratio": "",
+                "ratio_name": "ratio_w3h",
+                "latio": "+1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_W3C",
+                "rodds": "ior_W3C",
+                "ratio": "",
+                "ratio_name": "ratio_w3c",
+                "latio": "-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_W3N",
+                "rodds": "ior_W3N",
+                "ratio": "",
+                "ratio_name": "ratio_w3n",
+                "latio": "+1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_CS",
+        "prodds": "sw_CS",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_CSH",
+                "rodds": "ior_CSH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_CSC",
+                "rodds": "ior_CSC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_CS",
+        "prodds": "sw_CS",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_WNH",
+                "rodds": "ior_WNH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WNC",
+                "rodds": "ior_WNC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_WB",
+        "prodds": "sw_WB",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_WBH",
+                "rodds": "ior_WBH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WBC",
+                "rodds": "ior_WBC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_WE",
+        "prodds": "sw_WE",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_WEH",
+                "rodds": "ior_WEH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_WEC",
+                "rodds": "ior_WEC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_WE",
+        "prodds": "sw_WE",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_SBH",
+                "rodds": "ior_SBH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_SBC",
+                "rodds": "ior_SBC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_HG",
+        "prodds": "sw_HG",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_HGH",
+                "rodds": "ior_HGH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "上半场",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_HGC",
+                "rodds": "ior_HGC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "下半场",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MG",
+        "prodds": "sw_MG",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MGH",
+                "rodds": "ior_MGH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "上半场",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MGC",
+                "rodds": "ior_MGC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "下半场",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MGN",
+                "rodds": "ior_MGN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "和局",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_T1G",
+        "prodds": "sw_T1G",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_T1G1",
+                "rodds": "ior_T1G1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "上半场开场-14:59分钟",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1G2",
+                "rodds": "ior_T1G2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "15:00分钟-29:59分钟",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1G3",
+                "rodds": "ior_T1G3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "30:00分钟-半场",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1G4",
+                "rodds": "ior_T1G4",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "下半场开场-59:59分钟",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1G5",
+                "rodds": "ior_T1G5",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "60:00分钟-74:59分钟",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1G6",
+                "rodds": "ior_T1G6",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "75:00分钟-全场完场",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1GN",
+                "rodds": "ior_T1GN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "无进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_T3G",
+        "prodds": "sw_T3G",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_T1GN",
+                "rodds": "ior_T1GN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "第26分钟或之前",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1GN",
+                "rodds": "ior_T1GN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "第27分钟或之后",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_T1GN",
+                "rodds": "ior_T1GN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "无进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "concede",
+        "prodds": "sw_T3G",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "concede_home",
+                "rodds": "ior_RH",
+                "ratio": "",
+                "ratio_name": "ratio",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "concede_guest",
+                "rodds": "ior_RC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "concede",
+        "prodds": "sw_HR",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_concede_home",
+                "rodds": "ior_HRH",
+                "ratio": "",
+                "ratio_name": "hratio",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_concede_guest",
+                "rodds": "ior_HRC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "goal_size",
+        "prodds": "sw_OU",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "goal_size_big",
+                "rodds": "ior_OUC",
+                "ratio": "",
+                "ratio_name": "ratio_u",
+                "latio": "大",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "goal_size_small",
+                "rodds": "ior_OUH",
+                "ratio": "",
+                "ratio_name": "ratio_o",
+                "latio": "小",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "goal_size",
+        "prodds": "sw_HOU",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_goal_size_small",
+                "rodds": "ior_HOUH",
+                "ratio": "",
+                "ratio_name": "ratio_ho",
+                "latio": "小",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_goal_size_big",
+                "rodds": "ior_HOUC",
+                "ratio": "",
+                "ratio_name": "ratio_hu",
+                "latio": "大",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_M",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "capot_home",
+                "rodds": "ior_MH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "capot_guest",
+                "rodds": "ior_MC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "capot_dogfall",
+                "rodds": "ior_MN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_HM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_capot_home",
+                "rodds": "ior_HMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_capot_guest",
+                "rodds": "ior_HMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_capot_dogfall",
+                "rodds": "ior_HMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "bodan",
+        "prodds": "sw_PD",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "bodanhome_one_zero",
+                "rodds": "ior_H1C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_two_zero",
+                "rodds": "ior_H2C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_two_one",
+                "rodds": "ior_H2C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_three_zero",
+                "rodds": "ior_H3C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_three_one",
+                "rodds": "ior_H3C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_three_two",
+                "rodds": "ior_H3C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_four_zero",
+                "rodds": "ior_H4C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "4-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_four_one",
+                "rodds": "ior_H4C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "4-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_four_two",
+                "rodds": "ior_H4C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "4-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanhome_four_three",
+                "rodds": "ior_H4C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "4-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_one_zero",
+                "rodds": "ior_H0C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_two_zero",
+                "rodds": "ior_H0C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_two_one",
+                "rodds": "ior_H1C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_three_zero",
+                "rodds": "ior_H0C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_three_one",
+                "rodds": "ior_H1C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_three_two",
+                "rodds": "ior_H2C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_four_zero",
+                "rodds": "ior_H0C4",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-4",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_four_one",
+                "rodds": "ior_H1C4",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-4",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_four_two",
+                "rodds": "ior_H2C4",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-4",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanguest_four_three",
+                "rodds": "ior_H3C4",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-4",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodandogfall_zero_zero",
+                "rodds": "ior_H0C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodandogfall_one_one",
+                "rodds": "ior_H1C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodandogfall_two_two",
+                "rodds": "ior_H2C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodandogfall_three_three",
+                "rodds": "ior_H3C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodandogfall_four_four",
+                "rodds": "ior_H4C4",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "4-4",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanother",
+                "rodds": "ior_OVH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "其他",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "bodanother",
+                "rodds": "ior_OVC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "其他",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "bodan",
+        "prodds": "sw_HPD",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "halfbodanhome_one_zero",
+                "rodds": "ior_HH1C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanhome_two_zero",
+                "rodds": "ior_HH2C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanhome_two_one",
+                "rodds": "ior_HH2C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanhome_three_zero",
+                "rodds": "ior_HH3C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanhome_three_one",
+                "rodds": "ior_HH3C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanhome_three_two",
+                "rodds": "ior_HH3C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanguest_one_zero",
+                "rodds": "ior_HH0C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanguest_two_zero",
+                "rodds": "ior_HH0C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanguest_two_one",
+                "rodds": "ior_HH1C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanguest_three_zero",
+                "rodds": "ior_HH0C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanguest_three_one",
+                "rodds": "ior_HH1C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanguest_three_two",
+                "rodds": "ior_HH2C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodandogfall_zero_zero",
+                "rodds": "ior_HH0C0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodandogfall_one_one",
+                "rodds": "ior_HH1C1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodandogfall_two_two",
+                "rodds": "ior_HH2C2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodandogfall_three_three",
+                "rodds": "ior_HH3C3",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanother",
+                "rodds": "ior_HOVH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "其他",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "halfbodanother",
+                "rodds": "ior_HOVC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "其他",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_AM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "",
+                "rodds": "ior_AMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "",
+                "rodds": "ior_AMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "",
+                "rodds": "ior_AMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "total_goal",
+        "prodds": "sw_T",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "total_goal_zero",
+                "rodds": "ior_T01",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0-1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "total_goal_two",
+                "rodds": "ior_T23",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2-3",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "total_goal_four",
+                "rodds": "ior_T46",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "4-6",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "total_goal_seven",
+                "rodds": "ior_OVER",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "7或以上",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "total_goal",
+        "prodds": "sw_HT",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_total_goal_zero",
+                "rodds": "ior_HT0",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "0",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_total_goal_one",
+                "rodds": "ior_HT1",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_total_goal_two",
+                "rodds": "ior_HT2",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_total_goal_three",
+                "rodds": "ior_HTOV",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "3或以上",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_TS",
+        "prodds": "sw_TS",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_TSY",
+                "rodds": "ior_TSY",
+                "ratio": "",
+                "ratio_name": "ratio_tsy",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_TSN",
+                "rodds": "ior_TSN",
+                "ratio": "",
+                "ratio_name": "ratio_tsn",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_HTS",
+        "prodds": "sw_HTS",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_HTSY",
+                "rodds": "ior_HTSY",
+                "ratio": "",
+                "ratio_name": "ratio_htsy",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "",
+                "rodds": "ior_HTSN",
+                "ratio": "",
+                "ratio_name": "ratio_htsn",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "tema_ball",
+        "prodds": "sw_HOUH",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_home_tema_ball_big",
+                "rodds": "ior_HOUHO",
+                "ratio": "",
+                "ratio_name": "ratio_houho",
+                "latio": "大",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_home_tema_ball_small",
+                "rodds": "ior_HOUHU",
+                "ratio": "",
+                "ratio_name": "ratio_houhu",
+                "latio": "小",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "tema_ball",
+        "prodds": "sw_HOUC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_guest_tema_ball_big",
+                "rodds": "ior_HOUCO",
+                "ratio": "",
+                "ratio_name": "ratio_houco",
+                "latio": "大",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_guest_tema_ball_small",
+                "rodds": "ior_HOUCU",
+                "ratio": "",
+                "ratio_name": "ratio_houcu",
+                "latio": "小",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "two_sides",
+        "prodds": "sw_EO",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "two_sides_single",
+                "rodds": "ior_EOO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "单",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "two_sides_double",
+                "rodds": "ior_EOE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "双",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "two_sides",
+        "prodds": "sw_HEO",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_two_sides_single",
+                "rodds": "ior_HEOO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "单",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_two_sides_double",
+                "rodds": "ior_HEOE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "双",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "first_last_ball",
+        "prodds": "ior_PGFH",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "first_ball_home",
+                "rodds": "ior_PGFH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "first_ball_guest",
+                "rodds": "ior_PGFC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "not_ball",
+                "rodds": "ior_PGFN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "没有进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "last_ball_home",
+                "rodds": "ior_PGLH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最后进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "last_ball_guest",
+                "rodds": "ior_PGLC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最后进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "half_full",
+        "prodds": "sw_F",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "half_full_home_home",
+                "rodds": "ior_FHH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "主主",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_home_dogfall",
+                "rodds": "ior_FHN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "主和",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_home_guest",
+                "rodds": "ior_FHC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "主客",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_dogfall_home",
+                "rodds": "ior_FNH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "和主",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_dogfall_dogfall",
+                "rodds": "ior_FNN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "和和",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_dogfall_guest",
+                "rodds": "ior_FNC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "和客",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_guest_home",
+                "rodds": "ior_FCH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "客主",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_guest_dogfall",
+                "rodds": "ior_FCN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "客和",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "half_full_guest_guest",
+                "rodds": "ior_FCC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "客客",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MOUA",
+        "prodds": "sw_MOUA",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MOUAHO",
+                "rodds": "ior_MOUAHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUAHU",
+                "rodds": "ior_MOUAHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUACO",
+                "rodds": "ior_MOUACO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUACU",
+                "rodds": "ior_MOUACU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUANO",
+                "rodds": "ior_MOUANO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUANU",
+                "rodds": "ior_MOUANU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MOUB",
+        "prodds": "sw_MOUB",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MOUBHO",
+                "rodds": "ior_MOUBHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUBHU",
+                "rodds": "ior_MOUBHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUBCO",
+                "rodds": "ior_MOUBCO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUBCU",
+                "rodds": "ior_MOUBCU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUBNO",
+                "rodds": "ior_MOUBNO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUBNU",
+                "rodds": "ior_MOUBNU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MOUC",
+        "prodds": "sw_MOUC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MOUCHO",
+                "rodds": "ior_MOUCHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUCHU",
+                "rodds": "ior_MOUCHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUCCO",
+                "rodds": "ior_MOUCCO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUCCU",
+                "rodds": "ior_MOUCCU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUCNO",
+                "rodds": "ior_MOUCNO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUCNU",
+                "rodds": "ior_MOUCNU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MOUD",
+        "prodds": "sw_MOUD",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MOUDHO",
+                "rodds": "ior_MOUDHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUDHU",
+                "rodds": "ior_MOUDHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUDCO",
+                "rodds": "ior_MOUDCO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUDCU",
+                "rodds": "ior_MOUDCU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUDNO",
+                "rodds": "ior_MOUDNO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MOUDNU",
+                "rodds": "ior_MOUDNU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MTS",
+        "prodds": "sw_MTS",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MTSHY",
+                "rodds": "ior_MTSHY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MTSHN",
+                "rodds": "ior_MTSHN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MTSCY",
+                "rodds": "ior_MTSCY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MTSCN",
+                "rodds": "ior_MTSCN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MTSNY",
+                "rodds": "ior_MTSNY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MTSNN",
+                "rodds": "ior_MTSNN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUTA",
+        "prodds": "sw_OUTA",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUTAOY",
+                "rodds": "ior_OUTAOY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTAON",
+                "rodds": "ior_OUTAON",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTAUY",
+                "rodds": "ior_OUTAUY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTAUN",
+                "rodds": "ior_OUTAUN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUTB",
+        "prodds": "sw_OUTB",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUTBOY",
+                "rodds": "ior_OUTBOY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTBON",
+                "rodds": "ior_OUTBON",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTBUY",
+                "rodds": "ior_OUTBUY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTBUN",
+                "rodds": "ior_OUTBUN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUTC",
+        "prodds": "sw_OUTC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUTCOY",
+                "rodds": "ior_OUTCOY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTCON",
+                "rodds": "ior_OUTCON",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTCUY",
+                "rodds": "ior_OUTCUY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTCUN",
+                "rodds": "ior_OUTCUN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUTD",
+        "prodds": "sw_OUTD",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUTDOY",
+                "rodds": "ior_OUTDOY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTDON",
+                "rodds": "ior_OUTDON",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTDUY",
+                "rodds": "ior_OUTDUY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUTDUN",
+                "rodds": "ior_OUTDUN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_MPG",
+        "prodds": "sw_MPG",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_MPGHH",
+                "rodds": "ior_MPGHH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MPGHC",
+                "rodds": "ior_MPGHC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MPGCH",
+                "rodds": "ior_MPGCH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MPGCC",
+                "rodds": "ior_MPGCC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MPGNH",
+                "rodds": "ior_MPGNH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_MPGNC",
+                "rodds": "ior_MPGNC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_F2G",
+        "prodds": "sw_F2G",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_F2GH",
+                "rodds": "ior_F2GH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "先进2球的一方",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_F2GC",
+                "rodds": "ior_F2GC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "先进2球的一方",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_F3G",
+        "prodds": "sw_F3G",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_F3GH",
+                "rodds": "ior_F3GH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "先进3球的一方",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_F3GC",
+                "rodds": "ior_F3GC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "先进3球的一方",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_FG",
+        "prodds": "sw_FG",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_FGS",
+                "rodds": "ior_FGS",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "射门",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FGH",
+                "rodds": "ior_FGH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "头球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FGN",
+                "rodds": "ior_FGN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "无进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FGP",
+                "rodds": "ior_FGP",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "点球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FGF",
+                "rodds": "ior_FGF",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "任意球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FGO",
+                "rodds": "ior_FGO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "乌龙球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DUA",
+        "prodds": "sw_DUA",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DUAHO",
+                "rodds": "ior_DUAHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUAHU",
+                "rodds": "ior_DUAHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUACO",
+                "rodds": "ior_DUACO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUACU",
+                "rodds": "ior_DUACU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUASO",
+                "rodds": "ior_DUASO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUASU",
+                "rodds": "ior_DUASU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DUB",
+        "prodds": "sw_DUB",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DUBHO",
+                "rodds": "ior_DUBHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUBHU",
+                "rodds": "ior_DUBHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUBCO",
+                "rodds": "ior_DUBCO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUBCU",
+                "rodds": "ior_DUBCU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUBSO",
+                "rodds": "ior_DUBSO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUBSU",
+                "rodds": "ior_DUBSU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DUC",
+        "prodds": "sw_DUC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DUCHO",
+                "rodds": "ior_DUCHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUCHU",
+                "rodds": "ior_DUCHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUCCO",
+                "rodds": "ior_DUCCO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUCCU",
+                "rodds": "ior_DUCCU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUCSO",
+                "rodds": "ior_DUCSO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUCSU",
+                "rodds": "ior_DUCSU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DUD",
+        "prodds": "sw_DUD",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DUDHO",
+                "rodds": "ior_DUDHO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUDHU",
+                "rodds": "ior_DUDHU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUDCO",
+                "rodds": "ior_DUDCO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUDCU",
+                "rodds": "ior_DUDCU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUDSO",
+                "rodds": "ior_DUDSO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DUDSU",
+                "rodds": "ior_DUDSU",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DS",
+        "prodds": "sw_DS",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DSHY",
+                "rodds": "ior_DSHY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DSHN",
+                "rodds": "ior_DSHN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DSCY",
+                "rodds": "ior_DSCY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DSCN",
+                "rodds": "ior_DSCN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DSSY",
+                "rodds": "ior_DSSY",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DSSN",
+                "rodds": "ior_DSSN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "不是",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_DG",
+        "prodds": "sw_DG",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DGHH",
+                "rodds": "ior_DGHH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DGHC",
+                "rodds": "ior_DGHC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DGCH",
+                "rodds": "ior_DGCH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DGCC",
+                "rodds": "ior_DGCC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DGSH",
+                "rodds": "ior_DGSH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DGSC",
+                "rodds": "ior_DGSC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "最先进球",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUEA",
+        "prodds": "sw_OUEA",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUEAOO",
+                "rodds": "ior_OUEAOO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEAOE",
+                "rodds": "ior_OUEAOE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEAUO",
+                "rodds": "ior_OUEAUO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEAUE",
+                "rodds": "ior_OUEAUE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUEB",
+        "prodds": "sw_OUEB",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUEBOO",
+                "rodds": "ior_OUEBOO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEBOE",
+                "rodds": "ior_OUEBOE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEBUO",
+                "rodds": "ior_OUEBUO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEBUE",
+                "rodds": "ior_OUEBUE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUEC",
+        "prodds": "sw_OUEC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUECOO",
+                "rodds": "ior_OUECOO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUECOE",
+                "rodds": "ior_OUECOE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUECUO",
+                "rodds": "ior_OUECUO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUECUE",
+                "rodds": "ior_OUECUE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUED",
+        "prodds": "sw_OUED",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUEDOO",
+                "rodds": "ior_OUEDOO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEDOE",
+                "rodds": "ior_OUEDOE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEDUO",
+                "rodds": "ior_OUEDUO",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUEDUE",
+                "rodds": "ior_OUEDUE",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUPA",
+        "prodds": "sw_OUPA",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUPAOH",
+                "rodds": "ior_OUPAOH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPAOC",
+                "rodds": "ior_OUPAOC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPAUH",
+                "rodds": "ior_OUPAUH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPAUC",
+                "rodds": "ior_OUPAUC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小1.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUPB",
+        "prodds": "sw_OUPB",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUPBOH",
+                "rodds": "ior_OUPBOH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPBOC",
+                "rodds": "ior_OUPBOC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPBUH",
+                "rodds": "ior_OUPBUH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPBUC",
+                "rodds": "ior_OUPBUC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小2.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUPC",
+        "prodds": "sw_OUPC",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUPCOH",
+                "rodds": "ior_OUPCOH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPCOC",
+                "rodds": "ior_OUPCOC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPCUH",
+                "rodds": "ior_OUPCUH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPCUC",
+                "rodds": "ior_OUPCUC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小3.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_OUPD",
+        "prodds": "sw_OUPD",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_OUPDOH",
+                "rodds": "ior_OUPDOH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPDOC",
+                "rodds": "ior_OUPDOC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPDUH",
+                "rodds": "ior_OUPDUH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "大4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_OUPDUC",
+                "rodds": "ior_OUPDUC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "小4.5",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "sw_BH",
+        "prodds": "sw_BH",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_BHH",
+                "rodds": "ior_BHH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_BHC",
+                "rodds": "ior_BHC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_BM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_BMH",
+                "rodds": "ior_BMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_BMC",
+                "rodds": "ior_BMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_BMN",
+                "rodds": "ior_BMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_CM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_CMH",
+                "rodds": "ior_CMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_CMC",
+                "rodds": "ior_CMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_CMN",
+                "rodds": "ior_CMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_DM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_DMH",
+                "rodds": "ior_DMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DMC",
+                "rodds": "ior_DMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_DMN",
+                "rodds": "ior_DMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_EM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_EMH",
+                "rodds": "ior_EMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_EMC",
+                "rodds": "ior_EMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_EMN",
+                "rodds": "ior_EMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    },
+    {
+        "plodds": "capot",
+        "prodds": "sw_FM",
+        "enabled": 0,
+        "items": [
+            {
+                "lodds": "ior_FMH",
+                "rodds": "ior_FMH",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "1",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FMC",
+                "rodds": "ior_FMC",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "2",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            },
+            {
+                "lodds": "ior_FMN",
+                "rodds": "ior_FMN",
+                "ratio": "",
+                "ratio_name": "",
+                "latio": "X",
+                "oddsv": "",
+                "handle": "",
+                "uid": ""
+            }
+        ]
+    }
+    ]
+}

+ 22 - 0
collectSports/conf/settings.json

@@ -0,0 +1,22 @@
+{
+    "currentSource":"hg0088",
+    "redis":{
+        "host":"",
+        "port":"",
+        "password":""
+    },
+    "mongo":{
+        "host":"192.168.2.200",
+        "port":"27017",
+        "user":"kaiyou",
+        "password":"kaiyou",
+        "dbname":"kaiyou"
+    },
+    "pgsql":{
+        "host":"192.168.33.10",
+        "port":"10432",
+        "user":"postgres",
+        "password":"123456",
+        "dbname":"stcollect"
+    }
+}

+ 85 - 0
collectSports/items.py

@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+
+# Define here the models for your scraped items
+#
+# See documentation in:
+# https://doc.scrapy.org/en/latest/topics/items.html
+
+import scrapy
+
+
+class CollectsportsItem(scrapy.Item):
+    # define the fields for your item here like:
+    zq_league = scrapy.Field()
+    zq_match = scrapy.Field()
+    zq_zhibo = scrapy.Field()
+    zq_chain = scrapy.Field()
+    zq_today = scrapy.Field()
+    csource = scrapy.Field()
+
+
+class ZqToday(scrapy.Item):
+    match_id = scrapy.Field()
+    is_roll = scrapy.Field()
+    is_corner = scrapy.Field()
+
+
+class ZqZhibo(scrapy.Item):
+    game_type = scrapy.Field()  # 类型FT 足球,BK 篮球,vb 排球
+    start_time = scrapy.Field()  # 开始时间
+    host_team = scrapy.Field()  # 主队
+    guest_team = scrapy.Field()  # 客队
+    doing = scrapy.Field()  # 是否进行中
+    showid = scrapy.Field()  # 显示id
+    shower = scrapy.Field()  # 显示类型
+    league_name = scrapy.Field()
+
+
+class ZqLeagueItem(scrapy.Item):
+    content = scrapy.Field()
+    league_name = scrapy.Field()  # 联赛明称
+    league_subname = scrapy.Field()  # 子联赛明称
+    start_time = scrapy.Field()  # 开始时间
+    team_num = scrapy.Field()  # 球队数量
+    game_type = scrapy.Field()  # 联赛类型,FT ,NB
+    uuid = scrapy.Field()
+    league_id = scrapy.Field()
+    # source = scrapy.Field()
+
+
+class ZqMatch(scrapy.Item):
+    match_id = scrapy.Field()
+    match_name = scrapy.Field()
+    host_id = scrapy.Field()
+    guest_id = scrapy.Field()
+    is_half = scrapy.Field()  # 是否上半场
+    half_match_id = scrapy.Field()
+    odds_num = scrapy.Field()  # 总玩法数量
+    host_name = scrapy.Field()
+    is_roll = scrapy.Field()  # 滚球
+    mdate = scrapy.Field()  # 日期
+    mtime = scrapy.Field()  # 时间
+    is_corner = scrapy.Field()  # 是否角球
+    guest_name = scrapy.Field()
+    league_id = scrapy.Field()
+    uuid = scrapy.Field()
+    source = scrapy.Field()
+
+
+class ZqChain(scrapy.Item):
+    league_id = scrapy.Field()
+    code = scrapy.Field()  # 赔率代码
+    status = scrapy.Field()  # 未知
+    name = scrapy.Field()  # 赔率名称
+    odds = scrapy.Field()  # 赔率
+    enabled = scrapy.Field()  # 启用状态
+
+
+class Odds(scrapy.Item):
+    # zq_odds = scrapy.Field()  #足球详细赔率
+    match_id = scrapy.Field()
+    uuid = scrapy.Field()
+    source = scrapy.Field()
+    updata = scrapy.Field()
+    content = scrapy.Field() #足球详细玩法赔率
+    gidm = scrapy.Field()

+ 23 - 0
collectSports/main.py

@@ -0,0 +1,23 @@
+import sys
+import os
+from scrapy.cmdline import execute
+
+# print(os.path.dirname(os.path.abspath(__file__)))
+sys.path.append(os.path.dirname(os.path.abspath(__file__)))
+# execute(["scrapy", "crawl", "sportslst"])
+execute(["scrapy", "crawl", "sports"])
+# execute(["scrapy", "crawl", "lanqiu"])
+# execute(["scrapy", "crawl", "guanjun"])
+# execute(["scrapy", "crawl", "wangqiu"])
+# execute(["scrapy", "crawl", "wqbodan"])
+# execute(["scrapy", "crawl", "bangqiu"])
+# execute(["scrapy", "crawl", "roll_zuqiu"]) #滚球足球 回来要解开这个注释 其他全部解封
+# execute(["scrapy", "crawl", "roll_lanqiu"]) #滚球篮球
+# execute(["scrapy", "crawl", "roll_wangqiu"]) #滚球网球
+# execute(["scrapy", "crawl", "roll_bangqiu"]) #滚球棒球
+# execute(["scrapy", "crawl", "ball_status"]) #滚球id本地存
+# execute(["scrapy", "crawl", "ball_status_update"]) #滚球id结束时间更新状态
+# execute(["scrapy", "crawl", "zq_jieshu"]) #滚球id结束时间更新状态
+# execute(["scrapy", "crawl", "lq_jieshu"]) #滚球id结束时间更新状态
+# execute(["scrapy", "crawl", "wq_jieshu"]) #滚球id结束时间更新状态
+# execute(["scrapy", "crawl", "bq_jieshu"]) #滚球id结束时间更新状态

+ 0 - 0
collectSports/mcollect/__init__.py


BIN
collectSports/mcollect/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/mcollect/__pycache__/__init__.cpython-37.pyc


+ 11 - 0
collectSports/mcollect/hg0088/LinkPool.py

@@ -0,0 +1,11 @@
+class LinkPool(object):
+    links = []
+
+    def __init__(self):
+        self.links.append({
+                              'url': "http://199.26.100.178/app/member/live/game_list.php?uid=yznixox4m21627573l305947&langx=zh-cn&gtype=All&gdate=All",
+                              'cb': ''})
+        pass
+
+    def getLinks(self):
+        return self.links

+ 40 - 0
collectSports/mcollect/hg0088/Resolver.py

@@ -0,0 +1,40 @@
+import pycomm, os, lxml
+import mcollect
+
+
+class Resolver(object):
+    def __init__(self):
+        pass
+
+    def zaopan(self, data):
+        # print(mcollect.getMongo())
+
+        re = self.mixbodyv(data, 'zaopan', '/html/head/script[2]/text()')
+        return re
+
+    def zhibo(self, data):
+        re = self.mixbodyv(data, 'zhibo', '/html/head/script[1]/text()')
+        return re
+
+    def today(self, data):
+        re = self.mixbodyv(data, 'today', '/html/head/script[2]/text()')
+        return re
+
+    def chain(self, data):
+        re = self.mixbodyv(data, 'chain', '/html/head/script[2]/text()')
+        return re
+
+    def mixbodyv(self, data, fname, content_xpath):
+        cpath = os.path.dirname(os.path.abspath(__file__))
+        val = pycomm.readFile(cpath + '/tmpl/' + fname + '.tmpl')
+        data = str(data.decode('utf-8'))
+
+        doc = lxml.etree.HTML(data)
+        # doc=lxml.etree.fromstring(data)  
+        ls = doc.xpath(content_xpath)
+        text = ls[0]
+        ftext = pycomm.parseTag(val, 'CONTENT', text)
+        ftext = str(ftext.encode('utf-8').decode('utf-8'))
+        pycomm.saveFile(cpath + '/fcache/hg0088.' + fname + '.js', ftext)
+        re = pycomm.exejs('node ' + cpath + '/fcache/hg0088.' + fname + '.js')
+        return re

+ 116 - 0
collectSports/mcollect/hg0088/Storage.py

@@ -0,0 +1,116 @@
+from collectSports.items import *
+import uuid
+
+
+class Storage(object):
+    def __init__(self):
+        pass
+
+    def zaopan(self, re):
+        data = CollectsportsItem()
+        data['csource'] = 'zaopan'
+        data['zq_league'] = []
+        data['zq_match'] = []
+
+        for index in re['data']:
+            lg = ZqLeagueItem()
+            content = []
+            content.append({'league_id': index['league_id'], 'source': 'hg0088'})
+            i_uuid = uuid.uuid4()
+            lg['uuid'] = i_uuid
+            lg['league_id'] = index['league_id']
+            lg['league_name'] = index['league_name']
+            lg['content'] = content
+            mc = ZqMatch()
+            mc['match_id'] = index['match_id']
+            mc['half_match_id'] = index['half_match_id']
+            mc['host_id'] = index['host_id']
+            mc['guest_id'] = index['guest_id']
+            mc['host_name'] = index['host_name']
+            mc['guest_name'] = index['guest_name']
+            mc['is_half'] = 0
+            mc['league_id'] = index['league_id']
+            mc['is_roll'] = index['is_roll']  # 是否滚球
+            mc['mdate'] = index['mdate']
+            mc['mtime'] = index['mtime']
+            mc['is_corner'] = index['is_corner']
+            mc['uuid'] = i_uuid
+            mc_half = ZqMatch()
+            if index['half_match_id']:
+                mc_half['match_id'] = index['half_match_id']
+            # else:
+            #     mc_half['match_id'] = index['match_id']
+                mc_half['half_match_id'] = 0
+                mc_half['host_id'] = index['host_id']
+                mc_half['guest_id'] = index['guest_id']
+                mc_half['host_name'] = index['host_name']
+                mc_half['guest_name'] = index['guest_name']
+                mc_half['is_half'] = 1
+                mc_half['league_id'] = index['league_id']
+                mc_half['is_roll'] = index['is_roll']  # 是否滚球
+                mc_half['mdate'] = index['mdate']
+                mc_half['mtime'] = index['mtime']
+                mc_half['is_corner'] = index['is_corner']
+                mc_half['uuid'] = i_uuid
+                data['zq_match'].append(mc_half)
+            data['zq_league'].append(lg)
+            data['zq_match'].append(mc)
+        return data
+
+    def zhibo(self, re):
+        data = CollectsportsItem()
+        data['csource'] = 'zhibo'
+        data['zq_zhibo'] = []
+        for index in re:
+            lg = ZqZhibo()
+            lg['game_type'] = index['game_type']
+            lg['start_time'] = index['start_time']
+            lg['host_team'] = index['host_team']
+            lg['guest_team'] = index['guest_team']
+            lg['doing'] = index['doing']
+            lg['showid'] = index['showid']
+            lg['shower'] = index['shower']
+            lg['league_name'] = index['league_name']
+            data['zq_zhibo'].append(lg)
+
+        return data
+
+    def chain(self, re):
+        data = CollectsportsItem()
+        data['csource'] = 'chain'
+        data['zq_league'] = data['zq_chain'] = []
+        for index in re:
+
+            lg = ZqLeagueItem()
+            lg['start_time'] = index['start_time']
+            lg['league_id'] = index['league_id']
+            lg['league_name'] = index['league_name']
+            lg['league_subname'] = index['league_subname']
+            lg['team_num'] = index['dcount']
+            lg['game_type'] = index['game_type']
+
+            for item in index['items']:
+                mc = ZqChain()
+                mc['league_id'] = index['league_id']
+                mc['status'] = item['status']
+                mc['code'] = item['code']
+                mc['name'] = item['name']
+                mc['enabled'] = item['enabled']
+                mc['odds'] = item['odds']
+                data['zq_chain'].append(mc)
+            data['zq_league'].append(lg)
+
+        return data
+
+    def today(self, re):
+        data = CollectsportsItem()
+        data['csource'] = 'today'
+        data['zq_today'] = []
+
+        for index in re:
+            lg = ZqToday()
+            lg['match_id'] = index['match_id']
+            lg['is_roll'] = index['is_roll']
+            lg['is_corner'] = index['is_corner']
+            data['zq_today'].append(lg)
+        return data

+ 15 - 0
collectSports/mcollect/hg0088/__init__.py

@@ -0,0 +1,15 @@
+
+links = []
+uid = "jjdpzpc07m21627573l376834"
+
+# links.append({'url':'http://baidu.com','cb':'zaopan'})
+
+# 直播信息
+# links.append({'url':"https://205.201.4.177/app/member/live/game_list.php?uid={uid}&langx=zh-cn&gtype=All&gdate=All",'cb':'zhibo'})
+# # 冠军杯
+# links.append({'url':"https://199.26.100.178/app/member/browse_FS/reloadgame_R.php?mid=21680472&uid={uid}&langx=zh-cn&choice=ALL&LegGame=ALL&pages=1&records=40&FStype=FT&area_id=&league_id=&rtype=fs&hot_game=",'cb':'chain'})
+# 早盘
+links.append({'url':"https://205.201.4.177/app/member/FT_future/body_var.php?uid={uid}&rtype=r&langx=zh-cn&mtype=4&page_no={page}&league_id=&hot_game=&g_date=ALL&isie11=%27N%27",'cb':'zaopan'})
+
+#今日
+# links.append({'url':"https://199.26.100.178/app/member/FT_browse/body_var.php?uid={uid}&rtype=r&langx=zh-cn&mtype=4&page_no=1&league_id=&hot_game=&isie11=27N%27",'cb':'today'})

BIN
collectSports/mcollect/hg0088/__pycache__/Resolver.cpython-36.pyc


BIN
collectSports/mcollect/hg0088/__pycache__/Resolver.cpython-37.pyc


BIN
collectSports/mcollect/hg0088/__pycache__/Storage.cpython-36.pyc


BIN
collectSports/mcollect/hg0088/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/mcollect/hg0088/__pycache__/__init__.cpython-37.pyc


+ 78 - 0
collectSports/mcollect/hg0088/fcache/hg0088.today.js

@@ -0,0 +1,78 @@
+var parent={};
+var top={};
+
+function checkCorner(item){
+	if(item.split('角球数')>1){
+		return 1;
+	}
+	return 0;
+}
+parent.body_var_onLoad=function(){
+	this.data={};
+
+	this.result=[];
+	
+	for(let index in this.gm)
+	{
+		var item=this.gm[index];
+		var col_length=item.length;
+		var tmp={};
+		tmp.match_id=index;
+		tmp.is_roll=0;
+		var tit=item[0];
+		tit=tit.split('<br>');
+		
+		tmp.is_roll=0;
+		if(tit.length>2){
+			tmp.is_roll=1;
+		}		
+		tmp.is_corner=checkCorner(item[4]);
+
+		this.result.push(tmp);
+	}
+	this.data.data=this.result;
+	console.log(JSON.stringify(this.data));
+
+
+}
+
+parent.arrayMege=function(o1,o2){
+
+}
+
+
+_=parent;
+_.flash_ior_set='Y';
+_.rtype='r';
+_.sel_lid='';
+top.today_gmt = '2019-06-14';
+top.now_gmt = '21:45:04';
+_.GameFT=[];
+gr=[];
+g=function(_){gr.push(_);}
+_.GameOBT=[];
+od=function(gid,da){_.GameOBT[gid]=[];_.GameOBT[gid]=da;}
+_.GamePk=[];
+pk=function(gid,da){_.GamePk[gid]=[];_.GamePk[gid]=da;}
+_.GameRn=[];
+rn=function(da){_.GameRn.push(da);}
+top.SortType='';
+top.filterType='XX';
+top.filterTypeRE='CB';
+top.pageType='def';
+_.retime=180;
+top.sel_gd = 'today';
+_.clean_data_sw='N';
+_.GameHead =['gid','datetime','league','gnum_h','gnum_c','team_h','team_c','strong','ratio','ior_RH','ior_RC','ratio_o','ratio_u','ior_OUH','ior_OUC','ior_MH','ior_MC','ior_MN','str_odd','str_even','ior_EOO','ior_EOE','hgid','hstrong','hratio','ior_HRH','ior_HRC','hratio_o','hratio_u','ior_HOUH','ior_HOUC','ior_HMH','ior_HMC','ior_HMN','more','eventid','hot','center_tv','play','gidm','isMaster','hide_N','obt_type','ptype_map','ptype','important'];
+_.ObtHead =['gid','datetime','ior_H0C0','ior_H0C1','ior_H0C2','ior_H0C3','ior_H0C4','ior_H1C0','ior_H1C1','ior_H1C2','ior_H1C3','ior_H1C4','ior_H2C0','ior_H2C1','ior_H2C2','ior_H2C3','ior_H2C4','ior_H3C0','ior_H3C1','ior_H3C2','ior_H3C3','ior_H3C4','ior_H4C0','ior_H4C1','ior_H4C2','ior_H4C3','ior_H4C4','ior_OVH','ior_T0','ior_T1','ior_T2','ior_TOV','ior_WNH','ior_WNC','ior_CSH','ior_CSC','ior_TSY','ior_TSN','ior_OUHO','ior_OUHU','ratio_OUHO','ratio_OUHU','ior_OUCO','ior_OUCU','ratio_OUCO','ratio_OUCU','wtype_MOU','ior_MOUHO','ior_MOUHU','ratio_MOUHO','ratio_MOUHU','ior_MOUCO','ior_MOUCU','ratio_MOUCO','ratio_MOUCU','ior_MOUNO','ior_MOUNU','ratio_MOUNO','ratio_MOUNU','ior_PGFH','ior_PGFC','ior_PGFN'];
+_.pkHead=[''];
+ _.rnHead=[''];
+_.game_more=1;
+_.gameCount='FT|RB|6,FT|FT|8,FT|FU|226,FT|P3|179,FT|HOT_RB|3,FT|HOT_FT|0,FT|HOT_FU|24,FT|HOT_P3|14,FT|SP_RB|0,FT|SP_FT|0,FT|SP_FU|0,FT|SP_P3|0,BK|RB|3,BK|FT|2,BK|FU|6,BK|P3|8,BK|HOT_RB|0,BK|HOT_FT|0,BK|HOT_FU|0,BK|HOT_P3|0,BK|SP_RB|0,BK|SP_FT|0,BK|SP_FU|0,BK|SP_P3|0,BS|RB|9,BS|FT|0,BS|FU|11,BS|P3|11,BS|HOT_RB|0,BS|HOT_FT|0,BS|HOT_FU|0,BS|HOT_P3|0,BS|SP_RB|0,BS|SP_FT|0,BS|SP_FU|0,BS|SP_P3|0,TN|RB|0,TN|FT|0,TN|FU|35,TN|P3|35,TN|HOT_RB|0,TN|HOT_FT|0,TN|HOT_FU|0,TN|HOT_P3|0,TN|SP_RB|0,TN|SP_FT|0,TN|SP_FU|0,TN|SP_P3|0,VB|RB|0,VB|FT|0,VB|FU|15,VB|P3|15,VB|HOT_RB|0,VB|HOT_FT|0,VB|HOT_FU|0,VB|HOT_P3|0,VB|SP_RB|0,VB|SP_FT|0,VB|SP_FU|0,VB|SP_P3|0,BM|RB|0,BM|FT|0,BM|FU|0,BM|P3|0,BM|HOT_RB|0,BM|HOT_FT|0,BM|HOT_FU|0,BM|HOT_P3|0,BM|SP_RB|0,BM|SP_FT|0,BM|SP_FU|0,BM|SP_P3|0,TT|RB|0,TT|FT|0,TT|FU|0,TT|P3|0,TT|HOT_RB|0,TT|HOT_FT|0,TT|HOT_FU|0,TT|HOT_P3|0,TT|SP_RB|0,TT|SP_FT|0,TT|SP_FU|0,TT|SP_P3|0,OP|RB|0,OP|FT|2,OP|FU|54,OP|P3|37,OP|HOT_RB|0,OP|HOT_FT|0,OP|HOT_FU|0,OP|HOT_P3|0,OP|SP_RB|0,OP|SP_FT|0,OP|SP_FU|0,OP|SP_P3|0,SK|RB|0,SK|FT|0,SK|FU|14,SK|P3|14,SK|HOT_RB|0,SK|HOT_FT|0,SK|HOT_FU|0,SK|HOT_P3|0,SK|SP_RB|0,SK|SP_FT|0,SK|SP_FU|0,SK|SP_P3|0,FS|HOT_FT|31,FS|HOT_BK|0,FS|HOT_BS|0,FS|HOT_TN|0,FS|HOT_VB|0,FS|HOT_BM|0,FS|HOT_TT|0,FS|HOT_OP|0,FS|HOT_SK|0,FS|SP_FT|0,FS|SP_BK|0,FS|SP_BS|0,FS|SP_TN|0,FS|SP_VB|0,FS|SP_BM|0,FS|SP_TT|0,FS|SP_OP|0,FS|SP_SK|0,FS|FT|131,FS|BK|2,FS|BS|0,FS|TN|3,FS|VB|0,FS|BM|0,FS|TT|0,FS|OP|0,FS|SK|1';
+function onLoad(){
+	_.body_var_onLoad();
+}
+
+
+onLoad();
+

+ 144 - 0
collectSports/mcollect/hg0088/fcache/hg0088.zaopan.js

@@ -0,0 +1,144 @@
+
+var parent={};
+var top={};
+
+function checkCorner(item){
+	if(item.split('角球数')>1){
+		return 1;
+	}
+	return 0;
+}
+parent.body_var_onLoad=function(){
+	this.data={};
+	this.data.total_page=this.t_page;
+	this.data.retime=this.retime;
+
+	this.result=[];
+	
+	for(let index in G)
+	{
+		var item=this.GameFT[index];
+		var col_length=item.length;
+		var tmp={};
+		var date=new Date;
+		tmp.match_id=item[0];
+		var tit=item[1];
+		tit=tit.split('<br>');
+		var year=date.getFullYear();
+		tmp.is_roll=0;
+		if(tit.length>2){
+			tmp.is_roll=1;
+		}		
+		tmp.mdate=year+'-'+tit[0];
+		
+		tmp.mtime=tit[1];
+		tmp.half_match_id=item[22];
+		tmp.league_name=item[2];
+		tmp.host_id=item[3];
+		tmp.guest_id=item[4];
+		tmp.host_name=item[5];
+		tmp.guest_name=item[6];
+		tmp.league_id=item[39];
+		tmp.odds_num=item[34];
+		tmp.hot=item[36];
+		tmp.play=item[38];
+		tmp.special=item[45];
+		tmp.ptype=item[44];//联赛附属类型,比如,会晋级,角球数
+		tmp.is_corner=checkCorner(tmp.ptype);
+
+
+		this.result.push(tmp);
+	}
+	this.data.data=this.result;
+	console.log(JSON.stringify(this.data));
+}
+
+
+
+
+_=parent;
+_.flash_ior_set='Y';
+_.rtype='r';
+_.sel_lid='';
+top.today_gmt = '2019-06-19';
+top.now_gmt = '07:35:41';
+G=_.GameFT=[];
+g=function(_){G.push(_);}
+top.SortType='';
+top.pageType='def';
+top.filterType='XX';
+_.isObt='';
+_.g_date = 'ALL';
+_.clean_data_sw='N';
+_.GameHead = ['gid','datetime','league','gnum_h','gnum_c','team_h','team_c','strong','ratio','ior_RH','ior_RC','ratio_o','ratio_u','ior_OUH','ior_OUC','ior_MH','ior_MC','ior_MN','str_odd','str_even','ior_EOO','ior_EOE','hgid','hstrong','hratio','ior_HRH','ior_HRC','hratio_o','hratio_u','ior_HOUH','ior_HOUC','ior_HMH','ior_HMC','ior_HMN','more','eventid','hot','center_tv','play','gidm','isMaster','hide_N','obt_type','ptype_map','ptype','important'];
+_.retime=180;
+_.game_more=1;
+_.t_page=3;
+_.gamount=60;
+g(['3726954','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J1联赛','60428','60427','大阪樱花','磐田山叶','H','0.5','1.060','0.840','O2','U2','1.030','0.850','2.05','3.90','3.25','单','双','1.95','1.94','3726955','H','0 / 0.5','1.200','0.700','O0.5 / 1','U0.5 / 1','1.070','0.810','2.81','4.50','1.92','62','87CCB9BCBCBCBABCBEBCB6CCB6CCB38ECCC9C9CEC9CDCBA9B3','','p双rf单rm','N','2616631','Y','N','0','0','','N']);
+g(['3726956','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J1联赛','60430','60429','大阪樱花','磐田山叶','H','0 / 0.5','0.750','1.150','O2 / 2.5','U2 / 2.5','0.740','1.140','','','','','','','','3726957','H','0','0.560','1.340','O1','U1','0.630','1.250','','','','0','','','','N','2616631','N','N','0','0','','N']);
+g(['3727012','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60506','60505','柏雷素尔','千叶市原','H','0.5 / 1','0.970','0.930','O2.5','U2.5','0.910','0.970','1.73','4.95','3.70','单','双','1.94','1.95','3727013','H','0 / 0.5','0.860','1.040','O1','U1','0.870','1.010','2.38','5.50','2.00','62','87CCBBBCBEBCBABCBEBCB6CCB6CCB38BC7C9C9CEC9CDCBA9B3','','p双rf单rm','N','2616684','Y','N','0','0','','N']);
+g(['3727014','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60508','60507','柏雷素尔','千叶市原','H','1','1.270','0.630','O2 / 2.5','U2 / 2.5','1.170','0.710','','','','','','','','3727015','H','0.5','1.290','0.610','O0.5 / 1','U0.5 / 1','1.260','0.620','','','','0','','','','N','2616684','N','N','0','0','','N']);
+g(['3727020','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60518','60517','东京绿茵','大宫松鼠','C','0 / 0.5','1.060','0.840','O2 / 2.5','U2 / 2.5','0.920','0.960','3.60','2.11','3.35','单','双','1.95','1.94','3727021','C','0','1.250','0.650','O0.5 / 1','U0.5 / 1','1.170','0.710','3.95','2.95','1.96','62','87CCBBBCB9CCBABCBEBCB6CCB6CCB38FC6C9C9CEC9CDCBA9B3','','p双rf单rm','N','2616690','Y','N','0','0','','N']);
+g(['3727022','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60520','60519','东京绿茵','大宫松鼠','C','0.5','0.790','1.110','O2.5','U2.5','0.690','1.190','','','','','','','','3727023','C','0 / 0.5','0.640','1.260','O1','U1','0.710','1.170','','','','0','','','','N','2616690','N','N','0','0','','N']);
+g(['3727028','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60530','60529','山口雷法','岐阜','H','0 / 0.5','0.840','1.060','O2.5 / 3','U2.5 / 3','0.900','0.980','2.09','3.50','3.50','单','双','1.94','1.95','3727029','H','0 / 0.5','1.130','0.770','O1','U1','1.170','0.710','2.60','4.00','2.15','62','8DBCB7CCBEBCBABCBEBCB7CCBEBCB389C6C9C9CEC9CDCBA9B3','','p双rf单rm','N','2616696','Y','N','0','0','','N']);
+g(['3727030','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60532','60531','山口雷法','岐阜','H','0.5','1.100','0.800','O2.5','U2.5','1.120','0.760','','','','','','','','3727031','H','0','0.560','1.340','O1 / 1.5','U1 / 1.5','0.680','1.200','','','','0','','','','N','2616696','N','N','0','0','','N']);
+g(['3727036','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60542','60541','爱媛','京都不死鸟','C','0 / 0.5','1.040','0.860','O2 / 2.5','U2 / 2.5','1.000','0.880','3.55','2.13','3.35','单','双','1.94','1.95','3727037','C','0 / 0.5','0.660','1.240','O0.5 / 1','U0.5 / 1','1.190','0.690','4.20','2.89','1.93','62','87CCBABCB9CCBABCBEBCB6CCB6CCB38DCFC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616702','Y','N','0','0','','N']);
+g(['3727038','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60544','60543','爱媛','京都不死鸟','C','0.5','0.770','1.130','O2.5','U2.5','0.740','1.140','','','','','','','','3727039','C','0','1.270','0.630','O1','U1','0.780','1.100','','','','0','','','','N','2616702','N','N','0','0','','N']);
+g(['3727044','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60554','60553','鹿儿岛联','栃木SC','H','0.5','1.050','0.850','O2 / 2.5','U2 / 2.5','0.860','1.020','2.04','3.85','3.30','单','双','1.94','1.95','3727045','H','0 / 0.5','1.190','0.710','O0.5 / 1','U0.5 / 1','1.100','0.780','2.80','4.75','1.88','62','87CCBBBCBCBCBABCBEBCB6CCB6CCB387CFC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616708','Y','N','0','0','','N']);
+g(['3727046','06-22<br>06:00a<br><font color=red>Running Ball</font>','日本J2联赛','60556','60555','鹿儿岛联','栃木SC','H','0 / 0.5','0.750','1.150','O2','U2','1.180','0.700','','','','','','','','3727047','H','0','0.530','1.370','O1','U1','0.680','1.200','','','','0','','','','N','2616708','N','N','0','0','','N']);
+g(['3724062','06-22<br>10:30a<br><font color=red>Running Ball</font>','非洲国家杯2019(在埃及)','60246','60245','刚果民主共和国','乌干达','H','0.5','1.100','0.740','O2 / 2.5','U2 / 2.5','0.840','0.980','2.09','3.20','3.00','单','双','1.97','1.92','3724063','H','0 / 0.5','1.150','0.690','O1','U1','0.760','1.060','2.76','3.85','2.00','37','','','','N','2613510','Y','N','0','0','','N']);
+g(['3727074','06-22<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','60568','60567','史卓加斯特','莫迪','C','0.5','1.040','0.860','O3','U3','0.860','1.020','3.90','1.85','3.95','单','双','1.95','1.94','3727075','C','0 / 0.5','0.890','1.010','O1 / 1.5','U1 / 1.5','0.840','1.040','3.95','2.44','2.28','62','8ABCB8CCBCBCBABCBEBCB7CCBABCB38BCDC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616724','Y','N','0','0','','N']);
+g(['3727076','06-22<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','60570','60569','史卓加斯特','莫迪','C','0.5 / 1','0.810','1.090','O2.5 / 3','U2.5 / 3','1.080','0.800','','','','','','','','3727077','C','0.5','0.580','1.320','O1','U1','1.250','0.630','','','','0','','','','N','2616724','N','N','0','0','','N']);
+g(['3724066','06-22<br>01:00p<br><font color=red>Running Ball</font>','非洲国家杯2019(在埃及)','60280','60279','尼日利亚','蒲隆地共和国','H','1 / 1.5','0.990','0.850','O2 / 2.5','U2 / 2.5','0.770','1.050','1.34','7.90','4.00','单','双','1.97','1.92','3724067','H','0.5','0.910','0.930','O0.5 / 1','U0.5 / 1','1.090','0.730','1.90','8.20','2.10','37','87CCB7CCB9CCBABCBEBCB7CCBEBCB388CDCACCCEC9CDCBA9B3','','p双rf单rm','N','2613527','Y','N','0','0','','N']);
+g(['3724034','06-22<br>03:00p<br><font color=red>Running Ball</font>','美洲国家杯2019(在巴西)','60082','60081','玻利维亚','委内瑞拉','C','1','1.020','0.880','O2.5','U2.5','0.950','0.930','6.70','1.50','4.20','单','双','1.96','1.93','3724035','C','0.5','0.790','1.110','O1','U1','0.910','0.970','5.80','2.11','2.19','60','87CCB8CCBABCBABCBEBCB8CCB6CCB387C6CBCFCFC9CDCBA9B3','','unas','N','2600498','Y','N','0','0','','N']);
+g(['3724042','06-22<br>03:00p<br><font color=red>Running Ball</font>','美洲国家杯2019(在巴西)','60122','60121','秘鲁','巴西','C','1.5','0.800','1.100','O2.5 / 3','U2.5 / 3','0.860','1.020','9.00','1.35','5.00','单','双','1.95','1.94','3724043','C','0.5','1.070','0.830','O1','U1','1.090','0.790','6.90','1.82','2.45','59','87CCB8CCB8CCBABCBEBCB8CCB6CCB387CECACFCFC9CDCBA9B3','','unas','N','2600518','Y','N','0','0','','N']);
+g(['3737804','06-22<br>03:00p','女子世界杯2019(在法国)','62278','62277','挪威(女)','澳大利亚(女)','C','0 / 0.5','0.860','0.980','O3','U3','0.780','1.040','2.70','2.19','3.65','单','双','1.95','1.94','3737805','C','0','1.080','0.760','O1 / 1.5','U1 / 1.5','0.770','1.050','3.20','2.70','2.28','59','','','','N','2627051','Y','N','0','0','','N']);
+g(['3724070','06-22<br>04:00p<br><font color=red>Running Ball</font>','非洲国家杯2019(在埃及)','60314','60313','几内亚','马达加斯加','H','0.5 / 1','0.770','1.070','O2 / 2.5','U2 / 2.5','0.890','0.930','1.54','5.50','3.45','单','双','1.97','1.92','3724071','H','0 / 0.5','0.750','1.090','O1','U1','0.760','1.060','2.26','5.70','1.99','37','','','','N','2613544','Y','N','0','0','','N']);
+g(['3724050','06-22<br>05:30p<br><font color=red>Running Ball</font>','美洲金杯2019','60162','60161','圭亚那 [中]','巴拿马','C','2','0.960','0.880','O3','U3','0.960','0.860','12.00','1.13','6.40','单','双','1.95','1.94','','','','','','','','','','','','','6','','','','N','2611563','Y','N','0','0','','N']);
+g(['3727430','06-22<br>07:30p<br><font color=red>Running Ball</font>','美国职业大联盟','60584','60583','辛辛那堤','洛杉矶银河','H','0','0.830','1.070','O2.5 / 3','U2.5 / 3','1.030','0.850','2.41','2.75','3.70','单','双','1.95','1.94','3727431','H','0','0.860','1.040','O1 / 1.5','U1 / 1.5','0.780','1.100','2.91','3.25','2.24','63','8DBCB6CCB6CCBABCB9BCBDBCB38ECBCDC8CEC9CDCBA9B3','','img','N','2617241','Y','N','0','0','','N']);
+g(['3727432','06-22<br>07:30p<br><font color=red>Running Ball</font>','美国职业大联盟','60586','60585','辛辛那堤','洛杉矶银河','H','0 / 0.5','1.120','0.780','O3','U3','0.770','1.110','','','','','','','','3727433','H','0 / 0.5','1.300','0.600','O1','U1','1.190','0.690','','','','0','','','','N','2617241','N','N','0','0','','N']);
+g(['3724056','06-22<br>08:00p<br><font color=red>Running Ball</font>','美洲金杯2019','60204','60203','美国','千里达及多巴哥','H','2.5','0.930','0.910','O3.5 / 4','U3.5 / 4','1.010','0.810','1.09','13.00','7.90','单','双','1.95','1.94','','','','','','','','','','','','','6','','','','N','2611584','Y','N','0','0','','N']);
+g(['3727440','06-22<br>08:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60596','60595','芝加哥火焰','皇家盐湖城','H','1','0.940','0.960','O3','U3','0.820','1.060','1.57','5.20','4.50','单','双','1.95','1.94','3727441','H','0.5','1.120','0.780','O1 / 1.5','U1 / 1.5','0.810','1.070','2.12','4.85','2.36','63','8DBCB6CCB7CCBABCB9BCBDBCB388CBCDC8CEC9CDCBA9B3','','img','N','2617247','Y','N','0','0','','N']);
+g(['3727442','06-22<br>08:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60598','60597','芝加哥火焰','皇家盐湖城','H','0.5 / 1','0.710','1.190','O2.5 / 3','U2.5 / 3','1.070','0.810','','','','','','','','3727443','H','0 / 0.5','0.760','1.140','O1','U1','1.250','0.630','','','','0','','','','N','2617247','N','N','0','0','','N']);
+g(['3727450','06-22<br>08:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60608','60607','达拉斯','多伦多','H','0.5','1.040','0.860','O2.5 / 3','U2.5 / 3','0.910','0.970','2.01','3.65','3.55','单','双','1.96','1.93','3727451','H','0 / 0.5','1.090','0.810','O1','U1','1.130','0.750','2.56','4.15','2.13','63','8DBCB6CCB8CCBABCB9BCBDBCB38CCACDC8CEC9CDCBA9B3','','img','N','2617253','Y','N','0','0','','N']);
+g(['3727452','06-22<br>08:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60610','60609','达拉斯','多伦多','H','0 / 0.5','0.750','1.150','O2.5','U2.5','1.110','0.770','','','','','','','','3727453','H','0','0.540','1.360','O1 / 1.5','U1 / 1.5','0.710','1.170','','','','0','','','','N','2617253','N','N','0','0','','N']);
+g(['3727460','06-22<br>10:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60620','60619','温哥华白帽','科罗拉多急流','H','0.5','0.960','0.940','O2.5 / 3','U2.5 / 3','0.870','1.010','1.94','4.00','3.50','单','双','1.96','1.93','3727461','H','0 / 0.5','1.100','0.800','O1','U1','1.100','0.780','2.58','4.20','2.10','63','8DBCB6CCB9CCBABCB9BCBDBCB386CACDC8CEC9CDCBA9B3','','img','N','2617259','Y','N','0','0','','N']);
+g(['3727462','06-22<br>10:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60622','60621','温哥华白帽','科罗拉多急流','H','0 / 0.5','0.700','1.200','O2.5','U2.5','1.070','0.810','','','','','','','','3727463','H','0','0.540','1.360','O1 / 1.5','U1 / 1.5','0.680','1.200','','','','0','','','','N','2617259','N','N','0','0','','N']);
+g(['3727470','06-22<br>11:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60632','60631','波特兰木材','休斯顿迪纳摩','H','0.5 / 1','1.010','0.890','O2.5 / 3','U2.5 / 3','1.050','0.830','1.77','4.25','4.00','单','双','1.95','1.94','3727471','H','0 / 0.5','0.970','0.930','O1 / 1.5','U1 / 1.5','0.760','1.120','2.36','4.40','2.23','63','8DBCB7CCB9BCBABCB9BCBDBCB38AC9CDC8CEC9CDCBA9B3','','img','N','2617265','Y','N','0','0','','N']);
+g(['3727472','06-22<br>11:00p<br><font color=red>Running Ball</font>','美国职业大联盟','60634','60633','波特兰木材','休斯顿迪纳摩','H','0.5','0.780','1.120','O2.5','U2.5','1.230','0.650','','','','','','','','3727473','H','0.5','1.280','0.620','O1','U1','1.230','0.650','','','','0','','','','N','2617265','N','N','0','0','','N']);
+g(['3727066','06-23<br>05:00a<br><font color=red>Running Ball</font>','日本J2联赛','70364','70363','町田泽维亚','冈山绿雉','H','0','0.940','0.960','O2 / 2.5','U2 / 2.5','0.810','1.070','2.73','2.80','3.05','单','双','1.94','1.95','3727067','H','0','0.940','0.960','O0.5 / 1','U0.5 / 1','0.990','0.890','3.65','3.70','1.81','62','89CCB9CCBABCBABCBEBCB7CCB7CCB387CEC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616718','Y','N','0','0','','N']);
+g(['3727068','06-23<br>05:00a<br><font color=red>Running Ball</font>','日本J2联赛','70366','70365','町田泽维亚','冈山绿雉','H','0 / 0.5','1.240','0.660','O2','U2','1.080','0.800','','','','','','','','3727069','H','0 / 0.5','1.450','0.450','O0.5','U0.5','1.260','0.620','','','','0','','','','N','2616718','N','N','0','0','','N']);
+g(['3726964','06-23<br>06:00a<br><font color=red>Running Ball</font>','日本J1联赛','70348','70347','仙台维加泰','东京','C','0 / 0.5','0.940','0.960','O2.5','U2.5','0.820','1.060','3.25','2.24','3.35','单','双','1.95','1.94','3726965','C','0','1.260','0.640','O1','U1','0.830','1.050','4.10','2.90','1.96','62','87CCB9BCBEBCBABCBEBCB6CCB6CCB386CCC9C9CEC9CDCBA9B3','','p双rf单rm','N','2616639','Y','N','0','0','','N']);
+g(['3726966','06-23<br>06:00a<br><font color=red>Running Ball</font>','日本J1联赛','70350','70349','仙台维加泰','东京','C','0.5','0.710','1.190','O2 / 2.5','U2 / 2.5','1.060','0.820','','','','','','','','3726967','C','0 / 0.5','0.680','1.220','O0.5 / 1','U0.5 / 1','1.220','0.660','','','','0','','','','N','2616639','N','N','0','0','','N']);
+g(['3727082','06-23<br>09:00a<br><font color=red>Running Ball</font>','挪威超级联赛','70376','70375','瓦勒伦加','萨普斯堡08','H','0 / 0.5','0.880','1.020','O2.5','U2.5','0.950','0.930','2.14','3.25','3.60','单','双','1.96','1.93','3727083','H','0 / 0.5','1.190','0.710','O1','U1','0.980','0.900','2.72','3.80','2.13','62','89CCB6CCBEBCBABCBEBCB7CCB7CCB38DCCC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616732','Y','N','0','0','','N']);
+g(['3727084','06-23<br>09:00a<br><font color=red>Running Ball</font>','挪威超级联赛','70378','70377','瓦勒伦加','萨普斯堡08','H','0.5','1.140','0.760','O2.5 / 3','U2.5 / 3','0.740','1.140','','','','','','','','3727085','H','0','0.660','1.240','O1 / 1.5','U1 / 1.5','0.620','1.260','','','','0','','','','N','2616732','N','N','0','0','','N']);
+g(['3734676','06-23<br>09:00a<br><font color=red>Running Ball</font>','瑞典超级甲组联赛','70690','70689','乔科平所达','特雷勒堡','H','0.5 / 1','1.060','0.840','O2.5','U2.5','0.820','1.060','1.80','4.15','3.50','单','双','1.96','1.93','3734677','H','0 / 0.5','1.030','0.870','O1','U1','0.860','1.020','2.44','4.60','2.12','37','86CCB7CCBDBCBABCB9BCB7CCB38BCAC6CCCDC9CDCBA9B3','','img','N','2623954','Y','N','0','0','','N']);
+g(['3734680','06-23<br>09:00a<br><font color=red>Running Ball</font>','瑞典超级甲组联赛','70702','70701','米亚尔比','布莱格','H','0 / 0.5','0.930','0.970','O2.5','U2.5','0.910','0.970','2.17','3.05','3.40','单','双','1.96','1.93','3734681','H','0','0.680','1.220','O1','U1','0.900','0.980','2.78','3.60','2.07','37','86CCB7CCBEBCBABCB9BCB7CCB38FC9C6CCCDC9CDCBA9B3','','img','N','2623960','Y','N','0','0','','N']);
+g(['3724126','06-23<br>10:30a<br><font color=red>Running Ball</font>','非洲国家杯2019(在埃及)','70280','70279','摩洛哥','纳米比亚','H','1','0.670','1.170','O2.5','U2.5','0.780','1.040','1.36','8.00','3.85','单','双','1.96','1.93','3724127','H','0.5','1.030','0.810','O1','U1','0.860','0.960','2.02','6.20','2.15','37','87CCB8CCBABCBABCBEBCB7CCBEBCB387C8CACCCEC9CDCBA9B3','','p双rf单rm','N','2613578','Y','N','0','0','','N']);
+g(['3734684','06-23<br>11:30a<br><font color=red>Running Ball</font>','瑞典超级甲组联赛','70714','70713','哈尔姆斯塔德','泰比弗雷','H','1','0.940','0.960','O2.5','U2.5','1.070','0.810','1.52','5.40','4.20','单','双','1.95','1.94','3734685','H','0 / 0.5','0.770','1.130','O1','U1','1.040','0.840','2.20','4.90','2.17','37','86CCB7CCB7CCBABCB9BCB7CCB389C9C6CCCDC9CDCBA9B3','','img','N','2623966','Y','N','0','0','','N']);
+g(['3734688','06-23<br>11:30a<br><font color=red>Running Ball</font>','瑞典超级甲组联赛','70726','70725','布洛马波卡纳','奥尔格里特','C','0 / 0.5','0.790','1.110','O2.5','U2.5','0.830','1.050','2.81','2.35','3.35','单','双','1.96','1.93','3734689','C','0','1.140','0.760','O1','U1','0.900','0.980','3.40','2.98','2.04','37','86CCB7CCB6CCBABCB9BCB7CCB38DC8C6CCCDC9CDCBA9B3','','img','N','2623972','Y','N','0','0','','N']);
+g(['3727090','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70392','70391','克里斯恬桑德','史达比克','H','0.5 / 1','0.830','1.070','O2.5','U2.5','1.010','0.870','1.64','5.20','4.05','单','双','1.96','1.93','3727091','H','0 / 0.5','0.880','1.020','O1','U1','0.990','0.890','2.29','4.85','2.19','62','89CCB7CCBCBCBABCBEBCB7CCB7CCB38FCBC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616740','Y','N','0','0','','N']);
+g(['3727092','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70394','70393','克里斯恬桑德','史达比克','H','1','1.150','0.750','O2.5 / 3','U2.5 / 3','0.770','1.110','','','','','','','','3727093','H','0.5','1.240','0.660','O1 / 1.5','U1 / 1.5','0.640','1.240','','','','0','','','','N','2616740','N','N','0','0','','N']);
+g(['3727098','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70408','70407','雷黑姆','莫达伦','H','0 / 0.5','1.000','0.900','O2.5','U2.5','0.950','0.930','2.25','3.15','3.45','单','双','1.96','1.93','3727099','H','0','0.710','1.190','O1','U1','1.000','0.880','2.81','3.70','2.11','62','89CCBEBCB9CCBABCBEBCB7CCB7CCB387CBC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616748','Y','N','0','0','','N']);
+g(['3727100','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70410','70409','雷黑姆','莫达伦','H','0.5','1.210','0.690','O2.5 / 3','U2.5 / 3','0.750','1.130','','','','','','','','3727101','H','0 / 0.5','1.270','0.630','O1 / 1.5','U1 / 1.5','0.620','1.260','','','','0','','','','N','2616748','N','N','0','0','','N']);
+g(['3727106','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70424','70423','奥特','候格森德','H','0.5','0.930','0.970','O2.5','U2.5','0.870','1.010','1.92','4.10','3.50','单','双','1.96','1.93','3727107','H','0 / 0.5','1.130','0.770','O1','U1','0.880','1.000','2.56','4.45','2.07','62','89CCB7CCB7CCBABCBEBCB7CCB7CCB389CAC8C9CEC9CDCBA9B3','','p双rf单rm','N','2616756','Y','N','0','0','','N']);
+g(['3727108','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70426','70425','奥特','候格森德','H','0.5 / 1','1.180','0.720','O2 / 2.5','U2 / 2.5','1.100','0.780','','','','','','','','3727109','H','0.5','1.370','0.530','O0.5 / 1','U0.5 / 1','1.260','0.620','','','','0','','','','N','2616756','N','N','0','0','','N']);
+g(['3727114','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70440','70439','特罗姆瑟','洛辛堡','C','0.5','0.840','1.060','O2.5','U2.5','0.850','1.030','3.65','2.05','3.45','单','双','1.96','1.93','3727115','C','0 / 0.5','0.730','1.170','O1','U1','0.920','0.960','4.05','2.69','2.08','62','89CCBEBCBCBCBABCBEBCB7CCB7CCB38BC9C8C9CEC9CDCBA9B3','','p双rf单rm','N','2616764','Y','N','0','0','','N']);
+g(['3727116','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70442','70441','特罗姆瑟','洛辛堡','C','0 / 0.5','1.110','0.790','O2 / 2.5','U2 / 2.5','1.110','0.770','','','','','','','','3727117','C','0','1.310','0.590','O0.5 / 1','U0.5 / 1','1.270','0.610','','','','0','','','','N','2616764','N','N','0','0','','N']);
+g(['3727122','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70456','70455','维京','波杜基林特','H','0','0.910','0.990','O3','U3','0.830','1.050','2.54','2.64','3.60','单','双','1.95','1.94','3727123','H','0','0.930','0.970','O1 / 1.5','U1 / 1.5','0.810','1.070','3.00','3.15','2.22','62','89CCBEBCB7CCBABCBEBCB7CCB7CCB38DC8C8C9CEC9CDCBA9B3','','p双rf单rm','N','2616772','Y','N','0','0','','N']);
+g(['3727124','06-23<br>12:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70458','70457','维京','波杜基林特','H','0 / 0.5','1.180','0.720','O2.5 / 3','U2.5 / 3','1.070','0.810','','','','','','','','3727125','H','0 / 0.5','1.330','0.570','O1','U1','1.230','0.650','','','','0','','','','N','2616772','N','N','0','0','','N']);
+g(['3724130','06-23<br>01:00p<br><font color=red>Running Ball</font>','非洲国家杯2019(在埃及)','70314','70313','塞内加尔','坦桑尼亚','H','1.5','1.090','0.750','O2 / 2.5','U2 / 2.5','1.010','0.810','1.30','8.60','4.20','单','双','1.96','1.93','3724131','H','0.5','0.830','1.010','O1','U1','0.770','1.050','1.82','8.50','2.20','37','87CCB8CCBCBCBABCBEBCB7CCBEBCB38AC6CACCCEC9CDCBA9B3','','p双rf单rm','N','2613595','Y','N','0','0','','N']);
+g(['3727130','06-23<br>02:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70472','70471','白兰恩','利勒斯特罗姆','H','1 / 1.5','0.940','0.960','O2.5 / 3','U2.5 / 3','0.790','1.090','1.38','9.20','4.60','单','双','1.96','1.93','3727131','H','0.5','1.010','0.890','O1','U1','1.030','0.850','1.99','7.30','2.17','62','89CCB6CCBCBCBABCBEBCB7CCB7CCB38FC7C8C9CEC9CDCBA9B3','','p双rf单rm','N','2616780','Y','N','0','0','','N']);
+g(['3727132','06-23<br>02:00p<br><font color=red>Running Ball</font>','挪威超级联赛','70474','70473','白兰恩','利勒斯特罗姆','H','1','0.690','1.210','O2.5','U2.5','1.050','0.830','','','','','','','','3727133','H','0 / 0.5','0.610','1.290','O1 / 1.5','U1 / 1.5','0.680','1.200','','','','0','','','','N','2616780','N','N','0','0','','N']);
+g(['3724094','06-23<br>03:00p<br><font color=red>Running Ball</font>','美洲国家杯2019(在巴西)','70082','70081','卡塔尔','阿根廷','C','1.5 / 2','0.810','1.090','O2.5 / 3','U2.5 / 3','0.920','0.960','11.50','1.28','5.60','单','双','1.95','1.94','3724095','C','0.5 / 1','0.940','0.960','O1 / 1.5','U1 / 1.5','0.740','1.140','9.20','1.68','2.50','58','89CCB9BCBDBCBABCBEBCB8CCB6CCB387CCCACFCFC9CDCBA9B3','','unas','N','2600538','Y','N','0','0','','N']);
+g(['3724102','06-23<br>03:00p<br><font color=red>Running Ball</font>','美洲国家杯2019(在巴西)','70122','70121','哥伦比亚','巴拉圭','H','0.5 / 1','0.890','1.010','O2.5','U2.5','0.880','1.000','1.67','5.30','3.80','单','双','1.96','1.93','3724103','H','0 / 0.5','0.910','0.990','O1','U1','0.890','0.990','2.33','5.30','2.07','58','88CCB9CCBEBCBABCBEBCB8CCB6CCB387CACACFCFC9CDCBA9B3','','unas','N','2600558','Y','N','0','0','','N']);
+g(['3724122','06-23<br>04:00p<br><font color=red>Running Ball</font>','非洲国家杯2019(在埃及)','70246','70245','阿尔及利亚','肯尼亚','H','1','0.780','1.060','O2.5','U2.5','0.760','1.060','1.40','6.80','3.90','单','双','1.96','1.93','3724123','H','0.5','1.070','0.770','O1','U1','0.790','1.030','2.06','6.60','2.07','37','','','','N','2613561','Y','N','0','0','','N']);
+g(['3727482','06-23<br>05:30p<br><font color=red>Running Ball</font>','美国职业大联盟','70490','70489','哥伦布机员','堪萨斯城体育会','H','0 / 0.5','1.070','0.830','O2.5 / 3','U2.5 / 3','0.900','0.980','2.35','2.99','3.45','单','双','1.96','1.93','3727483','H','0','0.770','1.130','O1','U1','1.130','0.750','2.94','3.55','2.10','63','8DBCB7CCBABCBABCB9BCBDBCB38EC8CDC8CEC9CDCBA9B3','','img','N','2617271','Y','N','0','0','','N']);
+_.gameCount='FT|RB|22,FT|FT|117,FT|FU|111,FT|P3|198,FT|HOT_RB|10,FT|HOT_FT|20,FT|HOT_FU|20,FT|HOT_P3|26,FT|SP_RB|0,FT|SP_FT|0,FT|SP_FU|0,FT|SP_P3|0,BK|RB|3,BK|FT|3,BK|FU|3,BK|P3|6,BK|HOT_RB|0,BK|HOT_FT|0,BK|HOT_FU|0,BK|HOT_P3|0,BK|SP_RB|0,BK|SP_FT|0,BK|SP_FU|0,BK|SP_P3|0,BS|RB|8,BS|FT|12,BS|FU|0,BS|P3|12,BS|HOT_RB|0,BS|HOT_FT|0,BS|HOT_FU|0,BS|HOT_P3|0,BS|SP_RB|0,BS|SP_FT|0,BS|SP_FU|0,BS|SP_P3|0,TN|RB|11,TN|FT|42,TN|FU|12,TN|P3|54,TN|HOT_RB|0,TN|HOT_FT|0,TN|HOT_FU|0,TN|HOT_P3|0,TN|SP_RB|0,TN|SP_FT|0,TN|SP_FU|0,TN|SP_P3|0,VB|RB|2,VB|FT|3,VB|FU|0,VB|P3|3,VB|HOT_RB|0,VB|HOT_FT|0,VB|HOT_FU|0,VB|HOT_P3|0,VB|SP_RB|0,VB|SP_FT|0,VB|SP_FU|0,VB|SP_P3|0,BM|RB|0,BM|FT|0,BM|FU|0,BM|P3|0,BM|HOT_RB|0,BM|HOT_FT|0,BM|HOT_FU|0,BM|HOT_P3|0,BM|SP_RB|0,BM|SP_FT|0,BM|SP_FU|0,BM|SP_P3|0,TT|RB|0,TT|FT|0,TT|FU|0,TT|P3|0,TT|HOT_RB|0,TT|HOT_FT|0,TT|HOT_FU|0,TT|HOT_P3|0,TT|SP_RB|0,TT|SP_FT|0,TT|SP_FU|0,TT|SP_P3|0,OP|RB|1,OP|FT|23,OP|FU|0,OP|P3|21,OP|HOT_RB|0,OP|HOT_FT|0,OP|HOT_FU|0,OP|HOT_P3|0,OP|SP_RB|0,OP|SP_FT|0,OP|SP_FU|0,OP|SP_P3|0,SK|RB|0,SK|FT|0,SK|FU|0,SK|P3|0,SK|HOT_RB|0,SK|HOT_FT|0,SK|HOT_FU|0,SK|HOT_P3|0,SK|SP_RB|0,SK|SP_FT|0,SK|SP_FU|0,SK|SP_P3|0,FS|HOT_FT|23,FS|HOT_BK|0,FS|HOT_BS|0,FS|HOT_TN|0,FS|HOT_VB|0,FS|HOT_BM|0,FS|HOT_TT|0,FS|HOT_OP|0,FS|HOT_SK|0,FS|SP_FT|0,FS|SP_BK|0,FS|SP_BS|0,FS|SP_TN|0,FS|SP_VB|0,FS|SP_BM|0,FS|SP_TT|0,FS|SP_OP|0,FS|SP_SK|0,FS|FT|128,FS|BK|6,FS|BS|3,FS|TN|4,FS|VB|1,FS|BM|0,FS|TT|0,FS|OP|0,FS|SK|1';
+function onLoad(){
+	_.body_var_onLoad();
+}
+
+
+onLoad();

+ 30 - 0
collectSports/mcollect/hg0088/fcache/hg0088.zhibo.js

@@ -0,0 +1,30 @@
+
+var parent={};
+parent.parseGameList=function(){
+	this.result=[];
+	
+	for(let index in this.GameData)
+	{
+		var item=this.GameData[index];
+		var tmp={};
+		tmp.game_type=item[0];
+		tmp.start_time=item[2];
+		tmp.host_team=item[3];
+		tmp.guest_team=item[4];
+		tmp.doing=0;
+		tmp.showid=item[10];
+		tmp.shower=item[13];
+		if(item[6]=='Y'){
+			tmp.doing=1;
+		}
+		tmp.league_name=item[9];
+		this.result.push(tmp);
+	}
+	console.log(JSON.stringify(this.result));
+}
+
+function onLoads(){
+var obj = document.getElementById('newdomain');
+obj.submit();
+}
+

+ 42 - 0
collectSports/mcollect/hg0088/tmpl/chain.tmpl

@@ -0,0 +1,42 @@
+
+var parent={};
+parent.showgame_table=function(){
+	this.result=[];
+	
+	for(let index in this.GameFT)
+	{
+		var item=this.GameFT[index];
+		var col_length=item.length;
+		var tmp={};
+		tmp.league_id=item[0];
+		tmp.start_time=item[1];
+		tmp.league_name=item[2];
+		tmp.league_subname=item[3];
+		tmp.dcount=item[5];
+		tmp.game_type=item[col_length-1];
+		var sub_len=col_length-7;
+		var tnum=Math.floor(sub_len/4);
+		var start_subindex=6;
+		var subindex_start=0; 
+		var subitems=[];
+		while(subindex_start<tnum){
+			 let sitems={};
+			 let cstart=start_subindex+(subindex_start*4);
+			 sitems.status=item[cstart].replace(/[\r\n]/g,"");
+			 sitems.code=item[cstart+1].replace(/[\r\n]/g,"");
+			 sitems.name=item[cstart+2].replace(/[\r\n]/g,"");
+			 sitems.odds=item[cstart+3].replace(/[\r\n]/g,"");
+			 sitems.enabled=1;
+			 if(parseFloat(sitems.odds)<=0){
+				 sitems.enabled=0;
+			 }
+			subitems.push(sitems);
+			subindex_start++;
+		}
+		tmp.items=subitems;
+		this.result.push(tmp);
+	}
+	console.log(JSON.stringify(this.result));
+}
+
+#CONTENT#

+ 46 - 0
collectSports/mcollect/hg0088/tmpl/today.tmpl

@@ -0,0 +1,46 @@
+var parent={};
+var top={};
+
+function checkCorner(item){
+	if(item.split('角球数')>1){
+		return 1;
+	}
+	return 0;
+}
+parent.body_var_onLoad=function(){
+	this.data={};
+
+	this.result=[];
+	
+	for(let index in this.gm)
+	{
+		var item=this.gm[index];
+		var col_length=item.length;
+		var tmp={};
+		tmp.match_id=index;
+		tmp.is_roll=0;
+		var tit=item[0];
+		tit=tit.split('<br>');
+		
+		tmp.is_roll=0;
+		if(tit.length>2){
+			tmp.is_roll=1;
+		}		
+		tmp.is_corner=checkCorner(item[4]);
+
+		this.result.push(tmp);
+	}
+	this.data.data=this.result;
+	console.log(JSON.stringify(this.data));
+
+
+}
+
+parent.arrayMege=function(o1,o2){
+
+}
+
+#CONTENT#
+
+onLoad();
+

+ 60 - 0
collectSports/mcollect/hg0088/tmpl/zaopan.tmpl

@@ -0,0 +1,60 @@
+
+var parent={};
+var top={};
+
+function checkCorner(item){
+	if(item.split('角球数')>1){
+		return 1;
+	}
+	return 0;
+}
+parent.body_var_onLoad=function(){
+	this.data={};
+	this.data.total_page=this.t_page;
+	this.data.retime=this.retime;
+
+	this.result=[];
+	
+	for(let index in G)
+	{
+		var item=this.GameFT[index];
+		var col_length=item.length;
+		var tmp={};
+		var date=new Date;
+		tmp.match_id=item[0];
+		var tit=item[1];
+		tit=tit.split('<br>');
+		var year=date.getFullYear();
+		tmp.is_roll=0;
+		if(tit.length>2){
+			tmp.is_roll=1;
+		}		
+		tmp.mdate=year+'-'+tit[0];
+		
+		tmp.mtime=tit[1];
+		tmp.half_match_id=item[22];
+		tmp.league_name=item[2];
+		tmp.host_id=item[3];
+		tmp.guest_id=item[4];
+		tmp.host_name=item[5];
+		tmp.guest_name=item[6];
+		tmp.league_id=item[39];
+		tmp.odds_num=item[34];
+		tmp.hot=item[36];
+		tmp.play=item[38];
+		tmp.special=item[45];
+		tmp.ptype=item[44];//联赛附属类型,比如,会晋级,角球数
+		tmp.is_corner=checkCorner(tmp.ptype);
+
+
+		this.result.push(tmp);
+	}
+	this.data.data=this.result;
+	console.log(JSON.stringify(this.data));
+}
+
+
+
+#CONTENT#
+
+onLoad();

+ 25 - 0
collectSports/mcollect/hg0088/tmpl/zhibo.tmpl

@@ -0,0 +1,25 @@
+
+var parent={};
+parent.parseGameList=function(){
+	this.result=[];
+	
+	for(let index in this.GameData)
+	{
+		var item=this.GameData[index];
+		var tmp={};
+		tmp.game_type=item[0];
+		tmp.start_time=item[2];
+		tmp.host_team=item[3];
+		tmp.guest_team=item[4];
+		tmp.doing=0;
+		tmp.showid=item[10];
+		tmp.shower=item[13];
+		if(item[6]=='Y'){
+			tmp.doing=1;
+		}
+		tmp.league_name=item[9];
+		this.result.push(tmp);
+	}
+	console.log(JSON.stringify(this.result));
+}
+#CONTENT#

+ 0 - 0
collectSports/mcollect/hg3535/__init__.py


+ 103 - 0
collectSports/middlewares.py

@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+
+# Define here the models for your spider middleware
+#
+# See documentation in:
+# https://doc.scrapy.org/en/latest/topics/spider-middleware.html
+
+from scrapy import signals
+
+
+class CollectsportsSpiderMiddleware(object):
+    # Not all methods need to be defined. If a method is not defined,
+    # scrapy acts as if the spider middleware does not modify the
+    # passed objects.
+
+    @classmethod
+    def from_crawler(cls, crawler):
+        # This method is used by Scrapy to create your spiders.
+        s = cls()
+        crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
+        return s
+
+    def process_spider_input(self, response, spider):
+        # Called for each response that goes through the spider
+        # middleware and into the spider.
+
+        # Should return None or raise an exception.
+        return None
+
+    def process_spider_output(self, response, result, spider):
+        # Called with the results returned from the Spider, after
+        # it has processed the response.
+
+        # Must return an iterable of Request, dict or Item objects.
+        for i in result:
+            yield i
+
+    def process_spider_exception(self, response, exception, spider):
+        # Called when a spider or process_spider_input() method
+        # (from other spider middleware) raises an exception.
+
+        # Should return either None or an iterable of Response, dict
+        # or Item objects.
+        pass
+
+    def process_start_requests(self, start_requests, spider):
+        # Called with the start requests of the spider, and works
+        # similarly to the process_spider_output() method, except
+        # that it doesn’t have a response associated.
+
+        # Must return only requests (not items).
+        for r in start_requests:
+            yield r
+
+    def spider_opened(self, spider):
+        spider.logger.info('Spider opened: %s' % spider.name)
+
+
+class CollectsportsDownloaderMiddleware(object):
+    # Not all methods need to be defined. If a method is not defined,
+    # scrapy acts as if the downloader middleware does not modify the
+    # passed objects.
+
+    @classmethod
+    def from_crawler(cls, crawler):
+        # This method is used by Scrapy to create your spiders.
+        s = cls()
+        crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
+        return s
+
+    def process_request(self, request, spider):
+        # Called for each request that goes through the downloader
+        # middleware.
+
+        # Must either:
+        # - return None: continue processing this request
+        # - or return a Response object
+        # - or return a Request object
+        # - or raise IgnoreRequest: process_exception() methods of
+        #   installed downloader middleware will be called
+        return None
+
+    def process_response(self, request, response, spider):
+        # Called with the response returned from the downloader.
+
+        # Must either;
+        # - return a Response object
+        # - return a Request object
+        # - or raise IgnoreRequest
+        return response
+
+    def process_exception(self, request, exception, spider):
+        # Called when a download handler or a process_request()
+        # (from other downloader middleware) raises an exception.
+
+        # Must either:
+        # - return None: continue processing this exception
+        # - return a Response object: stops process_exception() chain
+        # - return a Request object: stops process_exception() chain
+        pass
+
+    def spider_opened(self, spider):
+        spider.logger.info('Spider opened: %s' % spider.name)

+ 0 - 0
collectSports/models/__init__.py


BIN
collectSports/models/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/models/__pycache__/model.cpython-36.pyc


BIN
collectSports/models/__pycache__/zqLeague.cpython-36.pyc


+ 65 - 0
collectSports/models/model.py

@@ -0,0 +1,65 @@
+import biz
+
+
+class Model(dict):
+
+    def __init__(self):
+        self.db = biz.getDB()
+        self.cursor = self.db.getCursor()
+        self.conn = self.db.getConn()
+        pass
+
+    def query(self, sql, args=None):
+
+        self.cursor.execute(sql, args)
+        res = self.cursor.fetchall()
+        return res
+
+    def execute(self, sql, args=None):
+        try:
+            self.cursor.execute(sql, args)
+            self.conn.commit()
+        except BaseException as e:
+            print(e)
+
+    def select(self, conditions={}):
+        where = fields = limit = orderby = ''
+        limit = 'limit 1 offset 0'
+        if 'where' in conditions:
+            where = ' where ' + conditions['where']
+        if 'fields' in conditions:
+            fields = '  ' + conditions['fields']
+        if 'limit' in conditions:
+            limit_d = conditions['limit'].split(',')
+            limit = ' limit ' + limit_d[0] + ' offset ' + limit_d[1]
+        if 'orderby' in conditions:
+            orderby = '  order by ' + conditions['orderby']
+        s = "select %s from \"%s\" %s %s %s " % (fields, self.table_name, where, orderby, limit)
+        return self.query(s)
+
+    def update(self, data, where=''):
+        values = []
+        if where != '':
+            where = ' where %s' % (where)
+
+        for index in data:
+            s = "%s='%s'" % (index, data[index])
+            values.append(s)
+        sql = "update \"%s\" set %s  %s" % (self.table_name, ','.join(values), where)
+        return self.execute(sql)
+
+    def save(self, data):
+        fields = []
+        values = []
+        vls = ''
+
+        for index in data:
+            fields.append(index)
+            values.append(data[index])
+        if vls == '':
+            vls = ''
+        else:
+            vls = vls + ','
+        vls = vls + "('%s')" % '\',\''.join('%s' % id for id in values)
+        sql = "insert into \"%s\"(%s) values %s" % (self.table_name, ','.join(fields), vls)
+        return self.execute(sql)

+ 6 - 0
collectSports/models/zqChain.py

@@ -0,0 +1,6 @@
+from models.model import *
+class zqChain(Model):
+    table_name = 'zq_chain'
+    
+
+ 

+ 6 - 0
collectSports/models/zqLeague.py

@@ -0,0 +1,6 @@
+from models.model import *
+class zqLeague(Model):
+    table_name = 'zq_league'
+    
+
+ 

+ 4 - 0
collectSports/models/zqLeagueOut.py

@@ -0,0 +1,4 @@
+from models.model import *
+class zqLeagueOut(Model):
+    table_name = 'zq_league_out'
+    

+ 6 - 0
collectSports/models/zqMatch.py

@@ -0,0 +1,6 @@
+from models.model import *
+class zqMatch(Model):
+    table_name = 'zq_match'
+    
+
+ 

+ 12 - 0
collectSports/pipelines.py

@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+
+# Define your item pipelines here
+#
+# Don't forget to add your pipeline to the ITEM_PIPELINES setting
+# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
+
+
+class CollectsportsPipeline(object):
+    def process_item(self, item, spider):
+        pass
+        # return item

+ 0 - 0
collectSports/pipelines/__init__.py


BIN
collectSports/pipelines/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/pipelines/__pycache__/__init__.cpython-37.pyc


BIN
collectSports/pipelines/__pycache__/sports.cpython-36.pyc


BIN
collectSports/pipelines/__pycache__/sportslst.cpython-36.pyc


BIN
collectSports/pipelines/__pycache__/sportslst.cpython-37.pyc


+ 44 - 0
collectSports/pipelines/sports.py

@@ -0,0 +1,44 @@
+import copy
+import json
+
+import requests
+
+from collectSports.biz import getMongo
+
+
+class SportsPipeline(object):
+    def process_item(self, item, spider):
+        mongo = getMongo()
+        url = 'http://admin.5gogo.com/setSports'
+        match_id = item['match_id']
+        gidm = item['gidm']
+        # mongo.changeSet('zq_odds').insert(dict(item))
+        if item['content']:
+            odds_list = []
+            result = mongo.changeSet('zq_odds').find({'uuid': item['uuid']}).count()
+            if result >= 1:
+                pass
+            if result < 1:
+                contents = item['content']
+                for content in contents:
+                    if content['plodds'] and content['enabled']:
+                        for y in content['items']:
+                            condition = y['latio']
+                            if condition == None:
+                                condition = ''
+                            data = {"game_code": "zq", "title": "odds",
+                                    "data": {"match_id": match_id, "lg_id": gidm, "odds_code": y['lodds'], "status": 0,
+                                             "sort": 0, "p_code": content['plodds'], "odds": y['oddsv'],
+                                             "condition": condition, "odds_only": y['uid'], "sole": y['uid'],
+                                             "source": "hg0088", "type": 0,
+                                             "team": ""}
+                                    }
+                            data1 = copy.deepcopy(data)
+                            odds_list.append(data1)
+            mongo.changeSet('zq_odds').insert(dict(item))
+            # if odds_list:
+            if odds_list:
+                r = requests.post(url, data={"data": json.dumps(odds_list)})
+                print(r.text)
+                print(odds_list)
+        # return item

+ 40 - 0
collectSports/pipelines/sportslst.py

@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+
+# Define your item pipelines here
+#
+# Don't forget to add your pipeline to the ITEM_PIPELINES setting
+# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
+import json
+import pymongo
+
+import requests
+
+from collectSports.biz import getMongo
+from pycomm.mongo import DBMongo
+
+
+class SportslstPipeline(object):
+    # def open_spider(self, spider):
+    #     self.host = '192.168.2.200'
+    #     self.port = 27017
+    #     self.dbname = 'kaiyou'  # 数据库名
+    #     self.client = pymongo.MongoClient(host=self.host, port=self.port)
+    #     self.tdb = self.client[self.dbname]
+    #     self.port = self.tdb['zq_league']  # 表名
+    # #     competition
+    #     self.port2 = self.tdb['zq_competition']  # 表名
+    def process_item(self, item, spider):
+        mongo = getMongo()
+        print(mongo)
+        zaopan = item['csource']
+        if zaopan == 'zaopan':
+            zq_leagues = set(item['zq_league'])
+            zq_matchs = set(item['zq_match'])
+            for zq_league in zq_leagues:
+                mongo.changeSet('zq_league').insert(dict(zq_league))
+            for zq_match in zq_matchs:
+                mongo.changeSet('zq_competition').insert(dict(zq_match))
+            # return item
+
+    # def close_spider(self, spider):
+    #     self.client.close()

+ 74 - 0
collectSports/requirements.txt

@@ -0,0 +1,74 @@
+aiopg==0.16.0
+APScheduler==3.6.0
+asn1crypto==0.24.0
+asyncio==3.4.3
+attrs==19.1.0
+Automat==0.7.0
+certifi==2019.3.9
+cffi==1.12.2
+chardet==3.0.4
+Click==7.0
+colorama==0.4.1
+constantly==15.1.0
+cryptography==2.6.1
+cssselect==1.0.3
+defusedxml==0.5.0
+et-xmlfile==1.0.1
+Flask==1.0.2
+Flask-Login==0.4.1
+hyperlink==18.0.0
+idna==2.8
+incremental==17.5.0
+inotify==0.2.10
+itsdangerous==1.1.0
+jdcal==1.4
+Jinja2==2.10
+jmespath==0.9.4
+jsmin==2.2.2
+jsonpath==0.81
+lxml==4.3.2
+MarkupSafe==1.1.1
+nose==1.3.7
+openpyxl==2.6.1
+parsel==1.5.1
+peewee==2.8.0
+psycopg2==2.7.7
+psycopg2-binary==2.8
+pyasn1==0.4.5
+pyasn1-modules==0.2.4
+pycparser==2.19
+pycurl==7.43.0.2
+pydispatch==1.1.0
+PyDispatcher==2.0.5
+PyHamcrest==1.9.0
+pymongo==3.8.0
+PyMySQL==0.9.3
+pyOpenSSL==19.0.0
+pypiwin32==223
+pyquery==1.4.0
+pyspider==0.3.10
+python-dateutil==2.8.0
+pytz==2018.9
+pywin32==224
+PyYAML==3.13
+queuelib==1.5.0
+redis==3.2.1
+requests==2.21.0
+schedule==0.6.0
+Scrapy==1.6.0
+scrapy-redis==0.6.8
+scrapy-splash==0.7.2
+scrapyd-client==1.1.0
+service-identity==18.1.0
+six==1.12.0
+tblib==1.3.2
+tornado==4.5.3
+Twisted==18.9.0
+tzlocal==1.5.1
+u-msgpack-python==2.5.1
+urllib3==1.24.1
+uuid==1.30
+w3lib==1.20.0
+Werkzeug==0.14.1
+WsgiDAV==2.4.1
+zope.interface==4.6.0

+ 92 - 0
collectSports/settings.py

@@ -0,0 +1,92 @@
+# -*- coding: utf-8 -*-
+
+# Scrapy settings for collectSports project
+#
+# For simplicity, this file contains only settings considered important or
+# commonly used. You can find more settings consulting the documentation:
+#
+#     https://doc.scrapy.org/en/latest/topics/settings.html
+#     https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
+#     https://doc.scrapy.org/en/latest/topics/spider-middleware.html
+
+BOT_NAME = 'collectSports'
+
+SPIDER_MODULES = ['collectSports.spiders']
+NEWSPIDER_MODULE = 'collectSports.spiders'
+
+
+# Crawl responsibly by identifying yourself (and your website) on the user-agent
+#USER_AGENT = 'collectSports (+http://www.yourdomain.com)'
+
+# Obey robots.txt rules
+ROBOTSTXT_OBEY = False
+
+# Configure maximum concurrent requests performed by Scrapy (default: 16)
+#CONCURRENT_REQUESTS = 32
+
+# Configure a delay for requests for the same website (default: 0)
+# See https://doc.scrapy.org/en/latest/topics/settings.html#download-delay
+# See also autothrottle settings and docs
+#DOWNLOAD_DELAY = 3
+# The download delay setting will honor only one of:
+#CONCURRENT_REQUESTS_PER_DOMAIN = 16
+#CONCURRENT_REQUESTS_PER_IP = 16
+
+# Disable cookies (enabled by default)
+#COOKIES_ENABLED = False
+
+# Disable Telnet Console (enabled by default)
+#TELNETCONSOLE_ENABLED = False
+
+# Override the default request headers:
+#DEFAULT_REQUEST_HEADERS = {
+#   'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
+#   'Accept-Language': 'en',
+#}
+
+# Enable or disable spider middlewares
+# See https://doc.scrapy.org/en/latest/topics/spider-middleware.html
+#SPIDER_MIDDLEWARES = {
+#    'collectSports.middlewares.CollectsportsSpiderMiddleware': 543,
+#}
+
+# Enable or disable downloader middlewares
+# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
+#DOWNLOADER_MIDDLEWARES = {
+#    'collectSports.middlewares.CollectsportsDownloaderMiddleware': 543,
+#}
+
+# Enable or disable extensions
+# See https://doc.scrapy.org/en/latest/topics/extensions.html
+#EXTENSIONS = {
+#    'scrapy.extensions.telnet.TelnetConsole': None,
+#}
+
+# Configure item pipelines
+# See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
+#ITEM_PIPELINES = {
+#    'collectSports.pipelines.CollectsportsPipeline': 300,
+#}
+
+# Enable and configure the AutoThrottle extension (disabled by default)
+# See https://doc.scrapy.org/en/latest/topics/autothrottle.html
+#AUTOTHROTTLE_ENABLED = True
+# The initial download delay
+#AUTOTHROTTLE_START_DELAY = 5
+# The maximum download delay to be set in case of high latencies
+#AUTOTHROTTLE_MAX_DELAY = 60
+# The average number of requests Scrapy should be sending in parallel to
+# each remote server
+#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
+# Enable showing throttling stats for every response received:
+#AUTOTHROTTLE_DEBUG = False
+
+# Enable and configure HTTP caching (disabled by default)
+# See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
+#HTTPCACHE_ENABLED = True
+#HTTPCACHE_EXPIRATION_SECS = 0
+#HTTPCACHE_DIR = 'httpcache'
+#HTTPCACHE_IGNORE_HTTP_CODES = []
+#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
+
+

+ 5 - 0
collectSports/spiders/__init__.py

@@ -0,0 +1,5 @@
+# This package will contain the spiders of your Scrapy project
+#
+# Please refer to the documentation for information on how to create and manage
+# your spiders.
+

BIN
collectSports/spiders/__pycache__/__init__.cpython-36.pyc


BIN
collectSports/spiders/__pycache__/__init__.cpython-37.pyc


BIN
collectSports/spiders/__pycache__/demo.cpython-36.pyc


BIN
collectSports/spiders/__pycache__/setdata.cpython-36.pyc


BIN
collectSports/spiders/__pycache__/sports.cpython-36.pyc


BIN
collectSports/spiders/__pycache__/sports.cpython-37.pyc


BIN
collectSports/spiders/__pycache__/sportslst.cpython-36.pyc


BIN
collectSports/spiders/__pycache__/sportslst.cpython-37.pyc


+ 20 - 0
collectSports/spiders/demo.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+import scrapy
+from models.zqLeague import *
+
+
+class DemoSpider(scrapy.Spider):
+    name = 'demo'
+    allowed_domains = ['baidu.com']
+    start_urls = ['http://baidu.com/']
+
+    def start_requests(self):
+        so = zqLeague()
+        # so.select(league_id=3)
+        # so.league_name='china no 1'
+        print(so.update({'league_id': 1, 'league_name': 'ttt'}, 'league_id=3'))
+        request = scrapy.FormRequest('https://baidu.com', callback=self.parse)
+        yield request
+
+    def parse(self, response):
+        pass

+ 9 - 0
collectSports/spiders/setdata.py

@@ -0,0 +1,9 @@
+import hashlib
+
+
+def hash_func(lodds, rodds, ratio, ratio_name, oddsv):
+    m = hashlib.md5()
+    a = str(lodds) + str(rodds) + str(ratio) + str(ratio_name) + str(oddsv)
+    m.update(a.encode('utf-8'))
+    c = m.hexdigest()
+    return c

+ 109 - 0
collectSports/spiders/sports.py

@@ -0,0 +1,109 @@
+# -*- coding: utf-8 -*-
+import copy
+import time
+
+import scrapy
+import lxml.etree
+import pycomm
+import json
+
+from collectSports.biz import getMongo
+from collectSports.items import Odds
+from collectSports.spiders.setdata import hash_func
+
+
+class SportsSpider(scrapy.Spider):
+    name = 'sports'
+    allowed_domains = ['hg0088.com']
+    # start_urls = ['http://hg0088.com/']
+    custom_settings = {
+        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
+        "Accept-Encoding": "gzip, deflate",
+        "Accept-Language": "zh-CN,zh;q=0.8",
+        "Cache-Control": "max-age=0",
+        "Connection": "keep-alive",
+        # "Cookie": "OddType@21627573=H; protocolstr=http; gamePoint_21627573=2019-05-10%2A0%2A0; _ga=GA1.4.601418716.1557495256; _gid=GA1.4.1118061739.1557495256",
+        "Cookie": "OddType@21627573=H; _ga=GA1.4.773413111.1560825258; _gid=GA1.4.1960743904.1560825258; protocolstr=https; gamePoint_21627573=2019-06-18%2A2%2A0; _gat_UA-75448111-1=1",
+        "Host": "205.201.4.177",
+        "Origin": "https://205.201.4.177",
+        "USER_AGENT": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 UBrowser/6.2.4098.3 Safari/537.36",
+        "ITEM_PIPELINES": {
+            "collectSports.pipelines.sports.SportsPipeline": 200,
+        }
+    }
+
+    start_url = 'https://205.201.4.177/app/member/get_game_allbets.php'
+
+    def start_requests(self):
+        url = self.start_url
+        mongo = getMongo()
+        zq_competitions = mongo.changeSet('zq_competition').find()
+        for zq_competition in zq_competitions:
+            match_id = str(zq_competition['match_id'])
+            # uuid = zq_competition['uuid']
+            form_data = {
+                "uid": "jjdpzpc07m21627573l376834",
+                "langx": "zh-cn",
+                "gtype": "FT",
+                "showtype": "FT",
+                "gid": match_id,
+                "ltype": "4",
+                "date": pycomm.gmdate()
+            }
+            request = scrapy.FormRequest(url, formdata=form_data, callback=self.parse, dont_filter=True, meta={'match_id': match_id})
+            yield request
+
+    def parse(self, response):
+        game_list = []
+        games = response.xpath('/serverresponse/game')
+        match_id = response.meta['match_id']
+        uid_list = []
+        for game in games:
+            game_odds = {}
+            game = lxml.etree.fromstring(game.extract())
+            for i in game.getchildren():
+                game_odds[i.tag] = i.text
+            game_list.append(game_odds)
+        with open('../collectSports/conf/hg0088.json', 'r', encoding='utf8') as hg:
+            hg0088 = json.load(hg)['root']
+        odd_list = []
+        for x in hg0088:
+            try:
+                enabled = game_list[0][x['prodds']]
+                if enabled == 'Y':
+                    x['enabled'] = 1
+                else:
+                    x['enabled'] = 0
+            except:
+                x['enabled'] = 0
+            items = x['items']
+            new_items = []
+            for y in items:
+                try:
+                    y['oddsv'] = game_list[0][y['rodds']]
+                except:
+                    y['oddsv'] = 0
+                try:
+                    y['ratio'] = game_list[0][y['ratio_name']]
+                except:
+                    y['ratio'] = ""
+                uid = hash_func(y['lodds'], y['rodds'], y['ratio'], y['ratio_name'], y['oddsv'])
+                y['uid'] = uid
+                uid_list.append(uid)
+                new_items.append(y)
+            n_i = copy.deepcopy(x)
+            n_i['items'] = new_items
+            odd_list.append(n_i)
+        if game_list:
+            gidm = game_list[0].get('gidm', '')
+        else:
+            gidm = ''
+        # print(response.text)
+        item = Odds()
+        item['match_id'] = match_id
+        item['uuid'] = uid_list
+        item['source'] = "hg0088"
+        item['updata'] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
+        item['content'] = odd_list
+        item['gidm'] = gidm
+        yield item

+ 97 - 0
collectSports/spiders/sportslst.py

@@ -0,0 +1,97 @@
+# -*- coding: utf-8 -*-
+import scrapy, lxml.etree, pycomm, json
+from collectSports.items import *
+# from mcollect.hg0088 import Resolver
+from biz.zqleague import zqLeague
+
+
+class SportslstSpider(scrapy.Spider):
+    curSrc = None
+    name = 'sportslst'
+    allowed_domains = ['hg0088.com']
+    # start_urls = ['http://hg0088.com/']
+    custom_settings = {
+        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
+        "Accept-Encoding": "gzip, deflate",
+        "Accept-Language": "zh-CN,zh;q=0.8",
+        "Cache-Control": "max-age=0",
+        "Connection": "keep-alive",
+        "Cookie": "OddType@21627573=H; protocolstr=http; gamePoint_21627573=2019-05-10%2A0%2A0; _ga=GA1.4.601418716.1557495256; _gid=GA1.4.1118061739.1557495256",
+        "Host": "199.26.100.178",
+        "USER_AGENT": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 UBrowser/6.2.4098.3 Safari/537.36",
+        "ITEM_PIPELINES": {
+            "collectSports.pipelines.sportslst.SportslstPipeline": 200,
+        }
+    }
+
+    # start_url= 'http://199.26.100.178/app/member/get_game_allbets.php'
+
+    def start_requests(self):
+        self.curSrc = source = self.getCurrentSource()
+        mc = __import__('mcollect.' + source)
+        srcObj = getattr(mc, source)
+        # zl=zqLeague()
+        # zl.update({'league_id':1})
+        for item in srcObj.links:
+            url = item['url'].format(uid=srcObj.uid, page=1)
+            if not item['cb']:
+                params = 'default'
+            else:
+                params = str(item['cb'])
+            request = scrapy.FormRequest(url, callback=self.parse, meta={'cb': params, 'subdel': 0})
+            yield request
+
+    def getCurrentSource(self):
+        conf = pycomm.getCache('conf')
+        if 'currentSource' in conf:
+            return conf['currentSource']
+        return
+
+    def parse(self, response):
+        cb = response.meta['cb']
+        subdel = response.meta['subdel']
+        mc = __import__('mcollect.' + self.curSrc + '.Resolver', fromlist=True)
+        res = mc.Resolver()
+        cbk = getattr(res, cb)
+        re = cbk(response.body)
+        re = json.loads(re)
+        print(subdel)
+        if subdel == 0:
+            if 'total_page' in re:
+                self.subStart_request(re['total_page'], response.url, response.meta['cb'], 'page_no')
+                print(6666)
+        mcs = __import__('mcollect.' + self.curSrc + '.Storage', fromlist=True)
+        ress = mcs.Storage()
+        cbks = getattr(ress, cb)
+        result = cbks(re)
+        cb = response.meta['cb']
+        subdel = response.meta['subdel']
+        mc = __import__('mcollect.' + self.curSrc + '.Resolver', fromlist=True)
+        res = mc.Resolver()
+        cbk = getattr(res, cb)
+        re = cbk(response.body)
+        re = json.loads(re)
+
+        if subdel == 0:
+            if 'total_page' in re:
+                self.subStart_request(re['total_page'], response.url, response.meta['cb'], 'page_no')
+
+        mcs = __import__('mcollect.' + self.curSrc + '.Storage', fromlist=True)
+        ress = mcs.Storage()
+        cbks = getattr(ress, cb)
+        result = cbks(re)
+        yield result
+
+    def subStart_request(self, total_page, url, cb, page_name='page'):
+        while total_page > 1:
+            print(1111)
+            newurl = url.replace(page_name + '=0', page_name + '=' + total_page)
+            newurl = newurl.replace(page_name + '=1', page_name + '=' + total_page)
+            print(newurl)
+            if not cb:
+                params = 'default'
+            else:
+                params = str(cb)
+            request = scrapy.FormRequest(newurl, callback=self.parse, meta={'cb': params, 'subdel': 1})
+            total_page = total_page - 1
+            yield request

+ 1 - 0
pycomm/.gitignore

@@ -0,0 +1 @@
+/__pycache__/*.pyc

+ 2 - 0
pycomm/README.md

@@ -0,0 +1,2 @@
+# pycomm
+#DB  Connect 需要安装pymysql,psycopg2,pymongo模块

+ 298 - 0
pycomm/__init__.py

@@ -0,0 +1,298 @@
+#!/usr/bin/env python3
+# -*- coding: UTF-8 -*-
+import json,sys
+import codecs
+import os,io
+from urllib import parse, request
+import subprocess
+import asyncio
+import time
+import hashlib
+import random
+import logging
+import logging.config
+import base64
+import datetime
+import tempfile
+_sysCache={}
+# 设定缓存数据
+def setCache(key,value):
+    _sysCache[key]=value
+# 得到缓存数据
+def getCache(key):
+    if key in _sysCache:
+        return _sysCache.get(key)
+    else:
+        return
+def _import(lib,target=-1):
+    if target==-1:
+        return __import__(lib)
+    else:
+        return __import__(lib,fromlist=(target))
+
+# 得到上级绝对路径
+def getAbsPath():
+    return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+def b64encode(enstr):
+    ss = base64.b64encode(enstr.encode('utf-8'))
+    ss = str(ss.decode('utf-8'))
+    return ss
+
+
+def b64decode(destr):
+    ss = base64.b64decode(destr.encode('utf-8'))
+    ss = str(ss.decode('utf-8'))
+    return ss
+
+
+def ldjson(filename):
+    with open(filename, "r") as data:
+        # if data.startswith(u'\ufeff'):
+        #     data = data.encode('utf8')[3:].decode('utf8')
+        data = json.load(data)
+        return data
+    return
+
+
+def md5(md5str):
+    return hashlib.md5(md5str.encode(encoding='UTF-8')).hexdigest()
+
+
+def uri(url):
+    with request.urlopen(url) as f:
+        data = f.read()
+        result = data.decode('utf-8')
+        return json.loads(result)
+
+
+def uri2(url):
+    with request.urlopen(url) as f:
+        data = f.read()
+        result = data.decode('utf-8')
+        return result
+# 加载json文件
+
+
+def loadJson(filename, charset='utf-8'):
+    with open(filename, "r", charset) as data:
+        # if data.startswith(u'\ufeff'):
+        #     data = data.encode('utf8')[3:].decode('utf8')
+        data = json.load(data)
+        return data
+    return
+
+
+# 打开新线程执行
+def asyncExecCmd(cmd):
+    return execApp(cmd, 1)
+
+
+# 解析固定标签
+def parseVar(data):
+    data = data.replace('[RAND]', str(random.random()))
+    data = data.replace('[MSTIME]', str(gmtime() * 1000))
+    data = data.replace('[TIME]', str(gmtime()))
+    data = data.replace('[DATE]', str(gmdate()))
+    return data
+# 执行系统命令
+
+# 解析动态标签
+def parseTag(data,name,value,tag='#'):
+    data = data.replace((tag+name+tag), (value))
+    return data
+
+
+def exejs(cmd, charset='utf-8'):
+    data = __subprocess(cmd)
+    if not data:
+        return ''
+    else:
+        return str(data)
+
+
+def execApp(cmd, isback=0, charset='utf-8'):
+    data = __subprocess(cmd)
+    if isback == 0:
+        pass
+    else:
+        return str(data)
+
+
+def execCmd(cmd, charset='utf-8'):
+    return __subprocess(cmd)
+
+
+def __subprocess(cmd):
+    rt_list=''
+
+    try:
+        # 得到一个临时文件对象, 调用close后,此文件从磁盘删除
+        out_temp = tempfile.TemporaryFile(mode='w+',encoding='utf-8')
+        # 获取临时文件的文件号
+        fileno = out_temp.fileno()
+
+        # 执行外部shell命令, 输出结果存入临时文件中
+        p = subprocess.Popen(cmd, shell=True, stdout=fileno, stderr=fileno)
+        p.wait()
+        # 从临时文件读出shell命令的输出结果
+        out_temp.seek(0)
+        rt = out_temp.read()
+        # 以换行符拆分数据,并去掉换行符号存入列表
+        rt_list = rt.strip().split('\n')
+        
+
+    except Exception as e:
+        print(e)
+    finally:
+        if out_temp:
+            out_temp.close()
+    return ''.join(rt_list)
+
+
+def toLog(message, ftype=0):
+    logger = logging.getLogger()
+    logger.propagate = False
+    filename = time.strftime('%Y-%m-%d', time.localtime(time.time()))
+    filename2 = time.strftime('%H', time.localtime(time.time()))
+    handler = logging.StreamHandler()
+
+    if not os.path.exists("./log/" + filename + "/"):
+        try:
+            os.makedirs("./log/" + filename + "/")
+        except Exception as ex:
+            pass
+    if ftype == 0:
+        ftype = ''
+    else:
+        ftype = ftype+"."
+    handler_file = logging.FileHandler(
+        "./log/" + filename + "/" + ftype + filename2 + ".err")
+    logger.addHandler(handler)
+    logger.addHandler(handler_file)
+    logger.setLevel(logging.NOTSET)
+    nowtime = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
+    logger.info({'time': nowtime, 'info': message})
+    logger.removeHandler(handler)
+    logger.removeHandler(handler_file)
+
+
+def time2utc(strtime):
+    strtime = time.strptime(strtime, "%Y-%m-%d %H:%M:%S")
+    strtime = int(time.mktime(strtime))
+    return strtime
+
+
+def timeofHmd2utc(hmd):
+    curDate = time.strftime("%Y-%m-%d", time.localtime())
+    checkToTime = time2utc(curDate + ' ' + hmd)
+    return checkToTime
+
+
+def gmtime():
+    return int(time.time())
+
+
+def gmdate():
+    return utc2timestamp(int(time.time()))
+
+
+def saveFile(path, data):
+    with open(path, "w", encoding='utf-8') as f:
+        f.write(data)
+
+
+def appendFile(path, data):
+    with open(path, "a+", encoding='utf-8') as f:
+        f.write(data)
+
+
+def readFile(path):
+    with open(path, "r", encoding='utf8') as f:
+        return f.read()
+    return
+
+
+def utc2timestamp(nowtime):
+    time_local = time.localtime(nowtime)  # 转换成新的时间格式(2016-05-05 20:28:54)
+    dt = time.strftime("%Y-%m-%d %H:%M:%S", time_local)
+    return dt
+
+
+def parseListByXpath(data, path):
+    path = path.split('/')
+    for item in path:
+        if data[item]:
+            data = data[item]
+    return data
+
+
+def postData(url, data):
+
+    textmod = data
+    textmod = parse.urlencode(textmod).encode(encoding='utf-8')
+    pycomm.toLog(textmod, 'post')
+    # 输出内容:user=admin&password=admin
+    header_dict = {
+        'User-Agent':
+        'Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko'
+    }
+    try:
+        req = request.Request(url=url, data=textmod, headers=header_dict)
+        res = request.urlopen(req)
+        res = res.read()
+        pycomm.toLog(res, 'post')
+    except Exception as e:
+        # appendFile(os.path.abspath(os.curdir) + '/log/post.log',str({'data':textmod,'url':url}))
+        pycomm.toLog("Unexpected Error: {}".format(e), 'post')
+
+    # 输出内容(python3默认获取到的是16进制'bytes'类型数据 Unicode编码,如果如需可读输出则需decode解码成对应编码):b'\xe7\x99\xbb\xe5\xbd\x95\xe6\x88\x90\xe5\x8a\x9f'
+    # pycomm.toLog(res.decode(encoding='utf-8'))
+    # 输出内容:登录成功
+
+
+def getAsyncLoog():
+    try:
+        loop = asyncio.get_event_loop()
+        if(loop.is_running()):
+            loop = getNewLoop()
+        if(loop.is_closed()):
+            loop = getNewLoop()
+    except Exception as ex:
+        loop = getNewLoop()
+
+
+def asyncExec(tasks):
+    try:
+        loop = asyncio.get_event_loop()
+        if(loop.is_running()):
+            loop = getNewLoop()
+        if(loop.is_closed()):
+            loop = getNewLoop()
+    except Exception as ex:
+        loop = getNewLoop()
+    # 执行coroutine
+    loop.run_until_complete(asyncio.gather(*tasks))
+    loop.close()
+    return loop
+    # loop.close()
+
+
+def getNewLoop():
+    loop = asyncio.new_event_loop()
+    asyncio.set_event_loop(loop)
+    return loop
+# item=[{url:,data:}]
+# 异步提交数据
+
+
+def asyncPost(item):
+    if not item:
+        return
+    tasks = []
+    for it in item:
+        tasks.append(asyncCommit(it['url'], it['data']))
+    asyncExec(tasks)
+
+
+async def asyncCommit(url, data):
+    postData(url, data)

+ 88 - 0
pycomm/db.py

@@ -0,0 +1,88 @@
+#!/usr/bin/env python3
+# -*- coding: UTF-8 -*-
+import pymysql
+import psycopg2
+
+
+class DB():
+
+    def __init__(self, DB_HOST, DB_PORT, DB_USER, DB_PWD, DB_NAME, DB='mysql'):
+        self.DB_HOST = DB_HOST  # 设置MYSQL地址
+        self.DB_PORT = DB_PORT  # 设置端口号
+        self.DB_USER = DB_USER  # 设置用户名
+        self.DB_PWD = DB_PWD  # 设置密码
+        self.DB_NAME = DB_NAME  # 数据库名
+        self.DB = DB  # 连接哪种数据库,mysql或者pgsql
+        self.conn = self.getConnection()
+
+    def getConnection(self):
+        # 连接哪种数据库
+        if self.DB == 'pgsql':
+            return psycopg2.connect(
+                host=self.DB_HOST,
+                port=self.DB_PORT,
+                user=self.DB_USER,
+                password=self.DB_PWD,
+                database=self.DB_NAME,
+
+            )
+        elif self.DB == 'mysql':
+            return pymysql.Connect(
+                host=self.DB_HOST,
+                port=self.DB_PORT,
+                user=self.DB_USER,
+                password=self.DB_PWD,
+                database=self.DB_NAME,
+                charset='utf8'
+            )
+        else:
+            raise ("请选择正确连接数据库方式,mysql或者pgsql")
+    def close(self):
+        self._close(self.conn.cursor())
+    # 查询方法
+    def query(self, sqlString):
+        cursor = self.conn.cursor()
+        cursor.execute(sqlString)
+        returnData = cursor.fetchall()
+        # self._close(cursor)
+        return returnData
+
+
+    def getConn(self):
+        return self.conn
+
+    def getCursor(self):
+        return self.conn.cursor()
+
+    # 获取单条数据
+    def find_one(self, sqlString):
+        cursor = self.conn.cursor()
+        cursor.execute(sqlString)
+        returnData = cursor.fetchone()
+        self._close(cursor)
+        return returnData
+
+    # 不带参数的更新方法
+    def update(self, sqlString):
+        cursor = self.conn.cursor()
+        cursor.execute(sqlString)
+        self.conn.commit()
+
+    # 带参数的更新方法
+    def updateByParam(self, sqlString, params):
+        cursor = self.conn.cursor()
+        cursor.execute(sqlString, params)
+        self.conn.commit()
+        self._close(cursor)
+
+    # 关闭回收资源
+    def _close(self, cursor):
+        cursor.close()
+        self.conn.close()
+
+
+# if __name__ == "__main__":
+    # db = DB('localhost', 3306, 'root', '123456', 'zuqiu')
+    # sql = "show create table dc_sclassinfo;"
+    # result = db.query(sql)
+    # pycomm.toLog(result)

+ 56 - 0
pycomm/mongo.py

@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+from pymongo import MongoClient
+import pycomm
+
+# settings = {
+#     "ip": '192.168.2.200',  # ip
+#     "port": 27017,  # 端口
+#     "db_name": "kaiyou",  # 数据库名字
+#     "set_name": "test_set",  # 集合名字
+#     "user": '',
+#     'pwd': '',
+# }
+
+
+class DBMongo(object):
+
+    def __init__(self, host, dbname, user, pwd, port):
+        try:
+            uri = 'mongodb://' + user + ':' + pwd + '@' + host + ':' + port + '/' + dbname
+            print(uri)
+            self.conn = MongoClient(uri)
+            self.db = self.conn[dbname]
+
+        except Exception as e:
+            pycomm.toLog(e)
+
+    # 选定数据集
+    def changeSet(self,setname):
+        return self.db[setname]
+        
+
+
+
+# def main():
+    # mongo = MongoDataBase('192.168.0.250', 'kaiyou','kaiyou', 'ky123456', '27017').changeSet('prize')
+    # pycomm.toLog('no cmd')
+    # dic = {"name": "zhangsan", "age": 18}
+
+    # mongo.insert(dic)
+    # pycomm.toLog(mongo.find_one({"name":"zhangsan"}))
+#     return
+    # dic = {"name":"zhangsan", "age":18}
+    # mongo = MyMongoDB()
+    # mongo.insert(dic)
+    # mongo.dbfind({"name":"zhangsan"})
+
+    # mongo.update({"name":"zhangsan"}, {"$set":{"age":"25"}})
+    # mongo.dbfind({"name":"zhangsan"})
+
+    # mongo.delete({"name":"zhangsan"})
+    # mongo.dbfind({"name":"zhangsan"})
+
+
+# if __name__ == "__main__":
+#     main()

+ 43 - 0
pycomm/redisop.py

@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# -*- coding:utf-8 -*-
+import redis
+
+
+class RedisHelper:
+
+    def __init__(self, host1, port1, password1):
+        # 链接服务端        
+        self.__conn = redis.Redis(host=host1, port=port1, password=password1)
+
+    def public(self, channel_public, msg):
+        # 发消息订阅方
+        # publish发消息加入频道chan_pub
+        self.__conn.publish(channel_public, msg)
+        
+    def getConn(self):
+        return self.__conn
+    def subscribe(self, channel_subscribe):
+        # 开始订阅pubsub()
+        # 打开收音机
+        pub = self.__conn.pubsub()
+
+        # 调频道 subscribe
+        pub.subscribe(channel_subscribe)
+
+        # 准备接收parse_response()
+        # 在次调用parse_response() 开始接收
+        pub.parse_response()
+
+        # 返回订阅变量
+        return pub
+
+# obj = RedisHelper()
+
+# # 赋值订阅变量
+# redis_sub = obj.subscribe('kyevent')
+# # obj.public('kyevent', 'hello')
+# # # 循环执行如下命令
+# while True:
+#     # 二次调用parse_response() 开始接收
+#     msg = redis_sub.parse_response()
+#     pycomm.toLog(msg)

+ 58 - 0
pycomm/sqlite.py

@@ -0,0 +1,58 @@
+#!/usr/bin/env python3
+# -*- coding: UTF-8 -*-
+import sqlite3
+ 
+ 
+class DBSqlite:
+    """
+    sqlite数据库操作工具类
+    database: 数据库文件地址,例如:db/mydb.db
+    """
+    _connection = None
+ 
+    def __init__(self, database):
+        # 连接数据库
+        self._connection = sqlite3.connect(database)
+ 
+    def _dict_factory(self, cursor, row):
+        d = {}
+        for idx, col in enumerate(cursor.description):
+            d[col[0]] = row[idx]
+        return d
+ 
+    def execute(self, sql, args=[], result_dict=True, commit=True) -> list:
+        """
+        执行数据库操作的通用方法
+        Args:
+        sql: sql语句
+        args: sql参数
+        result_dict: 操作结果是否用dict格式返回
+        commit: 是否提交事务
+        Returns:
+        list 列表,例如:
+        [{'id': 1, 'name': '张三'}, {'id': 2, 'name': '李四'}]
+        """
+        if result_dict:
+            self._connection.row_factory = self._dict_factory
+        else:
+            self._connection.row_factory = None
+        # 获取游标
+        _cursor = self._connection.cursor()
+        # 执行SQL获取结果
+        _cursor.execute(sql, args)
+        if commit:
+            self._connection.commit()
+        data = _cursor.fetchall()
+        _cursor.close()
+        return data
+ 
+ 
+if __name__ == '__main__':
+    # db = DBSqlite('browser.db')
+    # pycomm.toLog(db.execute("select name from sqlite_master where type=?", ['table']))
+    # pycomm.toLog(db.execute("pragma table_info([user])"))
+    # pycomm.toLog(execute("insert into user(id, name, password) values (?, ?, ?)", [2, "李四", "123456"]))
+    # pycomm.toLog(db.execute("select id, name userName, password pwd from user"))
+    # pycomm.toLog(db.execute("select * from user", result_dict=False))
+    # pycomm.toLog(db.execute("select * from user"))
+    pass

+ 11 - 0
scrapy.cfg

@@ -0,0 +1,11 @@
+# Automatically created by: scrapy startproject
+#
+# For more information about the [deploy] section see:
+# https://scrapyd.readthedocs.io/en/latest/deploy.html
+
+[settings]
+default = collectSports.settings
+
+[deploy]
+#url = http://localhost:6800/
+project = collectSports