当我尝试抓取一些元素时,bs4返回空数组

时间:2020-04-15 10:27:34

标签: python web-scraping beautifulsoup

您好,我是剪贴的新手……我想从此页面“ https://xangle.io/project/XTZ/full-disclosure”中剪贴以下元素: this element .. (您需要向下滚动才能找到此部分) 但是当我使用以下代码时,它返回空值 我使用了以下代码

def token_name_scrapper(soup, section, class_):
token_name_container = soup.find_all(section, class_ = class_)
print(token_name_container)

#Build the scrapper
def scrapper(url):
    r1 = requests.get(url)
    coverpage = r1.content
    soup1 = BeautifulSoup(coverpage, 'html5lib')
    token_name_scrapper(soup1, "div", "fv1")
scrapper("https://xangle.io/project/XTZ/full-disclosure")

它返回空数组。请有人帮我找到解决方案吗?

0 个答案:

没有答案