yt-trending-scraper
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "yt-trending-scraper", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Identifies the currently trending videos on YouTube and returns all trending site information about every video without accessing the YouTube API.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -76,5 +76,8 @@ const requester = require("./TrendingRequester") | ||
video_entry.timeText = videoRenderer.lengthText.simpleText; | ||
video_entry.description = videoRenderer.descriptionSnippet.runs[0].text; | ||
video_entry.lengthSeconds = this.calculate_length_in_seconds(video_entry.timeText); | ||
video_entry.videoThumbnails = this.extract_thumbnail_data(video_entry.videoId); | ||
//check whether the property is available, because there can be videos without description which won't have an empty property | ||
if(videoRenderer.hasOwnProperty("descriptionSnippet")){ | ||
video_entry.description = videoRenderer.descriptionSnippet.runs[0].text; | ||
} | ||
return video_entry; | ||
@@ -81,0 +84,0 @@ } |
46722
158