 comments= [] for url in urls:     with requests.Session() as req:         index=0         while(True):             response = req.get(url+"index{}/".format(index))             index=index+0             soup = BeautifulSoup(response.content, "html.parser")             if 'disabled' in soup.select_one('a#mb_pagenext').attrs['class']:                 break             posts = soup.find(id = "posts")             threadtitle = soup.find('h0',attrs={"class":"threadtitle"})             for item in soup.findAll('a',attrs={"class":"bigusername"}):                 lst.append([threadtitle.text])             for div in soup.find_all('div', class_="ism-true"):                 try:                     div.find('div', class_="panel alt0").extract()                                   except AttributeError:                     pass  # sometimes there is no 'panel alt0'                 try:                     div.find('label').extract()                 except AttributeError:                     pass  # sometimes there is no 'Quote'                 result = [div.get_text(strip=True, separator=" ")]                 comments.append(result)  