hg3535_zuqiu.py 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. # -*- coding: utf-8 -*-
  2. import copy
  3. import json
  4. import jsonpath
  5. import scrapy
  6. from scrapy.http import Request
  7. from ..items import Roll_Zuqiu
  8. class ZuqiuSpider(scrapy.Spider):
  9. name = 'roll_zuqiu'
  10. allowed_domains = ['hg3535z.com']
  11. custom_settings = {
  12. "ITEM_PIPELINES":{
  13. 'hg3535.pipelines.Roll_Zuqiupipeline': 100,
  14. },
  15. 'LOG_LEVEL': 'DEBUG',
  16. 'LOG_FILE': '../hg3535/Log/roll_zuqiu.log'
  17. }
  18. start_urls = ['https://hg3535z.com/odds2/d/getodds?sid=1&pt=4&ubt=am&pn=0&sb=2&dc=null&pid=0'] # 滚球菜单 足球滚球列url
  19. def parse(self, response):
  20. datas = json.loads(response.text)
  21. # item = Today_all()
  22. ids = jsonpath.jsonpath(datas, '$..i-ot[0]..egs..es..i[16]') # ids新列表
  23. print(ids)
  24. if ids:
  25. ids = set(ids)
  26. for i in ids:
  27. urls = 'https://hg3535z.com/odds2/d/getamodds?eid={}&iip=true&ubt=am&isp=false'.format(i)
  28. print(urls)
  29. yield Request(url=urls, callback=self.parse_each,dont_filter=True)
  30. def parse_each(self, response):
  31. # 球队进球数 大小
  32. try:
  33. datas = json.loads(response.text)['eg']['es']
  34. league_id = json.loads(response.text)['eg']['c']['k']
  35. # 联赛名
  36. league_name = json.loads(response.text)['eg']['c']['n']
  37. except:
  38. datas = ""
  39. league_id = ""
  40. # 联赛名
  41. league_name = ""
  42. try:
  43. pt = response.meta['pt']
  44. except:
  45. pt = 0
  46. if datas:
  47. item = Roll_Zuqiu()
  48. full_dict = {}
  49. half_dict = {}
  50. full_dict_rule = {}
  51. half_dict_rule = {}
  52. for data in datas:
  53. try:
  54. new_data = data['pci']['ctid']
  55. except:
  56. new_data = ""
  57. if new_data == 0:
  58. # 比赛id
  59. game_id = str(data['k'])
  60. # 球队1
  61. team_home = data['i'][0]
  62. # 球队2
  63. team_guest = data['i'][1]
  64. # 数量(97>)
  65. number = data['i'][2]
  66. # 下半场
  67. half_way = data['i'][12]
  68. # 角球或者其他
  69. corner_ball = data['pci'].get('ctn', "")
  70. # 日期
  71. data_game = data['i'][4]
  72. # 开赛时间
  73. time_game = data['i'][5]
  74. #这个地方的值不准确 需要再次确认
  75. score_home = data['i'][10] # 队一分数
  76. score_guest = data['i'][11] # 队二分数
  77. # half_way = new_result['i'][12] #下半场
  78. # 让球------------------------------------------------------------------------------------------------------------------
  79. try:
  80. concedes = data['o']['ah']['v']
  81. new_concedes = [concedes[i] for i in range(len(concedes)) if i % 2 == 1]
  82. concede_homes = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 == 0]
  83. # concede_home_rule = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 == 0]
  84. concede_home_rule = []
  85. for i in range(len(concede_homes)):
  86. if i % 2 is 0:
  87. home_rule = str(concede_homes[i])
  88. if home_rule.startswith('+'):
  89. n_home_rule = home_rule.replace('+', '-')
  90. concede_home_rule.append(n_home_rule)
  91. elif home_rule.startswith('-'):
  92. n_home_rule = home_rule.replace('-', '+')
  93. concede_home_rule.append(n_home_rule)
  94. else:
  95. concede_home_rule.append(home_rule)
  96. # concede_homes[i]
  97. # concede_home
  98. if pt is 3:
  99. concede_home = [float(concede_homes[i]) - 1 for i in range(len(concede_homes)) if i % 2 is 1]
  100. else:
  101. concede_home = [concede_homes[i] for i in range(len(concede_homes)) if i % 2 is 1]
  102. concede_guests = [new_concedes[i] for i in range(len(new_concedes)) if i % 2 is 1]
  103. # concede_guest_rule
  104. # concede_guest
  105. concede_guest_rule = []
  106. for i in range(len(concede_guests)):
  107. if i % 2 is 0:
  108. guest_rule = str(concede_guests[i])
  109. if guest_rule.startswith('+'):
  110. n_guest_rule = guest_rule.replace('+', '-')
  111. concede_guest_rule.append(n_guest_rule)
  112. elif guest_rule.startswith('-'):
  113. n_guest_rule = guest_rule.replace('-', '+')
  114. concede_guest_rule.append(n_guest_rule)
  115. else:
  116. concede_guest_rule.append(guest_rule)
  117. if pt is 3:
  118. concede_guest = [float(concede_guests[i]) -1 for i in range(len(concede_guests)) if i % 2 is 1]
  119. else:
  120. concede_guest = [concede_guests[i] for i in range(len(concede_guests)) if i % 2 is 1]
  121. except:
  122. concede_guest = ""
  123. concede_guest_rule = ""
  124. concede_home = ""
  125. concede_home_rule = ""
  126. # 上半场让球half_concede-------------------------------------------------------------------------------------------------
  127. try:
  128. half_concedes = data['o']['ah1st']['v']
  129. new_half_concedes = [half_concedes[i] for i in range(len(half_concedes)) if i % 2 is 1]
  130. new_half_concede_homes = [new_half_concedes[i] for i in range(len(new_half_concedes)) if
  131. i % 2 is 0]
  132. half_concede_home_rule = []
  133. for i in range(len(new_half_concede_homes)):
  134. if i % 2 == 0:
  135. home_rule = str(new_half_concede_homes[i])
  136. if home_rule.startswith('+'):
  137. n_home_rule = home_rule.replace('+', '-')
  138. half_concede_home_rule.append(n_home_rule)
  139. if home_rule.startswith('-'):
  140. n_home_rule = home_rule.replace('-', '+')
  141. half_concede_home_rule.append(n_home_rule)
  142. else:
  143. half_concede_home_rule.append(home_rule)
  144. # concede_home
  145. if pt is 3:
  146. half_concede_home = [float(new_half_concede_homes[i]) - 1 for i in range(len(new_half_concede_homes)) if 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_guests = [new_half_concedes[i] for i in range(len(new_half_concedes)) if i % 2 is 1]
  150. half_concede_guest_rule = []
  151. for i in range(len(half_concede_guests)):
  152. if i % 2 == 0:
  153. guest_rule = str(half_concede_guests[i])
  154. if guest_rule.startswith('+'):
  155. n_guest_rule = guest_rule.replace('+', '-')
  156. half_concede_guest_rule.append(n_guest_rule)
  157. if guest_rule.startswith('-'):
  158. n_guest_rule = guest_rule.replace('-', '+')
  159. half_concede_guest_rule.append(n_guest_rule)
  160. else:
  161. half_concede_guest_rule.append(guest_rule)
  162. # concede_guest
  163. if pt is 3:
  164. half_concede_guest = [float(half_concede_guests[i]) -1 for i in range(len(half_concede_guests)) if
  165. i % 2 is 1]
  166. else:
  167. half_concede_guest = [half_concede_guests[i] for i in range(len(half_concede_guests)) if
  168. i % 2 is 1]
  169. except:
  170. half_concede_home_rule = ""
  171. half_concede_home = ""
  172. half_concede_guest_rule = ""
  173. half_concede_guest = ""
  174. # 全场大小size 进球大小---------------------------------------------------------------------------------------------------
  175. try:
  176. sizes = data['o']['ou']['v']
  177. new_sizes = [sizes[i] for i in range(len(sizes)) if i % 2 is 1]
  178. size_homes = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 0]
  179. # size_home_rule
  180. size_home_rule = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 0]
  181. # size_home
  182. if pt is 3:
  183. size_home = [float(size_homes[i]) - 1 for i in range(len(size_homes)) if i % 2 is 1]
  184. else:
  185. size_home = [size_homes[i] for i in range(len(size_homes)) if i % 2 is 1]
  186. size_guests = [new_sizes[i] for i in range(len(new_sizes)) if i % 2 is 1]
  187. # size_guest_rule
  188. size_guest_rule = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 0]
  189. # csize_guest
  190. if pt is 3:
  191. size_guest = [float(size_guests[i]) - 1 for i in range(len(size_guests)) if i % 2 is 1]
  192. else:
  193. size_guest = [size_guests[i] for i in range(len(size_guests)) if i % 2 is 1]
  194. except:
  195. size_guest = ""
  196. size_guest_rule = ""
  197. size_home = ""
  198. size_home_rule = ""
  199. # 上半场大小 进球大小 half_size-------------------------------------------------------------------------------------------
  200. try:
  201. half_sizes = data['o']['ou1st']['v']
  202. new_half_sizes = [half_sizes[i] for i in range(len(half_sizes)) if i % 2 is 1]
  203. half_size_homes = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 0]
  204. # size_home_rule
  205. half_size_home_rule = [half_size_homes[i] for i in range(len(half_size_homes)) if
  206. i % 2 is 0]
  207. # half_size_home 主队
  208. if pt is 3:
  209. half_size_home = [float(half_size_homes[i]) -1 for i in range(len(half_size_homes)) if i % 2 is 1]
  210. else:
  211. half_size_home = [half_size_homes[i] for i in range(len(half_size_homes)) if i % 2 is 1]
  212. half_size_guests = [new_half_sizes[i] for i in range(len(new_half_sizes)) if i % 2 is 1]
  213. # half_size_guest_rule 客队
  214. half_size_guest_rule = [half_size_guests[i] for i in range(len(half_size_guests)) if
  215. i % 2 is 0]
  216. # half_size_guest
  217. if pt is 3:
  218. half_size_guest = [float(half_size_guests[i]) - 1 for i in range(len(half_size_guests)) if
  219. i % 2 is 1]
  220. else:
  221. half_size_guest = [half_size_guests[i] for i in range(len(half_size_guests)) if
  222. i % 2 is 1]
  223. except:
  224. half_size_guest = ""
  225. half_size_guest_rule = ""
  226. half_size_home = ""
  227. half_size_home_rule = ""
  228. # 全场总进球 total_goal--------------------------------------------------------------------------------------------------
  229. total_goal = {}
  230. try:
  231. total_goals = data['o']['tg']['v']
  232. new_total_goals = [total_goals[i] for i in range(len(total_goals)) if i % 2 is 1]
  233. total_goal["total_goal_zero"] = float(new_total_goals[0]) - 1
  234. total_goal["total_goal_two"] = float(new_total_goals[1]) - 1
  235. total_goal["total_goal_four"] = float(new_total_goals[2]) - 1
  236. total_goal["total_goal_seven"] = float(new_total_goals[3]) - 1
  237. except:
  238. total_goal["total_goal_zero"] = ""
  239. total_goal["total_goal_two"] = ""
  240. total_goal["total_goal_four"] = ""
  241. total_goal["total_goal_seven"] = ""
  242. # 总进球上半场 half_total_goal-------------------------------------------------------------------------------------------
  243. try:
  244. half_total_goals = data['o']['tg1st']['v']
  245. new_half_total_goals = [half_total_goals[i] for i in range(len(half_total_goals)) if i % 2 is 1]
  246. total_goal["half_total_goal_zero"] = float(new_half_total_goals[0]) - 1
  247. total_goal["half_total_goal_one"] = float(new_half_total_goals[1]) - 1
  248. total_goal["half_total_goal_two"] = float(new_half_total_goals[2]) - 1
  249. total_goal["half_total_goal_three"] = float(new_half_total_goals[3]) - 1
  250. except:
  251. total_goal["half_total_goal_zero"] = ""
  252. total_goal["half_total_goal_one"] = ""
  253. total_goal["half_total_goal_two"] = ""
  254. total_goal["half_total_goal_three"] = ""
  255. # 早盘 半场/全场---------------------------------------------------------------------------------------------------------
  256. half_full = {}
  257. new_lists = ["half_full_home_home", "half_full_home_dogfall", "half_full_home_guest",
  258. "half_full_dogfall_home", "half_full_dogfall_dogfall", "half_full_dogfall_guest",
  259. "half_full_guest_home", "half_full_guest_dogfall", "half_full_guest_guest"]
  260. # 早盘 半场/全场
  261. try:
  262. half_fulls = data['o']['hf']['v']
  263. new_half_fulls = [half_fulls[i] for i in range(len(half_fulls)) if i % 2 is 1]
  264. for index, value in enumerate(new_lists):
  265. half_full[value] = float(new_half_fulls[index]) - 1
  266. except:
  267. for index, value in enumerate(new_lists):
  268. half_full[value] = ""
  269. # 早盘 最先/最后进球 最先进球 ---------------------------------------------------------------------------------------------
  270. first_last_ball = {}
  271. try:
  272. first_balls = data['o']['ttslast']['v']
  273. first_ball = [first_balls[i] for i in range(len(first_balls)) if i % 2 is 1]
  274. first_last_ball['first_ball_home'] = float(first_ball[0]) - 1
  275. first_last_ball['first_ball_guest'] = float(first_ball[1]) - 1
  276. except:
  277. pass
  278. # 早盘 最先/最后进球 最后进球
  279. try:
  280. last_balls = data['o']['tts1st']['v']
  281. last_ball = [last_balls[i] for i in range(len(last_balls)) if i % 2 is 1]
  282. first_last_ball['last_ball_home'] = float(last_ball[0]) - 1
  283. first_last_ball['last_ball_guest'] = float(last_ball[1]) - 1
  284. first_last_ball['not_ball'] = float(last_ball[2]) - 1
  285. except:
  286. pass
  287. # 全场独赢capot ---------------------------------------------------------------------------------------------------------
  288. try:
  289. capots = data['o']['1x2']['v']
  290. new_capots = [capots[i] for i in range(len(capots)) if i % 2 is 1]
  291. capot_home = float(new_capots[0]) - 1
  292. capot_guest = float(new_capots[1]) - 1
  293. capot_dogfall = float(new_capots[2]) - 1
  294. except:
  295. capot_home = ""
  296. capot_guest = ""
  297. capot_dogfall = ""
  298. # 上半场独赢capot
  299. try:
  300. half_capots = data['o']['1x21st']['v']
  301. new_half_capots = [half_capots[i] for i in range(len(half_capots)) if i % 2 is 1]
  302. half_capot_home = float(new_half_capots[0]) - 1
  303. half_capot_guest = float(new_half_capots[1]) - 1
  304. half_capot_dogfall = float(new_half_capots[2]) - 1
  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 = ["bodanhome_one_zero", "bodanhome_two_zero", "bodanhome_two_one",
  332. "bodanhome_three_zero", "bodanhome_three_one", "bodanhome_three_two",
  333. "bodanhome_four_zero", "bodanhome_four_one", "bodanhome_four_two",
  334. "bodanhome_four_three"]
  335. two_list = ["bodanguest_one_zero", "bodanguest_two_zero", "bodanguest_two_one",
  336. "bodanguest_three_zero", "bodanguest_three_one", "bodanguest_three_two",
  337. "bodanguest_four_zero", "bodanguest_four_one", "bodanguest_four_two",
  338. "bodanguest_four_three"]
  339. three_list = ["bodandogfall_zero_zero", "bodandogfall_one_one", "bodandogfall_two_two",
  340. "bodandogfall_three_three", "bodandogfall_four_four"]
  341. new_bodans = [bodans[i] for i in range(len(bodans)) if i % 2 is 1]
  342. new_bodan = new_bodans[0:20]
  343. # 主队bodan_home
  344. bodan_home = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 0]
  345. for index, t in enumerate(one_list):
  346. bodan_data[t] = float(bodan_home[index]) - 1
  347. # 客队bodan_guest
  348. bodan_guest = [new_bodan[i] for i in range(len(new_bodan)) if i % 2 is 1]
  349. for y, z in enumerate(two_list):
  350. bodan_data[z] = float(bodan_guest[y]) - 1
  351. bodan_dogfall = new_bodans[-7:-2]
  352. for a, b in enumerate(three_list):
  353. bodan_data[b] = float(bodan_dogfall[a]) - 1
  354. # 其他bodan_other
  355. bodan_data['bodanother'] = float(new_bodans[-1]) - 1
  356. except:
  357. pass
  358. try:
  359. half_bodans = data['o']['cs1st']['v']
  360. new_half_bodans = [half_bodans[i] for i in range(len(half_bodans)) if i % 2 is 1]
  361. new_one = ["halfbodanhome_one_zero", "halfbodanhome_two_zero", "halfbodanhome_two_one",
  362. "halfbodanhome_three_zero", "halfbodanhome_three_one", "halfbodanhome_three_two"]
  363. new_two = ["halfbodanguest_one_zero", "halfbodanguest_two_zero", "halfbodanguest_two_one",
  364. "halfbodanguest_three_zero", "halfbodanguest_three_one", "halfbodanguest_three_two"]
  365. new_three = ["halfbodandogfall_zero_zero", "halfbodandogfall_one_one",
  366. "halfbodandogfall_two_two",
  367. "halfbodandogfall_three_three"]
  368. halfbodan = new_half_bodans[0:12]
  369. half_bodan_home = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 0]
  370. # 队1
  371. for index, t in enumerate(new_one):
  372. bodan_data[t] = float(half_bodan_home[index]) - 1
  373. # 队2
  374. half_bodan_guest = [halfbodan[i] for i in range(len(halfbodan)) if i % 2 is 1]
  375. for y, z in enumerate(new_two):
  376. bodan_data[z] = float(half_bodan_guest[y]) - 1
  377. # 和/平
  378. half_bodan_dogfall = new_half_bodans[-6:-2]
  379. for a, b in enumerate(new_three):
  380. bodan_data[b] = float(half_bodan_dogfall[a]) - 1
  381. # 其他
  382. bodan_data['halfbodanother'] = float(new_half_bodans[-1]) - 1
  383. except:
  384. pass
  385. if new_data == 12:
  386. try:
  387. home_data = data['o']['ou']['v']
  388. # 球队进球 大条件
  389. home_size_big_rule = home_data[1]
  390. full_dict_rule['home_size_big'] = home_size_big_rule
  391. # 球队进球大赔率
  392. home_size_big = home_data[5]
  393. full_dict['home_size_big'] = home_size_big
  394. # 球队进球小条件
  395. home_size_small_rule = home_data[3]
  396. full_dict_rule['home_size_small'] = home_size_small_rule
  397. # 球队进球小赔率
  398. home_size_small = home_data[7]
  399. full_dict['home_size_small'] = home_size_small
  400. except:
  401. full_dict['home_size_small'] = ""
  402. full_dict_rule['home_size_small'] = ""
  403. full_dict['home_size_big'] = ""
  404. full_dict_rule['home_size_big'] = ""
  405. try:
  406. half_home_data = data['o']['ou1st']['v']
  407. half_home_size_big_rule = half_home_data[1]
  408. half_dict_rule['half_home_size_big'] = half_home_size_big_rule
  409. half_home_size_big = half_home_data[5]
  410. half_dict['half_home_size_big'] = half_home_size_big
  411. half_home_size_small_rule = half_home_data[3]
  412. half_dict_rule['half_home_size_small'] = half_home_size_small_rule
  413. half_home_size_small = half_home_data[7]
  414. half_dict['half_home_size_small'] = half_home_size_small
  415. except:
  416. half_dict_rule['half_home_size_big'] = ""
  417. half_dict['half_home_size_big'] = ""
  418. half_dict_rule['half_home_size_small'] = ""
  419. half_dict['half_home_size_small'] = ""
  420. if new_data == 13:
  421. try:
  422. guest_data = data['o']['ou']['v']
  423. guest_size_big_rule = guest_data[1]
  424. full_dict_rule['guest_size_big'] = guest_size_big_rule
  425. guest_size_big = guest_data[5]
  426. full_dict['guest_size_big'] = guest_size_big
  427. guest_size_small_rule = guest_data[3]
  428. full_dict_rule['guest_size_small'] = guest_size_small_rule
  429. guest_size_small = guest_data[7]
  430. full_dict['guest_size_small'] = guest_size_small
  431. except:
  432. full_dict_rule['guest_size_big'] = ""
  433. full_dict['guest_size_big'] = ""
  434. full_dict_rule['guest_size_small'] = ""
  435. full_dict['guest_size_small'] = ''
  436. try:
  437. half_guest_data = data['o']['ou1st']['v']
  438. half_guest_size_big_rule = half_guest_data[1]
  439. half_dict_rule['half_guest_size_big'] = half_guest_size_big_rule
  440. half_guest_size_big = half_guest_data[5]
  441. half_dict['half_guest_size_big'] = half_guest_size_big
  442. half_guest_size_small_rule = half_guest_data[3]
  443. half_dict_rule['half_guest_size_small'] = half_guest_size_small_rule
  444. half_guest_size_small = half_guest_data[7]
  445. half_dict['half_guest_size_small'] = half_guest_size_small
  446. except:
  447. half_dict_rule['half_guest_size_big'] = ""
  448. half_dict['half_guest_size_big'] = ""
  449. half_dict_rule['half_guest_size_small'] = ""
  450. half_dict['half_guest_size_small'] = ""
  451. item['league_id'] = league_id
  452. item['league_name'] = league_name
  453. item['pt'] = pt
  454. item['game_id'] = game_id
  455. item['team_home'] = team_home
  456. item['team_guest'] = team_guest
  457. item['number'] = number
  458. item['data_game'] = data_game
  459. item['time_game'] = time_game
  460. item['corner_ball'] = corner_ball
  461. # 波胆
  462. item['bodan_data'] = bodan_data
  463. # 早盘入球数单双
  464. item["odd_even_odd"] = odd_even_odd
  465. item["odd_even_even"] = odd_even_even
  466. item["half_odd_even_odd"] = half_odd_even_odd
  467. item["half_odd_even_even"] = half_odd_even_even
  468. item['total_goal'] = total_goal
  469. item["half_capot_home"] = half_capot_home
  470. item["half_capot_guest"] = half_capot_guest
  471. item["half_capot_dogfall"] = half_capot_dogfall
  472. item["capot_home"] = capot_home
  473. item["capot_guest"] = capot_guest
  474. item["capot_dogfall"] = capot_dogfall
  475. item["first_last_ball"] = first_last_ball
  476. item["half_full"] = half_full
  477. item["half_size_guest"] = half_size_guest
  478. item["half_size_guest_rule"] = half_size_guest_rule
  479. item["half_size_home"] = half_size_home
  480. item["half_size_home_rule"] = half_size_home_rule
  481. # 全场大小
  482. item["size_guest"] = size_guest
  483. item["size_guest_rule"] = size_guest_rule
  484. item["size_home"] = size_home
  485. item["size_home_rule"] = size_home_rule
  486. # 上半场让球
  487. item["half_concede_home_rule"] = half_concede_home_rule
  488. item["half_concede_home"] = half_concede_home
  489. item["half_concede_guest_rule"] = half_concede_guest_rule
  490. item["half_concede_guest"] = half_concede_guest
  491. # 全场让球
  492. item["concede_guest"] = concede_guest
  493. item["concede_guest_rule"] = concede_guest_rule
  494. item["concede_home"] = concede_home
  495. item["concede_home_rule"] = concede_home_rule
  496. item['score_home'] = score_home
  497. item['score_guest'] = score_guest
  498. item['full_data'] = full_dict
  499. item['half_data'] = half_dict
  500. item['full_data_rule'] = full_dict_rule
  501. item['half_data_rule'] = half_dict_rule
  502. item['half_way'] = half_way
  503. yield item