不可能从这个u

2024-06-24 13:40:47 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我在这里的第一篇文章。我已经有5个月没有从零开始自学python了,我确实通过这个论坛获得了我的大部分知识,现在我能够创建webbot,可以轻松地获取所有类型的数据,尤其是在体育博彩网站。在

尽管出于这种特殊的需要,有一个网站我无法从中提取我正在寻找的内容:

winamax

我想得到所有足球赛事的所有链接(在左边,例如:

"https://www.winamax.fr/paris-sportifs#!/match/prelive/7894014"

但是当我查看源代码,或者打印我的汤时,我什么也没有得到。在

^{pr2}$

对于我已经想到的所有博彩公司来说,总是有一个简单的html树结构,其中所有的项目都很容易找到,或者是一个隐藏的javascript文件,或者一个json链接。 但对于这一个,即使是试图捕捉与萤火虫流,我也找不到任何相关的东西。在

如果有人知道如何实现它,请提前感谢(我考虑过使用PhantomJS,但还没有尝试)。在

编辑:

@ssundarraj公司: 在标题下面,我在我所有的项目中都使用了相同的内容,因此我认为这与此无关,但无论如何,这里是:

AgentsFile='UserAgents.txt'
lines = open(AgentsFile).read().splitlines()
myline =random.choice(lines)
headers = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'Accept-Charset':'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
    'Accept-Encoding':'gzip,deflate,sdch',
    'Accept-Language':'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3',
    'Referer' : 'https://www.winamax.fr',
    'User-Agent': myline}

编辑2:

@克里斯李尔

using firebug, in the net panel, you can search through all the response bodies (there's a checkbox called "Response Bodies" that appears when you click the search box). That will show you that the data is being fetched by json. I'll leave you to try to make sense of it, but that might give you a start (searching for ids is probably best)

我检查了你上面提到的方框,但是没有效果:( 无论有没有过滤器,我的网络面板上都不会显示任何内容,如图所示:

nothing caught


Tags: the项目httpsyou内容that网站链接
1条回答
网友
1楼 · 发布于 2024-06-24 13:40:47

用萤火虫找到这个。 使用参数向https://www.winamax.fr/betting/slider/slider.php发出POST请求:

  • 键=050e42fb0761c96526e8510eda89248f
  • lang=法国

不知道钥匙是不是变了,但现在它起作用了。在

相关问题 更多 >