Getting data from YouTube channel
You can extract media data (including some performance data, i.e. likes and views)
from publicly available videos in YouTube channel.
Supported types of content:
- Video file
- Video description
- Video thumbnail
- Video commentaries
Prerequisites
- YouTube Data API enabled and configured
Usage
media-fetcher \
--source youtube \
--youtube.channel=CHANNEL_ID
import media_fetching
from media_fetching.sources import youtube
fetcher = media_fetching.MediaFetchingService(source='youtube')
request = youtube.YouTubeFetchingParameters(
channel='CHANNEL_ID',
)
report = fetcher.fetch(request)
Reports can be written and processed. Learn more at garf.
Parameters
Mandatory
channel- YouTube channel Id.
Optional
type- Type of content to get from channel. One ofvideos,thumbnails,descriptions,commentaries.
media-fetcher \
--source youtube \
--youtube.channel=CHANNEL_ID \
--youtube.type=commentaries
import media_fetching
from media_fetching.sources import youtube
fetcher = media_fetching.MediaFetchingService(source='youtube')
request = youtube.YouTubeFetchingParameters(
channel='CHANNEL_ID',
type='commentaries',
)
report = fetcher.fetch(request)