I am scraping some contents from this site. While writing like the conference head after extracting from the site in csv file the first name is not coming properly, e.g. if the word is microsoft it is coming as osoft but rest all of the words are coming properly
Here is my code:
import csv
import requests
from bs4 import BeautifulSoup
with open('random.csv', 'w') as csvfile:
a = csv.writer(csvfile)
a.writerow(["conferenceHead"])
url = given above
r = requests.get(url)
soup = BeautifulSoup(r.content)
links = soup.find_all("div")
r_data = soup.find_all("div",{"class":"conferenceHead"})
for item in r_data:
conferenceHead = item.contents[1].text
with open('random.csv','a') as csvfile:
a = csv.writer(csvfile)
data = [conferenceHead]
a.writerow(data)