Russell-Newton / TikTokPy

Extract data from TikTok without needing any login information or API keys.
https://pypi.org/project/tiktokapipy/
MIT License
192 stars 24 forks source link

[FEATURE REQUEST] Set unable to collect comments back to warnings.warn #42

Closed stolenvw closed 1 year ago

stolenvw commented 1 year ago

Can we get this set back to warnings.warn so it stops flooding us with its message

 if not video.comments:
            print(
                "Was unable to collect comments.\n"
                "A second attempt or setting a nonzero value for scroll_down_time might work.",
                file=sys.stderr,
            )
Russell-Newton commented 1 year ago

Done in version 0.1.13.post1. I also went ahead and made these warnings issued under a new category, TikTokAPIWarning, which can be ignored as follows:

import warnings
from tiktokapipy import TikTokAPIWarning

warnings.filterwarnings("ignore", category=TikTokAPIWarning)