GoogleApiClient#
- class langchain_community.document_loaders.youtube.GoogleApiClient(credentials_path: Path = PosixPath('/home/runner/.credentials/credentials.json'), service_account_path: Path = PosixPath('/home/runner/.credentials/credentials.json'), token_path: Path = PosixPath('/home/runner/.credentials/token.json'))[source]#
Generic Google API Client.
To use, you should have the
google_auth_oauthlib,youtube_transcript_api,google
python package installed. As the google api expects credentials you need to set up a google account and register your Service. “https://developers.google.com/docs/api/quickstart/python”- Security Note: Note that parsing of the transcripts relies on the standard
xml library but the input is viewed as trusted in this case.
Example
from langchain_community.document_loaders import GoogleApiClient google_api_client = GoogleApiClient( service_account_path=Path("path_to_your_sec_file.json") )
Attributes
credentials_path
service_account_path
token_path
Methods
__init__
(*args, **kwargs)Validate that either folder_id or document_ids is set, but not both.
- Parameters:
credentials_path (Path)
service_account_path (Path)
token_path (Path)
- __init__(*args: Any, **kwargs: Any) None #
- Parameters:
__dataclass_self__ (PydanticDataclass)
args (Any)
kwargs (Any)
- Return type:
None
Examples using GoogleApiClient