Python webpage parsing (data missing)

时间:2018-06-04 17:01:01

标签: python parsing

I am parsing data from a webpage(Html) where some data is missing like for some posts-time is missing or their author name is blank.

i was using regerx to get data from html like :

Rating = response.xpath('//dl/dt/a[3]').re('.*?\#(.*)?"')

How can i fill "blank or nan" into corresponding columns if some data is missing.I have save data into excel sheets

Please suggest some way or any related hint to get a solution. Sorry, for any mistake I am new here. Hope you understand

0 个答案:

没有答案