roll_zuqiu.py 28 KB

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