roll_zuqiu.py 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. # -*- coding: utf-8 -*-
  2. # import copy
  3. import datetime
  4. import json
  5. # import jsonpath
  6. import time
  7. import redis
  8. import scrapy
  9. from scrapy.http import Request
  10. from ..settings import R_HOST, R_PASSWORD, R_POST, R_DB
  11. from ..items import Roll_Zuqiu
  12. class ZuqiuSpider(scrapy.Spider):
  13. name = 'roll_zuqiu'
  14. to_day = datetime.datetime.now()
  15. allowed_domains = ['hg3535z.com']
  16. custom_settings = {
  17. "ITEM_PIPELINES":{
  18. 'hg3535.pipeline.roll_zuqiu.Roll_Zuqiupipeline': 200,
  19. },
  20. # 'LOG_LEVEL': 'DEBUG',
  21. # 'LOG_FILE': "../hg3535/log/roll_zuqiu_{}_{}_{}.log".format(to_day.year, to_day.month,to_day.day)
  22. }
  23. start_urls = ['https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/1/pt/4/ubt/am/pn/0/sb/2/dc/null/pid/0']
  24. rls = redis.Redis(host=R_HOST, port=R_POST, db=R_DB, password=R_PASSWORD)
  25. def parse(self, response):
  26. responses = json.loads(response.text)
  27. try:
  28. datas = responses["i-ot"]
  29. except:
  30. print("暂无滚球篮球数据")
  31. return
  32. if datas:
  33. for data in datas:
  34. egs = data.get('egs')
  35. if egs:
  36. for es in egs:
  37. es = es['es']
  38. for e in es:
  39. match_id = e['K']
  40. up_time = str(time.time()) + '&' + 'zq'
  41. self.rls.sadd('hg3535.gunqiu.ids', match_id)
  42. self.rls.hset('hg3535.ball.ids', match_id, up_time)
  43. url = 'https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/{}/iip/true/ubt/am/isp/false'.format(match_id)
  44. yield Request(url=url, callback=self.parse_each, dont_filter=True)
  45. else:
  46. print('足球滚球数据为空')
  47. else:
  48. print("暂无滚球足球数据")
  49. return
  50. def parse_each(self, response):
  51. # 球队进球数 大小
  52. try:
  53. datas = json.loads(response.text)['eg']['es']
  54. league_id = json.loads(response.text)['eg']['c']['k']
  55. # 联赛名
  56. league_name = json.loads(response.text)['eg']['c']['n']
  57. except:
  58. datas = ""
  59. league_id = ""
  60. # 联赛名
  61. league_name = ""
  62. if datas:
  63. item = Roll_Zuqiu()
  64. full_dict = {}
  65. half_dict = {}
  66. full_dict_rule = {}
  67. half_dict_rule = {}
  68. horn_ou_dict = {}
  69. horn_ou_dict_rule = {}
  70. horn_oe_dict = {}
  71. horn_oe_dict_rule = {}
  72. horn_team = {}
  73. for data in datas:
  74. try:
  75. ctid = data['pci']['ctid']
  76. except:
  77. ctid = ""
  78. if ctid == 0:
  79. # 比赛id
  80. game_id = str(data['k'])
  81. # 球队1
  82. team_home = data['i'][0]
  83. # 球队2
  84. team_guest = data['i'][1]
  85. # 数量(97>)
  86. number = data['i'][2]
  87. # 下半场
  88. half_way = data['i'][12]
  89. # 角球或者其他
  90. # corner_ball = data['pci'].get('ctn', "")
  91. # 日期
  92. data_game = data['i'][4]
  93. # 开赛时间
  94. time_game = data['i'][5]
  95. score_home = data['i'][10] # 队一分数
  96. score_guest = data['i'][11] # 队二分数
  97. # 让球------------------------------------------------------------------------------------------------------------------
  98. try:
  99. concedes = data['o']['ah']['v']
  100. new_concedes = [concedes[i] for i in range(len(concedes)) if i % 2 == 1]
  101. concede_homes = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 == 0]
  102. concede_home_rule = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 == 0]
  103. concede_home = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 is 1]
  104. concede_guests = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 is 1]
  105. concede_guest_rule = [concede_guests[i] for i in range(len(concede_guests)) if i % 2 == 0]
  106. concede_guest = [concede_guests[i] for i in range(len(concede_guests)) if i % 2 is 1]
  107. except:
  108. concede_guest = ""
  109. concede_guest_rule = ""
  110. concede_home = ""
  111. concede_home_rule = ""
  112. # 上半场让球half_concede-------------------------------------------------------------------------------------------------
  113. try:
  114. half_concedes = data['o']['ah1st']['v']
  115. new_half_concedes = [half_concedes[i] for i in range(len(half_concedes)) if i % 2 is 1]
  116. new_half_concede_homes = [new_half_concedes[i] for i in range(len(new_half_concedes)) if
  117. i % 2 is 0]
  118. half_concede_guest_rule = [new_half_concede_homes[i] for i in range(len(new_half_concede_homes)) if i % 2 == 0]
  119. # concede_home
  120. half_concede_home = [new_half_concede_homes[i] for i in range(len(new_half_concede_homes)) if i % 2 is 1]
  121. half_concede_guests = [new_half_concedes[i] for i in range(len(new_half_concedes)) if i % 2 is 1]
  122. half_concede_home_rule = [half_concede_guests[i] for i in range(len(half_concede_guests)) if i % 2 == 0]
  123. # concede_guest
  124. half_concede_guest = [half_concede_guests[i] for i in range(len(half_concede_guests)) if
  125. i % 2 is 1]
  126. except:
  127. half_concede_home_rule = ""
  128. half_concede_home = ""
  129. half_concede_guest_rule = ""
  130. half_concede_guest = ""
  131. # 全场大小size 进球大小---------------------------------------------------------------------------------------------------
  132. try:
  133. sizes = data['o']['ou']['v']
  134. new_sizes = [sizes[i] for i in range(len(sizes)) if i % 2 is 1]
  135. size_homes = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 0]
  136. # size_home_rule
  137. size_home_rule = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 0]
  138. # size_home
  139. size_home = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 1]
  140. size_guests = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 1]
  141. # size_guest_rule
  142. size_guest_rule = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 0]
  143. # csize_guest
  144. size_guest = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 1]
  145. except:
  146. size_guest = ""
  147. size_guest_rule = ""
  148. size_home = ""
  149. size_home_rule = ""
  150. # 上半场大小 进球大小 half_size-------------------------------------------------------------------------------------------
  151. try:
  152. half_sizes = data['o']['ou1st']['v']
  153. new_half_sizes = [half_sizes[i] for i in range(len(half_sizes)) if i % 2 is 1]
  154. half_size_homes = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 0]
  155. # size_home_rule
  156. half_size_home_rule = [half_size_homes[i] for i in range(len(half_size_homes)) if i % 2 is 0]
  157. # half_size_home 主队
  158. half_size_home = [half_size_homes[i] for i in range(len(half_size_homes)) if i % 2 is 1]
  159. half_size_guests = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 1]
  160. # half_size_guest_rule 客队
  161. half_size_guest_rule = [half_size_guests[i] for i in range(len(half_size_guests)) if i % 2 is 0]
  162. # half_size_guest
  163. half_size_guest = [half_size_guests[i] for i in range(len(half_size_guests)) if
  164. i % 2 is 1]
  165. except:
  166. half_size_guest = ""
  167. half_size_guest_rule = ""
  168. half_size_home = ""
  169. half_size_home_rule = ""
  170. # 全场总进球 total_goal--------------------------------------------------------------------------------------------------
  171. total_goal = {}
  172. try:
  173. total_goals = data['o']['tg']['v']
  174. new_total_goals = [total_goals[i] for i in range(len(total_goals)) if i % 2 is 1]
  175. try:
  176. total_goal["tg0"] = round(float(new_total_goals[0]) - 1, 2)
  177. except:
  178. total_goal["tg0"] = 0
  179. try:
  180. total_goal["tg1"] = round(float(new_total_goals[1]) - 1, 2)
  181. except:
  182. total_goal["tg1"] = 0
  183. try:
  184. total_goal["tg2"] = round(float(new_total_goals[2]) - 1, 2)
  185. except:
  186. total_goal["tg2"] = 0
  187. try:
  188. total_goal["tg3"] = round(float(new_total_goals[3]) - 1, 2)
  189. except:
  190. total_goal["tg3"] = 0
  191. except:
  192. total_goal["tg0"] = ""
  193. total_goal["tg1"] = ""
  194. total_goal["tg2"] = ""
  195. total_goal["tg3"] = ""
  196. # 总进球上半场 half_total_goal-------------------------------------------------------------------------------------------
  197. try:
  198. half_total_goals = data['o']['tg1st']['v']
  199. new_half_total_goals = [half_total_goals[i] for i in range(len(half_total_goals)) if i % 2 is 1]
  200. try:
  201. total_goal["tg0_h"] = round(float(new_half_total_goals[0]) - 1, 2)
  202. except:
  203. total_goal["tg0_h"] = 0
  204. try:
  205. total_goal["tg1_h"] = round(float(new_half_total_goals[1]) - 1, 2)
  206. except:
  207. total_goal["tg1_h"] = 0
  208. try:
  209. total_goal["tg2_h"] = round(float(new_half_total_goals[2]) - 1, 2)
  210. except:
  211. total_goal["tg2_h"] = 0
  212. try:
  213. total_goal["tg3_h"] = round(float(new_half_total_goals[3]) - 1, 2)
  214. except:
  215. total_goal["tg3_h"] = 0
  216. except:
  217. total_goal["tg0_h"] = ""
  218. total_goal["tg1_h"] = ""
  219. total_goal["tg2_h"] = ""
  220. total_goal["tg3_h"] = ""
  221. # 早盘 半场/全场---------------------------------------------------------------------------------------------------------
  222. half_full = {}
  223. new_lists = ["hfhh", "hfhd", "hfhg", "hfdh", "hfdd", "hfdg", "hfgh", "hfgd", "hfgg"]
  224. # 早盘 半场/全场
  225. try:
  226. half_fulls = data['o']['hf']['v']
  227. new_half_fulls = [half_fulls[i] for i in range(len(half_fulls)) if i % 2 is 1]
  228. for index, value in enumerate(new_lists):
  229. try:
  230. half_full[value] = round(float(new_half_fulls[index]) - 1, 2)
  231. except:
  232. half_full[value] = ""
  233. except:
  234. for index, value in enumerate(new_lists):
  235. half_full[value] = ""
  236. # 早盘 最先/最后进球 最先进球 ---------------------------------------------------------------------------------------------
  237. first_last_ball = {}
  238. try:
  239. first_balls = data['o']['ttslast']['v']
  240. first_ball = [first_balls[i] for i in range(len(first_balls)) if i % 2 is 1]
  241. try:
  242. first_last_ball['flbfh'] = round(float(first_ball[0]) - 1, 2)
  243. except:
  244. first_last_ball['flbfh'] = 0
  245. try:
  246. first_last_ball['flbfg'] = round(float(first_ball[1]) - 1, 2)
  247. except:
  248. first_last_ball['flbfg'] = 0
  249. except:
  250. pass
  251. # 早盘 最先/最后进球 最后进球
  252. try:
  253. last_balls = data['o']['tts1st']['v']
  254. last_ball = [last_balls[i] for i in range(len(last_balls)) if i % 2 is 1]
  255. try:
  256. first_last_ball['flblh'] = round(float(last_ball[0]) - 1, 2)
  257. except:
  258. first_last_ball['flblh'] = 0
  259. try:
  260. first_last_ball['flblg'] = round(float(last_ball[1]) - 1, 2)
  261. except:
  262. first_last_ball['flblg'] = 0
  263. try:
  264. first_last_ball['flbn'] = round(float(last_ball[2]) - 1, 2)
  265. except:
  266. first_last_ball['flbn'] = 0
  267. except:
  268. pass
  269. # 全场独赢capot ---------------------------------------------------------------------------------------------------------
  270. try:
  271. capots = data['o']['1x2']['v']
  272. new_capots = [capots[i] for i in range(len(capots)) if i % 2 is 1]
  273. try:
  274. capot_home = round(float(new_capots[0]) - 1, 2)
  275. except:
  276. capot_home = ""
  277. try:
  278. capot_guest = round(float(new_capots[1]) - 1, 2)
  279. except:
  280. capot_guest = ""
  281. try:
  282. capot_dogfall = round(float(new_capots[2]) - 1, 2)
  283. except:
  284. capot_dogfall = ""
  285. except:
  286. capot_home = ""
  287. capot_guest = ""
  288. capot_dogfall = ""
  289. # 上半场独赢capot
  290. try:
  291. half_capots = data['o']['1x21st']['v']
  292. new_half_capots = [half_capots[i] for i in range(len(half_capots)) if i % 2 is 1]
  293. try:
  294. half_capot_home = round(float(new_half_capots[0]) - 1, 2)
  295. except:
  296. half_capot_home = ""
  297. try:
  298. half_capot_guest = round(float(new_half_capots[1]) - 1, 2)
  299. except:
  300. half_capot_guest = ""
  301. try:
  302. half_capot_dogfall = round(float(new_half_capots[2]) - 1, 2)
  303. except:
  304. half_capot_dogfall = ''
  305. except:
  306. half_capot_home = ""
  307. half_capot_guest = ""
  308. half_capot_dogfall = ""
  309. # 全场入球:单/双 odd_even------------------------------------------------------------------------------------------------
  310. try:
  311. odd_evens = data['o']['oe']['v']
  312. new_odd_evens = [odd_evens[i] for i in range(len(odd_evens)) if i % 2 is 1]
  313. odd_even_odd = new_odd_evens[0]
  314. odd_even_even = new_odd_evens[1]
  315. except:
  316. odd_even_odd = ""
  317. odd_even_even = ""
  318. # 半场入球:单/双 half_odd_even
  319. try:
  320. half_odd_evens = data['o']['oe1st']['v']
  321. new_half_odd_evens = [half_odd_evens[i] for i in range(len(half_odd_evens)) if i % 2 is 1]
  322. half_odd_even_odd = new_half_odd_evens[0]
  323. half_odd_even_even = new_half_odd_evens[1]
  324. except:
  325. half_odd_even_odd = ""
  326. half_odd_even_even = ""
  327. bodan_data = {}
  328. # 波胆------------------------------------------------------------------------------------------------------------------
  329. try:
  330. bodans = data['o']['cs']['v']
  331. one_list = ["b10", "b20", "b21", "b30", "b31", "b32", "b40", "b41", "b42", "b43"]
  332. two_list = ["b01", "b02", "b12", "b03", "b13", "b23", "b04", "b14", "b24", "b34"]
  333. three_list = ["b00", "b11", "b22", "b33", "b44"]
  334. new_bodans = [bodans[i] for i in range(len(bodans)) if i % 2 is 1]
  335. new_bodan = new_bodans[0:20]
  336. # 主队bodan_home
  337. bodan_home = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 0]
  338. for index, t in enumerate(one_list):
  339. try:
  340. bodan_data[t] = round(float(bodan_home[index]) - 1, 2)
  341. except:
  342. bodan_data[t] = 0
  343. # 客队bodan_guest
  344. bodan_guest = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 1]
  345. for y, z in enumerate(two_list):
  346. try:
  347. bodan_data[z] = round(float(bodan_guest[y]) - 1, 2)
  348. except:
  349. bodan_data[z] = 0
  350. bodan_dogfall = new_bodans[-6:-1]
  351. for a, b in enumerate(three_list):
  352. try:
  353. bodan_data[b] = round(float(bodan_dogfall[a]) - 1, 2)
  354. except:
  355. bodan_data[b] = 0
  356. # 其他bodan_other
  357. try:
  358. bodan_data['bo'] = round(float(new_bodans[-1]) - 1, 2)
  359. except:
  360. bodan_data['bo'] = 0
  361. except:
  362. pass
  363. try:
  364. half_bodans = data['o']['cs1st']['v']
  365. new_half_bodans = [half_bodans[i] for i in range(len(half_bodans)) if i % 2 is 1]
  366. new_one = ["b10_h", "b20_h", "b21_h", "b30_h", "b31_h", "b32_h"]
  367. new_two = ["b01_h", "b02_h", "b12_h", "b03_h", "b13_h", "b23_h"]
  368. new_three = ["b00_h", "b11_h", "b22_h", "b33_h"]
  369. halfbodan = new_half_bodans[0:12]
  370. half_bodan_home = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 0]
  371. # 队1
  372. for index, t in enumerate(new_one):
  373. try:
  374. bodan_data[t] = round(float(half_bodan_home[index]) - 1, 2)
  375. except:
  376. bodan_data[t] = 0
  377. # 队2
  378. half_bodan_guest = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 1]
  379. for y, z in enumerate(new_two):
  380. try:
  381. bodan_data[z] = round(float(half_bodan_guest[y]) - 1, 2)
  382. except:
  383. bodan_data[z] = 0
  384. # 和/平
  385. half_bodan_dogfall = halfbodan[-5:-1]
  386. for a, b in enumerate(new_three):
  387. try:
  388. bodan_data[b] = round(float(half_bodan_dogfall[a]) - 1, 2)
  389. except:
  390. bodan_data[b] = 0
  391. # 其他
  392. try:
  393. bodan_data['bo_h'] = round(float(new_half_bodans[-1]) - 1, 2)
  394. except:
  395. bodan_data['bo_h'] = 0
  396. except:
  397. pass
  398. if ctid == 1:
  399. # 角球数据
  400. horn_team['horn_home'] = data['i'][0]
  401. horn_team['horn_guest'] = data['i'][1]
  402. horn_team['horn_scoreh'] = data['i'][10]
  403. horn_team['horn_scoreg'] = data['i'][11]
  404. horn_team['horn_id'] = str(data['k'])
  405. try:
  406. horn_ou = data['o']['ou']['v']
  407. except:
  408. horn_ou = ''
  409. if horn_ou:
  410. horn_ou_dict['cbgb'] = horn_ou[5]
  411. horn_ou_dict['cbgs'] = horn_ou[7]
  412. horn_ou_dict_rule['cbgb'] = horn_ou[1]
  413. horn_ou_dict_rule['cbgs'] = horn_ou[3]
  414. try:
  415. horn_ou1st = data['o']['ou1st']['v']
  416. except:
  417. horn_ou1st = ''
  418. if horn_ou1st:
  419. horn_ou_dict['cbgb_h'] = horn_ou1st[5]
  420. horn_ou_dict['cbgs_h'] = horn_ou1st[7]
  421. horn_ou_dict_rule['cbgb_h'] = horn_ou1st[1]
  422. horn_ou_dict_rule['cbgs_h'] = horn_ou1st[3]
  423. try:
  424. horn_oe = data['o']['oe']['v']
  425. except:
  426. horn_oe = ''
  427. if horn_oe:
  428. horn_oe_dict['cbtss'] = horn_oe[1]
  429. horn_oe_dict['cbtsd'] = horn_oe[3]
  430. horn_oe_dict_rule['cbtss'] = '单'
  431. horn_oe_dict_rule['cbtsd'] = '双'
  432. try:
  433. horn_oe1st = data['o']['oe1st']['v']
  434. except:
  435. horn_oe1st = ''
  436. if horn_oe1st:
  437. horn_oe_dict['cbtss_h'] = horn_oe1st[1]
  438. horn_oe_dict['cbtsd_h'] = horn_oe1st[3]
  439. horn_oe_dict_rule['cbtss_h'] = '单'
  440. horn_oe_dict_rule['cbtsd_h'] = '双'
  441. if ctid == 12:
  442. try:
  443. home_data = data['o']['ou']['v']
  444. # 球队进球 大条件
  445. full_dict_rule['tbhb'] = home_data[1]
  446. # 球队进球小条件
  447. full_dict_rule['tbhs'] = home_data[3]
  448. # 球队进球大赔率
  449. full_dict['tbhb'] = home_data[5]
  450. # 球队进球小赔率
  451. full_dict['tbhs'] = home_data[7]
  452. except:
  453. full_dict['tbhs'] = ""
  454. full_dict_rule['tbhs'] = ""
  455. full_dict['tbhb'] = ""
  456. full_dict_rule['tbhb'] = ""
  457. try:
  458. half_home_data = data['o']['ou1st']['v']
  459. half_dict_rule['tbhb_h'] = half_home_data[1]
  460. half_dict_rule['tbhs_h'] = half_home_data[3]
  461. half_dict['tbhb_h'] = half_home_data[5]
  462. half_dict['tbhs_h'] = half_home_data[7]
  463. except:
  464. half_dict_rule['tbhb_h'] = ""
  465. half_dict['tbhb_h'] = ""
  466. half_dict_rule['tbhs_h'] = ""
  467. half_dict['tbhs_h'] = ""
  468. if ctid == 13:
  469. try:
  470. guest_data = data['o']['ou']['v']
  471. full_dict_rule['tbgb'] = guest_data[1]
  472. full_dict_rule['tbgs'] = guest_data[3]
  473. full_dict['tbgb'] = guest_data[5]
  474. full_dict['tbgs'] = guest_data[7]
  475. except:
  476. full_dict_rule['tbgb'] = ""
  477. full_dict['tbgb'] = ""
  478. full_dict_rule['tbgs'] = ""
  479. full_dict['tbgs'] = ''
  480. try:
  481. half_guest_data = data['o']['ou1st']['v']
  482. half_dict_rule['tbgb_h'] = half_guest_data[1]
  483. half_dict_rule['tbgs_h'] = half_guest_data[3]
  484. half_dict['tbgb_h'] = half_guest_data[5]
  485. half_dict['tbgs_h'] = half_guest_data[7]
  486. except:
  487. half_dict_rule['tbgb_h'] = ""
  488. half_dict['tbgb_h'] = ""
  489. half_dict_rule['tbgs_h'] = ""
  490. half_dict['tbgs_h'] = ""
  491. item['league_id'] = league_id
  492. item['league_name'] = league_name
  493. item['game_id'] = game_id
  494. item['team_home'] = team_home
  495. item['team_guest'] = team_guest
  496. item['number'] = number
  497. item['data_game'] = data_game
  498. item['time_game'] = time_game
  499. # 波胆
  500. item['bodan_data'] = bodan_data
  501. # 早盘入球数单双
  502. item["odd_even_odd"] = odd_even_odd
  503. item["odd_even_even"] = odd_even_even
  504. item["half_odd_even_odd"] = half_odd_even_odd
  505. item["half_odd_even_even"] = half_odd_even_even
  506. item['total_goal'] = total_goal
  507. item["half_capot_home"] = half_capot_home
  508. item["half_capot_guest"] = half_capot_guest
  509. item["half_capot_dogfall"] = half_capot_dogfall
  510. item["capot_home"] = capot_home
  511. item["capot_guest"] = capot_guest
  512. item["capot_dogfall"] = capot_dogfall
  513. item["first_last_ball"] = first_last_ball
  514. item["half_full"] = half_full
  515. item["half_size_guest"] = half_size_guest
  516. item["half_size_guest_rule"] = half_size_guest_rule
  517. item["half_size_home"] = half_size_home
  518. item["half_size_home_rule"] = half_size_home_rule
  519. # 全场大小
  520. item["size_guest"] = size_guest
  521. item["size_guest_rule"] = size_guest_rule
  522. item["size_home"] = size_home
  523. item["size_home_rule"] = size_home_rule
  524. # 上半场让球
  525. item["half_concede_home_rule"] = half_concede_home_rule
  526. item["half_concede_home"] = half_concede_home
  527. item["half_concede_guest_rule"] = half_concede_guest_rule
  528. item["half_concede_guest"] = half_concede_guest
  529. # 全场让球
  530. item["concede_guest"] = concede_guest
  531. item["concede_guest_rule"] = concede_guest_rule
  532. item["concede_home"] = concede_home
  533. item["concede_home_rule"] = concede_home_rule
  534. item['score_home'] = score_home
  535. item['score_guest'] = score_guest
  536. item['full_data'] = full_dict
  537. item['half_data'] = half_dict
  538. item['full_data_rule'] = full_dict_rule
  539. item['half_data_rule'] = half_dict_rule
  540. item['half_way'] = half_way
  541. item['horn_ou_dict'] = horn_ou_dict
  542. item['horn_ou_dict_rule'] = horn_ou_dict_rule
  543. item['horn_oe_dict'] = horn_oe_dict
  544. item['horn_oe_dict_rule'] = horn_oe_dict_rule
  545. item['horn_team'] = horn_team
  546. yield item