# -*- coding: utf-8 -*-
....
with open(filename, 'w+', encoding='utf8', newline='') as file:
writer = csv.writer(file, delimiter=';')
count_elements = len(data['urls'])
for i in range(1, count_elements):
writer.writerow([
data['titles'][i],
data['titles'][i],
int(data['costs'][i]),
data['address'][i],
data['urls'][i],
])