egbertbouman / youtube-comment-downloader

Simple script for downloading Youtube comments without using the Youtube API
MIT License
914 stars 227 forks source link

Exclude CID from output #41

Closed vanitysys28 closed 4 years ago

vanitysys28 commented 4 years ago

I'm using this script to extract commentors name and profile pictures URL. Any way to remove the CID from the output? After my testing, it seems hard to achieve because it's required in functions.

d0tN3t commented 4 years ago

Hey @vanitysys28

Is this possibly what you're looking to do? {"author":comment["author"], "photo":comment["photo"]}

And then if you decide you want to add the items back in you could just modify the code by repeating the process and adding the key:value you'd like to bring back in.

Screen Shot 2020-07-17 at 11 11 28 AM

You would just need to make that change at line 234

Screen Shot 2020-07-17 at 11 17 31 AM

{"author":comment["author"], "photo":comment["photo"]}

vanitysys28 commented 4 years ago

Perfect, that's exactly what I needed! Just edited comment_json with the right json.dumps so that it gets added to the output file.

Thanks a lot