Я получил python проект очистки веб-страниц, и когда я запускаю этот скрипт в диапазоне от 0 до 100, он запускается, но когда я увеличиваю число до 120 или выше, он возвращает
" AttributeError: 'NoneType' object has no attribute 'strip' "
from bs4 import BeautifulSoup
import urllib.request as requests
arr=[]
arrUrl=[]
url = "https://www.exam-mate.com/topicalpastpapers/?cat=3&subject=16&years=&seasons=&chapter=&paper=2%20(Extended)&unit=&zone=&level=&offset=0"
ins = url.split("=")
eqn = "="
for s in range(120,240,20):
ins[-1] = str(s)
j = eqn.join(ins)
arrUrl.append(j)
CountStr = 0
counting = 0
count = 0
while (count < len(arrUrl)):
response = requests.urlopen(arrUrl[count])
content = BeautifulSoup(response , "html.parser")
for tit in content.find_all("div" , class_="question"):
for title in tit.find_all("div"):
AlasOfLast.append(title.string)
while (CountStr < len(AlasOfLast)):
if (AlasOfLast[CountStr] == None):
del AlasOfLast[CountStr]
CountStr += 1
while (counting < len(AlasOfLast)):
if (counting % 2 == 0):
lenOfArr.append(AlasOfLast[counting])
counting += 1
AlasOfLast.clear()
for n in range(len(lenOfArr)) :
AlasOfLast.append(lenOfArr[n].strip())
count += 1
print(AlasOfLast)