コード例 #1
0
    def setup(cls, filepath: str = None):
        """
        Requests browser headers from the user via command line
        and returns a string that can be passed to YTMusic()

        :param filepath: Optional filepath to store headers to.
        :return: configuration headers string
        """
        return setup(filepath)
コード例 #2
0
ファイル: ytmusic.py プロジェクト: srcLurker/ytmusicapi
    def setup(cls, filepath: str = None, headers_raw: str = None) -> Dict:
        """
        Requests browser headers from the user via command line
        and returns a string that can be passed to YTMusic()

        :param filepath: Optional filepath to store headers to.
        :param headers_raw: Optional request headers copied from browser.
            Otherwise requested from terminal
        :return: configuration headers string
        """
        return setup(filepath, headers_raw)
コード例 #3
0
 def setup(self):
     """
     Requests browser headers from the user and stores a configuration
     JSON file in the correct format in the current directory
     """
     setup()