[StreamTube] Import YouTube Videos
- Add An Importer
- Create A YouTube API Key
- Manual Import
- Auto Import Using Hosting Cronjob
- Auto Import Using WP Control Plugin
Add An Importer
Navigate to Videos > YouTube Importers > Add New
- Add Title: Enter a custom title for the importer, for example: My Music
- Enable: Enable the importer in case of running automatically via hosting Cron Job
- Youtube API Key : Enter your own Youtube API key
- Search: Specifies the query term to search for. Your request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either "boating" or "sailing", set the search field value to boating|sailing. Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the search field value to boating|sailing -fishing.
- Channel/Playlist ID: The field value indicates that the API response should only contain resources created by the channel.
- Max Results Specifies the maximum number of items that should be returned in the result set. Acceptable values are 0 to 50
- Event Type: Restricts a search to broadcast events
- Video Type: Restrict a search to a particular type of videos
- Safe Search: Indicates whether the search results should include restricted content as well as standard content.
- Video Definition: Restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available
- Video Dimension: Restrict a search to only retrieve 2D or 3D videos
- Video Duration: Filters video search results based on their duration
- Video License: Filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos.
- Published After: Indicates that the API response should only contain resources created at or after the specified time
- Published Before: Indicates that the API response should only contain resources created before or at the specified time
- Region Code: Instructs the API to return search results for videos that can be viewed in the specified country
- Relevance Language: Instructs the API to return search results that are most relevant to the specified language
- Video Categories: Choose the video categories the videos will be imported to
- Video Tags: Choose the video tags the videos will be imported to
- Import Tags: Imports video keywords
*** You can add many importers as you wish
Create A YouTube API Key
Manual Import
Auto Import Using Hosting Cronjob
Copy the CronTab URL of Importer and set it up in your Hosting Panel
For example, with DreamHost hosting
Command
wget http://domain.com/youtube_importer/my-music/?key=123456789
OR
curl 'http://domain.com/youtube_importer/my-music/?key=123456789'
Auto Import Using WP Control Plugin
- Install and Activate WP Control plugin https://wordpress.org/plugins/wp-crontrol/
- Navigate to Tools > Cron Events > Add New
Choose and fill in the necessary fields and click the "Add Event" button.
file_get_contents( 'your crontab url' );