pytubev3 package

Submodules

pytubev3.pytube module

class pytubev3.pytube.Pytube(API_KEY: str, region_code='US', lang='en')[source]

Bases: object

channels_stats(channelIDs)[source]

_summary_

Parameters:

channelIDs (list) – list of youtube channels IDs

Returns:

list of dictionaries, containing stats of channels e.g subscriber count, views count, video count etc.

Return type:

list

chs_By_Keyword_Location(search_term: str, location_lat_long: str, location_radius='10mi', required_results=5, order_method='relevance', published_after='2010-01-01T00:00:00Z')[source]

_summary_

Parameters:
  • search_term (str) – Specifies the query term to search for. e.g to search for videos matching either “boating” or “sailing” but not “fishing”, set the q parameter value to boating|sailing -fishing.

  • location_lat_long (str) – The parameter value is a string that specifies latitude/longitude coordinates e.g. (37.42307,-122.08427)

  • location_radius (str, optional) – Used in conjunction with the location parameter, defines a circular geographic area. Defaults to “10mi”.

  • required_results (int, optional) – Number of desired results. Defaults to 5.

  • order_method (str, optional) – Specifies the method that will be used to order resources. Acceptable values are rating, date, relevance, title, videoCount, viewCount. Defaults to “relevance”.

  • published_after (str, optional) – Indicates that the response should only contain resources created at or after the specified time. Defaults to “2010-01-01T00:00:00Z”.

Returns:

List of Dictionaries, with ‘Channel_ID’ and ‘’Channel_Title’ of the Videos in the required location (latitude and longitude)

Return type:

list

chs_By_Keyword_RegionCode(search_term: str, required_results=5, order_method='relevance', published_after='2010-01-01T00:00:00Z')[source]

_summary_

Parameters:
  • search_term (str) – Specifies the query term to search for. e.g to search for videos matching either “boating” or “sailing” but not “fishing”, set the q parameter value to boating|sailing -fishing.

  • required_results (int, optional) – Number of desired results. Defaults to 5.

  • order_method (str, optional) – Specifies the method that will be used to order resources. Acceptable values are rating, date, relevance, title, videoCount, viewCount. Defaults to “relevance”.

  • published_after (str, optional) – Indicates that the response should only contain resources created at or after the specified time. Defaults to “2010-01-01T00:00:00Z”.

Returns:

List of Dictionaries, with ‘Channel_ID’ and ‘’Channel_Title’ of the Videos in the specified region.

Return type:

list

country_video_cat()[source]

_summary_

Returns:

List of Dictionaries, with ‘Video_Category_ID’ and ‘Title’ of the Categories in the required country

Return type:

list

video_details(videoIds)[source]

_summary_

Parameters:

videoIds (List) – list of youtube’s video IDs

Returns:

list of dictionaries with Title, Description, Published_Date, Likes, Favorite_Count, Comments_Count etc

Return type:

list

video_ids(playlist_ids)[source]

_summary_

Parameters:

playlist_ids (list) – list of playlist ids

Returns:

list of dictionaries with channel_id, channel_title, video_title, video_id

Return type:

list

Module contents