Answer the question
In order to leave comments, you need to log in
What is the correct way to write to casperjs file?
Hello, I want to write the results of parsing to a text file, then import the data into the database. But I ran into a problem, he writes each entry to a new line, for example:
data1;
data2;
data3;
data1;
data2;
data3;
data1;data2;data3
data1;data2;data3
var content = data.data1 + ";" + data.data2 + ";" + data.data3 + "\n";
fs.write('myfile.txt', content, 'a')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question