Save empty Csv information if command is error

I am trying to do some scraping and want to put every information in a csv file, currently the only problem I have is that some pages on the website have more information than others, but I would like it if when I get to a point were there is an absent line it can skip this error. The only problem is that I want to be able to store an empty value if it is an error. I don’t want the code to simply skip to the nest value. How can I do that…
Here is a sample code that I currently have:
{
“Command”: “storeValue”,
“Target”: "id=b0p1o464i0i13r1 ",
“Value”: “!csvLine”
},
{
“Command”: “storeValue”,
“Target”: "id=b0p1o149i0i13r1 ",
“Value”: “!csvLine”
},