Saving BOTH to json and csv in the same grab/run
LegeNet opened this issue · 0 comments
Suggestion for new feature/functionality.
Saving BOTH to json and csv in the same grab/run, without having to re-fetch comments from YouTube (which may be "hairy" if there are very many of them). Or a separate tool to convert the json to csv after the json is retrieved. This is only an issue with running the script oneself, not when running from the site (when the site isn't blocked by YouTube, of course), as the site first retrieve the comments from YouTube and then allow one to save first in one and then in the other format without the site having to re-download from YouTube.
One thought for a solution would be more possible parameters to the scraper script, allowing specifying both formats and save to separate files. youtube-comment-scraper-cli-master/lib/csv.js already is aware of both the json and the csv, so perhaps that's the script that would become responsible for the actual output to two formats, if this is the solution opted for.
The perhaps easier solution is a separate simple converter from json to csv. Possibly using the already existing youtube-comment-scraper-cli-master/lib/csv.js .