zuqiu.py 29 KB

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