使用python进行网络抓取-未下载动态表格数据

我想从网站https://explorer.flitsnode.app/address/FieXP1irJKvmWUiqV18AFdDZD8bgWvfRiC/获取交易时间 但是当我请求html 时,我没有完整的网站数据

我得到了除所需表内容以外的所有内容-“地址交易”

enter image description here

我有#txaddr表的css选择器,但它只返回顶部(时间戳,块,哈希,..)

到目前为止,我的代码-我在其中添加了一些注释。

import bs4
from urllib.request import Request,urlopen
from bs4 import BeautifulSoup

def NodeRewardTime(link):
   req = Request(link,headers={'User-Agent': 'Mozilla/5.0'})
   webpage = urlopen(req).read()
   soup = bs4.BeautifulSoup(webpage,'html5lib')  # pip install html5lib
   all_results = soup.select("#txaddr") # CSS selector for the entire table
   try:
       [print(x.text) for x in all_results] # prints results 
   except:
       print("No data to show")

link = "https://explorer.flitsnode.app/address/FieXP1irJKvmWUiqV18AFdDZD8bgWvfRiC/"

NodeRewardTime(link)
input("End")

输出:TimestampBlockHashAmount(FLS)余额(FLS)TX类型[End]

enter image description here

相关文章

本文适合有 Python 基础的小伙伴进阶学习 作者:pwwang 一、...
前言 目前有个python应用需要在容器镜像内拉取git私有仓库的...
前言 当网络不稳定或应用页面加载有问题,可以设置等待,避免...
前言 map()、reduce()、filter()是python的三个高阶函数。所...
入门使用 # 示例代码 warframe = ["saryn&quot...
前言 功能描述:批量重命名指定目录下的文件,文件名加前缀,...