zuqiu.py 28 KB

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