Skip to content

Instantly share code, notes, and snippets.

@saasindustries
Created February 23, 2021 16:29
Show Gist options
  • Save saasindustries/ccae95afdef79d2a46e11168455a245c to your computer and use it in GitHub Desktop.
Save saasindustries/ccae95afdef79d2a46e11168455a245c to your computer and use it in GitHub Desktop.
static void ExportAdsToCsv(List<AdDetails> lstAdDetails, string Keyword){
using(var writer = new StreamWriter($@"/Users/guest/Desktop/ScrapySharp_scraper/CSVs/{Keyword}_{DateTime.Now.ToFileTime()}.csv"))
using(var csv = new CsvWriter(writer, CultureInfo.InvariantCulture)){
csv.WriteRecords(lstAdDetails);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment