|
@@ -5,7 +5,7 @@ import json
|
|
|
import scrapy
|
|
import scrapy
|
|
|
from scrapy.http import Request
|
|
from scrapy.http import Request
|
|
|
|
|
|
|
|
-from .. items import Lanqiu
|
|
|
|
|
|
|
+from ..items import Lanqiu
|
|
|
|
|
|
|
|
|
|
|
|
|
def rangqiu_daxiao(inner, pt):
|
|
def rangqiu_daxiao(inner, pt):
|
|
@@ -39,7 +39,6 @@ def danshaung_fun(inner):
|
|
|
|
|
|
|
|
|
|
|
|
|
class LanqiuSpider(scrapy.Spider):
|
|
class LanqiuSpider(scrapy.Spider):
|
|
|
-
|
|
|
|
|
name = "lanqiu"
|
|
name = "lanqiu"
|
|
|
to_day = datetime.datetime.now()
|
|
to_day = datetime.datetime.now()
|
|
|
allowed_domains = ['hg3535z.com']
|
|
allowed_domains = ['hg3535z.com']
|
|
@@ -56,7 +55,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# newall_lists = ['am', 'ftht1x2', 'oe', 'tg', 'htft', 'cs', 'fglg', 'or']
|
|
# newall_lists = ['am', 'ftht1x2', 'oe', 'tg', 'htft', 'cs', 'fglg', 'or']
|
|
|
for y in range(1, 4):
|
|
for y in range(1, 4):
|
|
|
# url = 'https://hg3535z.com/odds2/d/getodds?sid=2&pt='+str(y)+'&ubt=am&pn=0&sb=2&dc=null&pid=0'
|
|
# url = 'https://hg3535z.com/odds2/d/getodds?sid=2&pt='+str(y)+'&ubt=am&pn=0&sb=2&dc=null&pid=0'
|
|
|
- url = "https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/2/pt/" + str(y) + "/ubt/am/pn/0/sb/2/dc/null/pid/0"
|
|
|
|
|
|
|
+ url = "https://odata.jiushan6688.com/odds6i/d/getodds/zh-cn/sid/2/pt/" + str(
|
|
|
|
|
+ y) + "/ubt/am/pn/0/sb/2/dc/null/pid/0"
|
|
|
yield scrapy.Request(url=url, callback=self.parse, dont_filter=True, meta={'pt': y})
|
|
yield scrapy.Request(url=url, callback=self.parse, dont_filter=True, meta={'pt': y})
|
|
|
# yield scrapy.Request(url=url, callback=self.parse, meta={'pt': y}, dont_filter=True)
|
|
# yield scrapy.Request(url=url, callback=self.parse, meta={'pt': y}, dont_filter=True)
|
|
|
|
|
|
|
@@ -77,14 +77,18 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
for new_result in new_results:
|
|
for new_result in new_results:
|
|
|
game_id = str(new_result['i'][16])
|
|
game_id = str(new_result['i'][16])
|
|
|
if pt == 1:
|
|
if pt == 1:
|
|
|
- url = "https://hg3535z.com/odds2/d/getamodds?eid=" + game_id + "&iip=false&ubt=am&isp=false"
|
|
|
|
|
|
|
+ # url = "https://hg3535z.com/odds2/d/getamodds?eid=" + game_id + "&iip=false&ubt=am&isp=false"
|
|
|
|
|
+ url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/" + game_id + "/iip/false/ubt/am/isp/false"
|
|
|
yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
|
|
yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
|
|
|
if pt == 2:
|
|
if pt == 2:
|
|
|
- url = "https://hg3535z.com/odds2/d/getamodds?eid=" + game_id + "&iip=false&ubt=am&isp=false"
|
|
|
|
|
|
|
+ # url = "https://hg3535z.com/odds2/d/getamodds?eid=" + game_id + "&iip=false&ubt=am&isp=false"
|
|
|
|
|
+ url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/" + game_id + "/iip/false/ubt/am/isp/false"
|
|
|
yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
|
|
yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
|
|
|
if pt == 3:
|
|
if pt == 3:
|
|
|
- url = "https://hg3535z.com/odds2/d/getamodds?eid=" + game_id + "&iip=false&ubt=am&isp=true"
|
|
|
|
|
|
|
+ # url = "https://hg3535z.com/odds2/d/getamodds?eid=" + game_id + "&iip=false&ubt=am&isp=true"
|
|
|
|
|
+ url = "https://odata.jiushan6688.com/odds6i/d/getamodds/zh-cn/eid/" + game_id + "/iip/false/ubt/am/isp/true"
|
|
|
yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
|
|
yield Request(url=url, callback=self.parse_each, meta={'pt': pt}, dont_filter=True)
|
|
|
|
|
+
|
|
|
def parse_each(self, response):
|
|
def parse_each(self, response):
|
|
|
try:
|
|
try:
|
|
|
new_datas = json.loads(response.text)['eg']
|
|
new_datas = json.loads(response.text)['eg']
|
|
@@ -148,12 +152,13 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
qiudui = result['pci'].get('ctn', "")
|
|
qiudui = result['pci'].get('ctn', "")
|
|
|
data.append(qiudui)
|
|
data.append(qiudui)
|
|
|
|
|
|
|
|
-# ----------------------------------------让球分割线---------------------------------------------------------------------
|
|
|
|
|
|
|
+ # ----------------------------------------让球分割线---------------------------------------------------------------------
|
|
|
try:
|
|
try:
|
|
|
concedes = result['o']["ah"]["v"]
|
|
concedes = result['o']["ah"]["v"]
|
|
|
# print(concedes)
|
|
# print(concedes)
|
|
|
# 主队让球条件,主队让球赔率,客队让球条件,客队让球赔率
|
|
# 主队让球条件,主队让球赔率,客队让球条件,客队让球赔率
|
|
|
- concede_home_rule,concede_home,concede_guest_rule,concede_guest=rangqiu_daxiao(inner=concedes, pt=pt)
|
|
|
|
|
|
|
+ concede_home_rule, concede_home, concede_guest_rule, concede_guest = rangqiu_daxiao(
|
|
|
|
|
+ inner=concedes, pt=pt)
|
|
|
concedes_dict_rule['concede_home'] = concede_home_rule
|
|
concedes_dict_rule['concede_home'] = concede_home_rule
|
|
|
concedes_dict['concede_home'] = concede_home
|
|
concedes_dict['concede_home'] = concede_home
|
|
|
concedes_dict_rule['concede_guest'] = concede_guest_rule
|
|
concedes_dict_rule['concede_guest'] = concede_guest_rule
|
|
@@ -171,7 +176,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
try:
|
|
try:
|
|
|
half_concedes = result['o']["ah1st"]["v"]
|
|
half_concedes = result['o']["ah1st"]["v"]
|
|
|
# 上半场 主队让球条件
|
|
# 上半场 主队让球条件
|
|
|
- half_concede_home_rule, half_concede_home, half_concede_guest_rule, half_concede_guest=rangqiu_daxiao(inner=half_concedes, pt=pt)
|
|
|
|
|
|
|
+ half_concede_home_rule, half_concede_home, half_concede_guest_rule, half_concede_guest = rangqiu_daxiao(
|
|
|
|
|
+ inner=half_concedes, pt=pt)
|
|
|
concedes_dict_rule['half_concede_home'] = half_concede_home_rule
|
|
concedes_dict_rule['half_concede_home'] = half_concede_home_rule
|
|
|
concedes_dict['half_concede_home'] = half_concede_home
|
|
concedes_dict['half_concede_home'] = half_concede_home
|
|
|
concedes_dict_rule['half_concede_guest'] = half_concede_guest_rule
|
|
concedes_dict_rule['half_concede_guest'] = half_concede_guest_rule
|
|
@@ -190,7 +196,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第一节让球
|
|
# 第一节让球
|
|
|
try:
|
|
try:
|
|
|
one_concedes = result['o']["ahq1"]["v"]
|
|
one_concedes = result['o']["ahq1"]["v"]
|
|
|
- one_concede_home_rule,one_concede_home,one_concede_guest_rule,one_concede_guest = rangqiu_daxiao(inner=one_concedes, pt=pt)
|
|
|
|
|
|
|
+ one_concede_home_rule, one_concede_home, one_concede_guest_rule, one_concede_guest = rangqiu_daxiao(
|
|
|
|
|
+ inner=one_concedes, pt=pt)
|
|
|
concedes_dict_rule['one_concede_home'] = one_concede_home_rule
|
|
concedes_dict_rule['one_concede_home'] = one_concede_home_rule
|
|
|
concedes_dict['one_concede_home'] = one_concede_home
|
|
concedes_dict['one_concede_home'] = one_concede_home
|
|
|
concedes_dict_rule['one_concede_guest'] = one_concede_guest_rule
|
|
concedes_dict_rule['one_concede_guest'] = one_concede_guest_rule
|
|
@@ -208,7 +215,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第二节让球
|
|
# 第二节让球
|
|
|
try:
|
|
try:
|
|
|
two_concedes = result['o']["ahq2"]["v"]
|
|
two_concedes = result['o']["ahq2"]["v"]
|
|
|
- two_concede_home_rule,two_concede_home,two_concede_guest_rule,two_concede_guest = rangqiu_daxiao(inner=two_concedes, pt=pt)
|
|
|
|
|
|
|
+ two_concede_home_rule, two_concede_home, two_concede_guest_rule, two_concede_guest = rangqiu_daxiao(
|
|
|
|
|
+ inner=two_concedes, pt=pt)
|
|
|
concedes_dict_rule['two_concede_home'] = two_concede_home_rule
|
|
concedes_dict_rule['two_concede_home'] = two_concede_home_rule
|
|
|
concedes_dict['two_concede_home'] = two_concede_home
|
|
concedes_dict['two_concede_home'] = two_concede_home
|
|
|
concedes_dict_rule['two_concede_guest'] = two_concede_guest_rule
|
|
concedes_dict_rule['two_concede_guest'] = two_concede_guest_rule
|
|
@@ -225,7 +233,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第三节让球
|
|
# 第三节让球
|
|
|
try:
|
|
try:
|
|
|
three_concedes = result['o']["ahq3"]["v"]
|
|
three_concedes = result['o']["ahq3"]["v"]
|
|
|
- three_concede_home_rule,three_concede_home,three_concede_guest_rule,three_concede_guest = rangqiu_daxiao(inner=three_concedes, pt=pt)
|
|
|
|
|
|
|
+ three_concede_home_rule, three_concede_home, three_concede_guest_rule, three_concede_guest = rangqiu_daxiao(
|
|
|
|
|
+ inner=three_concedes, pt=pt)
|
|
|
concedes_dict_rule['three_concede_home'] = three_concede_home_rule
|
|
concedes_dict_rule['three_concede_home'] = three_concede_home_rule
|
|
|
concedes_dict['three_concede_home'] = three_concede_home
|
|
concedes_dict['three_concede_home'] = three_concede_home
|
|
|
concedes_dict_rule['three_concede_guest'] = three_concede_guest_rule
|
|
concedes_dict_rule['three_concede_guest'] = three_concede_guest_rule
|
|
@@ -243,7 +252,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第四节让球
|
|
# 第四节让球
|
|
|
try:
|
|
try:
|
|
|
four_concedes = result['o']["ahq4"]["v"]
|
|
four_concedes = result['o']["ahq4"]["v"]
|
|
|
- four_concede_home_rule,four_concede_home,four_concede_guest_rule,four_concede_guest = rangqiu_daxiao(inner=four_concedes, pt=pt)
|
|
|
|
|
|
|
+ four_concede_home_rule, four_concede_home, four_concede_guest_rule, four_concede_guest = rangqiu_daxiao(
|
|
|
|
|
+ inner=four_concedes, pt=pt)
|
|
|
concedes_dict_rule['four_concede_home'] = four_concede_home_rule
|
|
concedes_dict_rule['four_concede_home'] = four_concede_home_rule
|
|
|
concedes_dict['four_concede_home'] = four_concede_home
|
|
concedes_dict['four_concede_home'] = four_concede_home
|
|
|
concedes_dict_rule['four_concede_guest'] = four_concede_guest_rule
|
|
concedes_dict_rule['four_concede_guest'] = four_concede_guest_rule
|
|
@@ -258,11 +268,12 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
concedes_dict['four_concede_home'] = None
|
|
concedes_dict['four_concede_home'] = None
|
|
|
concedes_dict_rule['four_concede_guest'] = None
|
|
concedes_dict_rule['four_concede_guest'] = None
|
|
|
concedes_dict['four_concede_guest'] = None
|
|
concedes_dict['four_concede_guest'] = None
|
|
|
-# ----------------------------------------总分大小分割线 - ---------------------------------------------------------------
|
|
|
|
|
|
|
+ # ----------------------------------------总分大小分割线 - ---------------------------------------------------------------
|
|
|
# 全场总分大小
|
|
# 全场总分大小
|
|
|
try:
|
|
try:
|
|
|
total_sizes = result['o']["ou"]["v"]
|
|
total_sizes = result['o']["ou"]["v"]
|
|
|
- total_sizes_big_rule,total_sizes_big,total_sizes_small_rule,total_sizes_small = rangqiu_daxiao(inner=total_sizes, pt=pt)
|
|
|
|
|
|
|
+ total_sizes_big_rule, total_sizes_big, total_sizes_small_rule, total_sizes_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=total_sizes, pt=pt)
|
|
|
total_sizes_dict_rule["total_size_big"] = total_sizes_big_rule
|
|
total_sizes_dict_rule["total_size_big"] = total_sizes_big_rule
|
|
|
total_sizes_dict["total_size_big"] = total_sizes_big
|
|
total_sizes_dict["total_size_big"] = total_sizes_big
|
|
|
total_sizes_dict_rule["total_size_small"] = total_sizes_small_rule
|
|
total_sizes_dict_rule["total_size_small"] = total_sizes_small_rule
|
|
@@ -279,7 +290,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 上半场总分大小
|
|
# 上半场总分大小
|
|
|
try:
|
|
try:
|
|
|
half_total_sizes = result['o']["ou1st"]["v"]
|
|
half_total_sizes = result['o']["ou1st"]["v"]
|
|
|
- half_total_sizes_big_rule,half_total_sizes_big,half_total_sizes_small_rule,half_total_sizes_small = rangqiu_daxiao(inner=half_total_sizes, pt=pt)
|
|
|
|
|
|
|
+ half_total_sizes_big_rule, half_total_sizes_big, half_total_sizes_small_rule, half_total_sizes_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=half_total_sizes, pt=pt)
|
|
|
total_sizes_dict_rule["half_total_size_big"] = half_total_sizes_big_rule
|
|
total_sizes_dict_rule["half_total_size_big"] = half_total_sizes_big_rule
|
|
|
total_sizes_dict["half_total_size_big"] = half_total_sizes_big
|
|
total_sizes_dict["half_total_size_big"] = half_total_sizes_big
|
|
|
total_sizes_dict_rule["half_total_size_small"] = half_total_sizes_small_rule
|
|
total_sizes_dict_rule["half_total_size_small"] = half_total_sizes_small_rule
|
|
@@ -296,7 +308,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第一节总分大小
|
|
# 第一节总分大小
|
|
|
try:
|
|
try:
|
|
|
one_total_sizes = result['o']["ou1st"]["v"]
|
|
one_total_sizes = result['o']["ou1st"]["v"]
|
|
|
- one_total_sizes_big_rule,one_total_size_big,one_total_sizes_small_rule,one_total_sizes_small = rangqiu_daxiao(inner=one_total_sizes, pt=pt)
|
|
|
|
|
|
|
+ one_total_sizes_big_rule, one_total_size_big, one_total_sizes_small_rule, one_total_sizes_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=one_total_sizes, pt=pt)
|
|
|
total_sizes_dict_rule["one_total_size_big"] = one_total_sizes_big_rule
|
|
total_sizes_dict_rule["one_total_size_big"] = one_total_sizes_big_rule
|
|
|
total_sizes_dict["one_total_size_big"] = one_total_size_big
|
|
total_sizes_dict["one_total_size_big"] = one_total_size_big
|
|
|
total_sizes_dict_rule["one_total_size_small"] = one_total_sizes_small_rule
|
|
total_sizes_dict_rule["one_total_size_small"] = one_total_sizes_small_rule
|
|
@@ -313,7 +326,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第二节场总分大小
|
|
# 第二节场总分大小
|
|
|
try:
|
|
try:
|
|
|
two_total_sizes = result['o']["ou1st"]["v"]
|
|
two_total_sizes = result['o']["ou1st"]["v"]
|
|
|
- two_total_sizes_big_rule,two_total_sizes_big,two_total_sizes_small_rule,two_total_sizes_small = rangqiu_daxiao(inner=two_total_sizes, pt=pt)
|
|
|
|
|
|
|
+ two_total_sizes_big_rule, two_total_sizes_big, two_total_sizes_small_rule, two_total_sizes_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=two_total_sizes, pt=pt)
|
|
|
total_sizes_dict_rule["two_total_size_big"] = two_total_sizes_big_rule
|
|
total_sizes_dict_rule["two_total_size_big"] = two_total_sizes_big_rule
|
|
|
total_sizes_dict["two_total_size_big"] = two_total_sizes_big
|
|
total_sizes_dict["two_total_size_big"] = two_total_sizes_big
|
|
|
total_sizes_dict_rule["two_total_size_small"] = two_total_sizes_small_rule
|
|
total_sizes_dict_rule["two_total_size_small"] = two_total_sizes_small_rule
|
|
@@ -330,7 +344,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第三节总分大小
|
|
# 第三节总分大小
|
|
|
try:
|
|
try:
|
|
|
three_total_sizes = result['o']["ou1st"]["v"]
|
|
three_total_sizes = result['o']["ou1st"]["v"]
|
|
|
- three_total_sizes_big_rule,three_total_sizes_big,three_total_sizes_small_rule,three_total_sizes_small = rangqiu_daxiao(inner=three_total_sizes, pt=pt)
|
|
|
|
|
|
|
+ three_total_sizes_big_rule, three_total_sizes_big, three_total_sizes_small_rule, three_total_sizes_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=three_total_sizes, pt=pt)
|
|
|
total_sizes_dict_rule["three_total_size_big"] = three_total_sizes_big_rule
|
|
total_sizes_dict_rule["three_total_size_big"] = three_total_sizes_big_rule
|
|
|
total_sizes_dict["three_total_size_big"] = three_total_sizes_big
|
|
total_sizes_dict["three_total_size_big"] = three_total_sizes_big
|
|
|
total_sizes_dict_rule["three_total_size_small"] = three_total_sizes_small_rule
|
|
total_sizes_dict_rule["three_total_size_small"] = three_total_sizes_small_rule
|
|
@@ -347,7 +362,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 第四节总分大小
|
|
# 第四节总分大小
|
|
|
try:
|
|
try:
|
|
|
four_total_sizes = result['o']["ou1st"]["v"]
|
|
four_total_sizes = result['o']["ou1st"]["v"]
|
|
|
- four_total_sizes_big_rule,four_total_sizes_big,four_total_sizes_small_rule,four_total_sizes_small = rangqiu_daxiao(inner=four_total_sizes, pt=pt)
|
|
|
|
|
|
|
+ four_total_sizes_big_rule, four_total_sizes_big, four_total_sizes_small_rule, four_total_sizes_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=four_total_sizes, pt=pt)
|
|
|
total_sizes_dict_rule["four_total_size_big"] = four_total_sizes_big_rule
|
|
total_sizes_dict_rule["four_total_size_big"] = four_total_sizes_big_rule
|
|
|
total_sizes_dict["four_total_size_big"] = four_total_sizes_big
|
|
total_sizes_dict["four_total_size_big"] = four_total_sizes_big
|
|
|
total_sizes_dict_rule["four_total_size_small"] = four_total_sizes_small_rule
|
|
total_sizes_dict_rule["four_total_size_small"] = four_total_sizes_small_rule
|
|
@@ -362,7 +378,7 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
total_sizes_dict_rule["four_total_size_small"] = None
|
|
total_sizes_dict_rule["four_total_size_small"] = None
|
|
|
total_sizes_dict["four_total_size_small"] = None
|
|
total_sizes_dict["four_total_size_small"] = None
|
|
|
|
|
|
|
|
-# ----------------------------------------总分单双分割线------------------------------------------------------------------
|
|
|
|
|
|
|
+ # ----------------------------------------总分单双分割线------------------------------------------------------------------
|
|
|
# 全场 总分单双
|
|
# 全场 总分单双
|
|
|
try:
|
|
try:
|
|
|
odd_evens = result['o']["oe"]["v"]
|
|
odd_evens = result['o']["oe"]["v"]
|
|
@@ -413,7 +429,6 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
odd_evens_dict["one_two_sides_double"] = None
|
|
odd_evens_dict["one_two_sides_double"] = None
|
|
|
odd_evens_dict_rule['one_two_sides_double'] = '双'
|
|
odd_evens_dict_rule['one_two_sides_double'] = '双'
|
|
|
|
|
|
|
|
-
|
|
|
|
|
# 总分:单/双-第二节
|
|
# 总分:单/双-第二节
|
|
|
try:
|
|
try:
|
|
|
two_odd_evens = result['o']["oeq2"]["v"]
|
|
two_odd_evens = result['o']["oeq2"]["v"]
|
|
@@ -448,8 +463,6 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
odd_evens_dict["three_two_sides_double"] = None
|
|
odd_evens_dict["three_two_sides_double"] = None
|
|
|
odd_evens_dict_rule['three_two_sides_double'] = '双'
|
|
odd_evens_dict_rule['three_two_sides_double'] = '双'
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
# 总分:单/双-第四节
|
|
# 总分:单/双-第四节
|
|
|
try:
|
|
try:
|
|
|
four_odd_evens = result['o']["oeq4"]["v"]
|
|
four_odd_evens = result['o']["oeq4"]["v"]
|
|
@@ -466,8 +479,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
odd_evens_dict["four_two_sides_double"] = None
|
|
odd_evens_dict["four_two_sides_double"] = None
|
|
|
odd_evens_dict_rule['four_two_sides_double'] = '双'
|
|
odd_evens_dict_rule['four_two_sides_double'] = '双'
|
|
|
|
|
|
|
|
-# ----------------------------------------球队得分最后一位数分割线---------------------------------------------------------
|
|
|
|
|
- # 球队得分最后一位数 主队
|
|
|
|
|
|
|
+ # ----------------------------------------球队得分最后一位数分割线---------------------------------------------------------
|
|
|
|
|
+ # 球队得分最后一位数 主队
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
|
last_numbers = result["p-o"][0]['o']
|
|
last_numbers = result["p-o"][0]['o']
|
|
@@ -483,8 +496,10 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 球队得分最后一位数 客队
|
|
# 球队得分最后一位数 客队
|
|
|
try:
|
|
try:
|
|
|
new_last_numbers = result["p-o"][1]['o']
|
|
new_last_numbers = result["p-o"][1]['o']
|
|
|
- last_guest = {new_last_numbers[0][0]: new_last_numbers[0][2], new_last_numbers[1][0]: new_last_numbers[1][2],
|
|
|
|
|
- new_last_numbers[2][0]: new_last_numbers[2][2], new_last_numbers[3][0]: new_last_numbers[3][2],
|
|
|
|
|
|
|
+ last_guest = {new_last_numbers[0][0]: new_last_numbers[0][2],
|
|
|
|
|
+ new_last_numbers[1][0]: new_last_numbers[1][2],
|
|
|
|
|
+ new_last_numbers[2][0]: new_last_numbers[2][2],
|
|
|
|
|
+ new_last_numbers[3][0]: new_last_numbers[3][2],
|
|
|
new_last_numbers[4][0]: new_last_numbers[4][2]}
|
|
new_last_numbers[4][0]: new_last_numbers[4][2]}
|
|
|
# if new_last_numbers:
|
|
# if new_last_numbers:
|
|
|
# for new_last_number in new_last_numbers:
|
|
# for new_last_number in new_last_numbers:
|
|
@@ -492,7 +507,7 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
except:
|
|
except:
|
|
|
last_guest = {}
|
|
last_guest = {}
|
|
|
last_numbers_dict["last_guest"] = last_guest
|
|
last_numbers_dict["last_guest"] = last_guest
|
|
|
-# ------------------------------------------------------独赢分割线---------------------------------------------------------
|
|
|
|
|
|
|
+ # ------------------------------------------------------独赢分割线---------------------------------------------------------
|
|
|
|
|
|
|
|
# 独赢
|
|
# 独赢
|
|
|
try:
|
|
try:
|
|
@@ -578,8 +593,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
capots_dict["four_capot_home"] = None
|
|
capots_dict["four_capot_home"] = None
|
|
|
capots_dict["four_capot_guest"] = None
|
|
capots_dict["four_capot_guest"] = None
|
|
|
|
|
|
|
|
-# ---------------------------------------------------华丽分割线列表es[1]--------------------------------------------------
|
|
|
|
|
- # 球队得分 全场主队 home
|
|
|
|
|
|
|
+ # ---------------------------------------------------华丽分割线列表es[1]--------------------------------------------------
|
|
|
|
|
+ # 球队得分 全场主队 home
|
|
|
if result['pci']['ctid'] == 41:
|
|
if result['pci']['ctid'] == 41:
|
|
|
try:
|
|
try:
|
|
|
score_home = new_data[1]
|
|
score_home = new_data[1]
|
|
@@ -589,7 +604,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
if score_home:
|
|
if score_home:
|
|
|
try:
|
|
try:
|
|
|
score_homes = score_home["o"]["ou"]['v']
|
|
score_homes = score_home["o"]["ou"]['v']
|
|
|
- score_home_big_rule,score_home_big,score_home_small_rule,score_home_small = rangqiu_daxiao(inner=score_homes)
|
|
|
|
|
|
|
+ score_home_big_rule, score_home_big, score_home_small_rule, score_home_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=score_homes)
|
|
|
team_scores_dict_rule["score_home_big"] = score_home_big_rule
|
|
team_scores_dict_rule["score_home_big"] = score_home_big_rule
|
|
|
team_scores_dict["score_home_big"] = score_home_big
|
|
team_scores_dict["score_home_big"] = score_home_big
|
|
|
team_scores_dict_rule["score_home_small"] = score_home_small_rule
|
|
team_scores_dict_rule["score_home_small"] = score_home_small_rule
|
|
@@ -607,7 +623,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
try:
|
|
try:
|
|
|
half_score_homes = score_home['o']['ou1st']['v']
|
|
half_score_homes = score_home['o']['ou1st']['v']
|
|
|
# 球队得分 上半场主队 大条件
|
|
# 球队得分 上半场主队 大条件
|
|
|
- half_score_home_big_rule,half_score_home_big,half_score_home_small_rule,half_score_home_small = rangqiu_daxiao(inner=half_score_homes)
|
|
|
|
|
|
|
+ half_score_home_big_rule, half_score_home_big, half_score_home_small_rule, half_score_home_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=half_score_homes)
|
|
|
team_scores_dict_rule["half_score_home_big"] = half_score_home_big_rule
|
|
team_scores_dict_rule["half_score_home_big"] = half_score_home_big_rule
|
|
|
team_scores_dict["half_score_home_big"] = half_score_home_big
|
|
team_scores_dict["half_score_home_big"] = half_score_home_big
|
|
|
team_scores_dict_rule["half_score_home_small"] = half_score_home_small_rule
|
|
team_scores_dict_rule["half_score_home_small"] = half_score_home_small_rule
|
|
@@ -625,7 +642,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 球队得分:主队-大 / 小-第一节
|
|
# 球队得分:主队-大 / 小-第一节
|
|
|
try:
|
|
try:
|
|
|
one_score_homes = score_home['o']["ouq1"]["v"]
|
|
one_score_homes = score_home['o']["ouq1"]["v"]
|
|
|
- one_score_home_big_rule,one_score_home_big,one_score_home_small_rule,one_score_home_small = rangqiu_daxiao(inner=one_score_homes)
|
|
|
|
|
|
|
+ one_score_home_big_rule, one_score_home_big, one_score_home_small_rule, one_score_home_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=one_score_homes)
|
|
|
team_scores_dict_rule["one_score_home_big"] = one_score_home_big_rule
|
|
team_scores_dict_rule["one_score_home_big"] = one_score_home_big_rule
|
|
|
team_scores_dict["one_score_home_big"] = one_score_home_big
|
|
team_scores_dict["one_score_home_big"] = one_score_home_big
|
|
|
team_scores_dict_rule["one_score_home_small"] = one_score_home_small_rule
|
|
team_scores_dict_rule["one_score_home_small"] = one_score_home_small_rule
|
|
@@ -643,7 +661,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 球队得分:主队-大 / 小-第一节
|
|
# 球队得分:主队-大 / 小-第一节
|
|
|
try:
|
|
try:
|
|
|
two_score_homes = score_home['o']["ouq2"]["v"]
|
|
two_score_homes = score_home['o']["ouq2"]["v"]
|
|
|
- two_score_home_big_rule,two_score_home_big,two_score_home_small_rule,two_score_home_small = rangqiu_daxiao(inner=two_score_homes)
|
|
|
|
|
|
|
+ two_score_home_big_rule, two_score_home_big, two_score_home_small_rule, two_score_home_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=two_score_homes)
|
|
|
team_scores_dict_rule["two_score_home_big"] = two_score_home_big_rule
|
|
team_scores_dict_rule["two_score_home_big"] = two_score_home_big_rule
|
|
|
team_scores_dict["two_score_home_big"] = two_score_home_big
|
|
team_scores_dict["two_score_home_big"] = two_score_home_big
|
|
|
team_scores_dict_rule["two_score_home_small"] = two_score_home_small_rule
|
|
team_scores_dict_rule["two_score_home_small"] = two_score_home_small_rule
|
|
@@ -661,7 +680,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 球队得分:主队-大 / 小-第一节
|
|
# 球队得分:主队-大 / 小-第一节
|
|
|
try:
|
|
try:
|
|
|
three_score_homes = score_home['o']["ouq3"]["v"]
|
|
three_score_homes = score_home['o']["ouq3"]["v"]
|
|
|
- three_score_home_big_rule,three_score_home_big,three_score_home_small_rule,three_score_home_small = rangqiu_daxiao(inner=three_score_homes)
|
|
|
|
|
|
|
+ three_score_home_big_rule, three_score_home_big, three_score_home_small_rule, three_score_home_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=three_score_homes)
|
|
|
team_scores_dict_rule["three_score_home_big"] = three_score_home_big_rule
|
|
team_scores_dict_rule["three_score_home_big"] = three_score_home_big_rule
|
|
|
team_scores_dict["three_score_home_big"] = three_score_home_big
|
|
team_scores_dict["three_score_home_big"] = three_score_home_big
|
|
|
team_scores_dict_rule["three_score_home_small"] = three_score_home_small_rule
|
|
team_scores_dict_rule["three_score_home_small"] = three_score_home_small_rule
|
|
@@ -679,7 +699,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 球队得分:主队-大 / 小-第四节
|
|
# 球队得分:主队-大 / 小-第四节
|
|
|
try:
|
|
try:
|
|
|
four_score_homes = score_home['o']["ouq4"]["v"]
|
|
four_score_homes = score_home['o']["ouq4"]["v"]
|
|
|
- four_score_home_big_rule,four_score_home_big,four_score_home_small_rule,four_score_home_small = rangqiu_daxiao(inner=four_score_homes)
|
|
|
|
|
|
|
+ four_score_home_big_rule, four_score_home_big, four_score_home_small_rule, four_score_home_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=four_score_homes)
|
|
|
team_scores_dict_rule["four_score_home_big"] = four_score_home_big_rule
|
|
team_scores_dict_rule["four_score_home_big"] = four_score_home_big_rule
|
|
|
team_scores_dict["four_score_home_big"] = four_score_home_big
|
|
team_scores_dict["four_score_home_big"] = four_score_home_big
|
|
|
team_scores_dict_rule["four_score_home_small"] = four_score_home_small_rule
|
|
team_scores_dict_rule["four_score_home_small"] = four_score_home_small_rule
|
|
@@ -694,9 +715,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
team_scores_dict_rule["four_score_home_small"] = None
|
|
team_scores_dict_rule["four_score_home_small"] = None
|
|
|
team_scores_dict["four_score_home_small"] = None
|
|
team_scores_dict["four_score_home_small"] = None
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-# ---------------------------------------------------华丽分割线列表es[2]--------------------------------------------------
|
|
|
|
|
- # 球队得分 客队 guest
|
|
|
|
|
|
|
+ # ---------------------------------------------------华丽分割线列表es[2]--------------------------------------------------
|
|
|
|
|
+ # 球队得分 客队 guest
|
|
|
if result['pci']['ctid'] == 42:
|
|
if result['pci']['ctid'] == 42:
|
|
|
try:
|
|
try:
|
|
|
score_guest = new_data[2]
|
|
score_guest = new_data[2]
|
|
@@ -706,7 +726,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
try:
|
|
try:
|
|
|
# 球队得分: 大 / 小
|
|
# 球队得分: 大 / 小
|
|
|
score_guests = score_guest["o"]["ou"]['v']
|
|
score_guests = score_guest["o"]["ou"]['v']
|
|
|
- score_guest_big_rule,score_guest_big,score_guest_small_rule,score_guest_small = rangqiu_daxiao(inner=score_guests)
|
|
|
|
|
|
|
+ score_guest_big_rule, score_guest_big, score_guest_small_rule, score_guest_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=score_guests)
|
|
|
team_scores_dict_rule["score_guest_big"] = score_guest_big_rule
|
|
team_scores_dict_rule["score_guest_big"] = score_guest_big_rule
|
|
|
team_scores_dict["score_guest_big"] = score_guest_big
|
|
team_scores_dict["score_guest_big"] = score_guest_big
|
|
|
team_scores_dict_rule["score_guest_small"] = score_guest_small_rule
|
|
team_scores_dict_rule["score_guest_small"] = score_guest_small_rule
|
|
@@ -724,7 +745,8 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
# 球队得分 上半场客队 guest
|
|
# 球队得分 上半场客队 guest
|
|
|
try:
|
|
try:
|
|
|
half_score_guests = score_guest["o"]['ou1st']['v']
|
|
half_score_guests = score_guest["o"]['ou1st']['v']
|
|
|
- half_score_guest_big_rule,half_score_guest_big,half_score_guest_small_rule,half_score_guest_small = rangqiu_daxiao(inner=half_score_guests)
|
|
|
|
|
|
|
+ half_score_guest_big_rule, half_score_guest_big, half_score_guest_small_rule, half_score_guest_small = rangqiu_daxiao(
|
|
|
|
|
+ inner=half_score_guests)
|
|
|
team_scores_dict_rule["half_score_guest_big"] = half_score_guest_big_rule
|
|
team_scores_dict_rule["half_score_guest_big"] = half_score_guest_big_rule
|
|
|
team_scores_dict["half_score_guest_big"] = half_score_guest_big
|
|
team_scores_dict["half_score_guest_big"] = half_score_guest_big
|
|
|
team_scores_dict_rule["half_score_guest_small"] = half_score_guest_small_rule
|
|
team_scores_dict_rule["half_score_guest_small"] = half_score_guest_small_rule
|
|
@@ -840,13 +862,3 @@ class LanqiuSpider(scrapy.Spider):
|
|
|
item['team_score_rule'] = team_scores_dict_rule
|
|
item['team_score_rule'] = team_scores_dict_rule
|
|
|
item['lanqiu'] = lanqiu
|
|
item['lanqiu'] = lanqiu
|
|
|
yield item
|
|
yield item
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|