Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 美女们没上好课_Python_Beautifulsoup_Python Requests - Fatal编程技术网

Python 美女们没上好课

Python 美女们没上好课,python,beautifulsoup,python-requests,Python,Beautifulsoup,Python Requests,我想刮取标记标签旁边的lisbox href 我需要从 class="link-hover d-flex justify-content-between align-items-center" 所以我的代码是: import requests from bs4 import BeautifulSoup page = requests.get('https://etherscan.io/address/0xCcE984c41630878b91E20c416dA3F30885

我想刮取标记标签旁边的lisbox href

我需要从

class="link-hover d-flex justify-content-between align-items-center"
所以我的代码是:

import requests
from bs4 import BeautifulSoup

page = requests.get('https://etherscan.io/address/0xCcE984c41630878b91E20c416dA3F308855E87E2').text
html = BeautifulSoup(page, 'html.parser')

href = html.find(class_ = 'link-hover d-flex justify-content-between align-items-center')['href']
然而,结果是什么都没有。有人能帮我吗?
我真的需要一些帮助。

我认为对于请求库,您不能这样做,因为Cloudflare检测到自动化

>page=请求。获取('https://etherscan.io/address/0xCcE984c41630878b91E20c416dA3F308855E87E2')
>>>page.status\u代码
403
HTTP 403禁止客户端错误状态响应代码表示服务器理解该请求,但拒绝对其进行授权。 尝试
selenium
library而不是
bs4
页面标题

>soup=BeautifulSoup(page.content,'html.parser')
>>>汤名
>>>需要注意云焰

有没有办法从窗口隐藏selenium,让它看起来不工作?我尝试使用请求的原因是,我不想显示chrome界面的工作方式,您可以使用selenium模式。