philbot9/youtube-comment-scraper

Exporting csv as utf-8

Closed this issue · 2 comments

First of all, thank you for taking the time to make this wonderful YT comment scraper - I was having such trouble with python and this saves me so much time.

One small question I have is: I work with the German language and emoji, both of which cause encoding problems when opened as a csv file in excel - neither the emoji nor the diacritics (äöüß) show up as they should. I was wondering if this is an issue with excel - I have tried to save the file as utf-8 through web options but perhaps this is something you can specify in the code?

n.b. everything looks and works perfectly when opening the .json version in Notepad++

Many thanks in advance!

Ok so I have found a slight workaround for this - perhaps you can let people know these steps on the website to prevent similar issues:
I opened a blank excel spreadsheet and then under the 'data' tab imported 'From text/CSV' and chose UTF-8 as the encoding.

Any other advice would be appreciated!

Thank you once again for making thise

Thanks for sharing. Sounds like the issue is not with the CSV data itself, but making sure to specify UTF-8 when importing it into Excel. FWIW, LibreOffice will automatically select UTF-8 when importing, which is how I confirmed it works.

I'll make sure to direct other users here if and when the problem comes up again.

Cheers