I am using Python 2.7.18 and i'm copying a code. I get one error: IndexError: list index out of range

I am using Python 2.7.18 and i’m copying a code. I try to check something with this code regarding ethereum private keys:

# -*- coding: utf-8 -*-
# !/usr/bin/python

import requests
import time
import sha3
from bs4 import BeautifulSoup
from ecdsa import SigningKey, SECP256k1

start = time.time()

i = 1
while i <= 7:

    t_time = time.time() - start

    keccak = sha3.keccak_256()
    priv = SigningKey.generate(curve=SECP256k1)
    pub = priv.get_verifying_key().to_string()
    address = keccak.hexdigest()[24:]

    z = (priv.to_string().encode('hex'))

    url = ("https://etherscan.io/address/%s" % address)
    html = requests.get(url, headers={'User-agent': 'Mozilla/5.0'}).text
    soup = BeautifulSoup(html, "html.parser")
    table = soup.find("div", {"class": "col-md-6"})
    value = table.findAll('td')[1].text.split(' ')[0].strip()

And i get this error:

PyDev console: starting.
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:19:08) [MSC v.1500 32 bit (Intel)] on win32
runfile('C:/Users/crm/PycharmProjects/eth-balance/turc.py', wdir='C:/Users/crm/PycharmProjects/eth-balance')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.2\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "C:/Users/fatua/PycharmProjects/eth-balance/turc.py", line 32, in <module>
    value = table.findAll('td')[1].text.split(' ')[0].strip()
IndexError: list index out of range

Its there a problem with the value or should be something with the Table Data?

The index error is usually due to your loop trying to access an element that is out of the range or a non-existent index item.

The line of code that has the error is right above the IndexError message.