i have a problem with writing into a csv file. First the "lists" in the code would return a list that has the usernames with a lot of gaps and does not show properly. Secondly once I try to write it in the csv file I would get each character of the username in a different cell in excel.
for i in range(0,33):
link = (df.link.iloc[i])
source1 = urllib.request.urlopen(link).read()
soup1 = bs.BeautifulSoup(source1,'lxml')
for username in soup1.find_all('div', class_="user-name"):
lists.append(username.text)
# for time in soup1.find_all('div',class_="thread-ago"):
example = open('generalinfo.csv','w')
wr = csv.writer(example,quoting = csv.QUOTE_ALL)
wr.writerows(lists)
example.close()
