REMitchell/python-scraping

Indentation Error (Storing Data, 4th code)

chikoungoun opened this issue · 0 comments

On the second loop there is a slight indentation issue to have the proper form

csvFile = open('editors.csv', 'wt+')
writer = csv.writer(csvFile)
try:
    for row in rows:
        csvRow = []
        for cell in row.findAll(['td', 'th']):
            csvRow.append(cell.get_text())
        writer.writerow(csvRow) #it should be indented backward to have a proper csv form
finally:
    csvFile.close()