egbertbouman / youtube-comment-downloader

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

Added an indented representation and json outfile in different functions #119

Closed Ali-Al-Hadi-Al-Husseini closed 1 year ago

Ali-Al-Hadi-Al-Husseini commented 1 year ago

added to functions:

  1. get_comments_from_url_json_file

    1. added two arguments indent and output_limit

      1. indent specifies how many space to add in the output
      2. output_limit states how many comments to output to the file
    2. doesn't return anything and outputs the result to the output.json file

  2. get_comments_from_url_prettier

    1. added two arguments as above
    2. wrapped comments in a custom Comment class

doesn't affect the original code

egbertbouman commented 1 year ago

I'm not sure about merging this as I don't think it's needed. Anyone using this script as a library would be more then capable of doing something meaningful with the comment dicts.

I'll work on adding a pretty print option to the CLI, though.

Ali-Al-Hadi-Al-Husseini commented 1 year ago

Oh, I see your point