Issue
I try to delete symsol ":" from dates and it doesn't work:
oper_dates=response.css('.textonline__date::text').extract()
for item in oper_dates:
clean_oper_date = item.replace(':', '')
oper_dates get data correctly but after replace I get empty csv. Why?
Solution
You need to place replaced result somewhere and save it at the end into csv:
oper_dates=response.css('.textonline__date::text').extract()
clean_oper_dates = []
for item in oper_dates:
clean_oper_date = item.replace(':', '')
clean_oper_dates.append(clean_oper_date)
# save clean_oper_dates into CSV
Answered By - gangabass
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.