我无法抓取 html 代码的一部分(BeautifulSoup)



我正在尝试获取此页面的信息表https://www.binance.com/es-LA/altcoins/new页面底部的新硬币。但我对此有很多问题。

当我试图查找html代码的某些部分(包含表信息的部分(时,我会获得NoneType对象。我试着用div来查找div,但在同一部分我总是遇到同样的问题。

Buscador = requests.get('https://www.binance.com/es-LA/altcoins/new', 'lxml')
BuscadorSopeado = bs(Buscador.text, features = 'html.parser')
BusquedaPrimero = BuscadorSopeado.find(name = 'div', attrs = {'class': "css-1t63o3e"})

其中type(BusquedaPrimero(=无。

如果我看到html代码的前一部分,我会得到一条巨大的行:

IN:
BusquedaPrimero = BuscadorSopeado.find(name = 'div', attrs = {'class': "css-pcu8qt"})
OUT:    
<div class="css-pcu8qt"><style data-emotion-css="18rcfta">.css-18rcfta{box-sizing:border-box;margin:0;min-width:0;overflow-wrap:break-word;font-size:24px;font-weight:600;line-height:32px;color:#1E2329;margin-bottom:64px;}@media screen and (min-width:767px){.css-18rcfta{font-size:32px;font-weight:600;line-height:40px;}}@media screen and (min-width:1023px){.css-18rcfta{font-size:40px;font-weight:600;line-height:48px;}}</style><h2 class="container__title css-18rcfta" data-bn-type="text">Principales criptoactivos por porcentaje de la capitalización total de mercado</h2><div class="sc-gtsrHT cVacoL cmc-btc-percentage-chart" id="dominance-percentage"><style data-emotion-css="1ig4gr6">.css-1ig4gr6{box-sizing:border-box;margin:0;min-width:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:30px;height:30px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;margin-left:auto;margin-right:auto;margin-top:337px;margin-bottom:337px;}</style><div class="css-1ig4gr6"><style data-emotion-css="2bc2yz animation-hqgv56">

*AND MORE THINGS THAT I CUT.*

我是新刮东西的,所以如果解决方法简单,我很抱歉。

我不知道你在网页上到底在找什么,但有两种解释:首先,网站会阻止你的请求,所以你应该看到404状态或403,如果是这种情况,我建议添加一个";标题";用";user_agent"在您的请求中第二,如果你试图抓取一个使用javascript的网站,你可能会错过一些信息,因为遗憾的是,bs4库无法获得javascript组件