+ let tags = []
+ if (Array.isArray(videoInfo.tags)) {
+ tags = videoInfo.tags.filter(t => t.length < CONSTRAINTS_FIELDS.VIDEOS.TAG.max).slice(0, 5)
+ }
+
+ let thumbnailfile
+ if (videoInfo.thumbnail) {
+ thumbnailfile = join(__dirname, 'thumbnail.jpg')
+
+ await doRequestAndSaveToFile({
+ method: 'GET',
+ uri: videoInfo.thumbnail
+ }, thumbnailfile)
+ }