tryna merge dem files

This commit is contained in:
chschtsch 2015-11-10 20:36:35 +03:00
parent d0877c3132
commit 7ff43caf96
2 changed files with 6 additions and 3 deletions

View File

@ -288,8 +288,8 @@ public class YoutubeExtractor implements Extractor {
videoInfo.upload_date = doc.select("strong[class=\"watch-time-text\"").first() videoInfo.upload_date = doc.select("strong[class=\"watch-time-text\"").first()
.text(); .text();
// Try to only use date not the text around it // Extracting the date itself from header
videoInfo.upload_date = matchGroup1("([0-9.]*$)", videoInfo.upload_date); videoInfo.upload_date = matchGroup1("([A-Za-z]{3}\\s[\\d]{1,2},\\s[\\d]{4}$)", videoInfo.upload_date);
// description // description
videoInfo.description = doc.select("p[id=\"eow-description\"]").first() videoInfo.description = doc.select("p[id=\"eow-description\"]").first()
@ -320,6 +320,9 @@ public class YoutubeExtractor implements Extractor {
// view count // view count
videoInfo.view_count = doc.select("div[class=\"watch-view-count\"]").first().text(); videoInfo.view_count = doc.select("div[class=\"watch-view-count\"]").first().text();
// Extracting the number of views from header
videoInfo.view_count = matchGroup1("([0-9,]*$)", videoInfo.view_count);
// next video // next video
videoInfo.nextVideo = extractVideoInfoItem(doc.select("div[class=\"watch-sidebar-section\"]").first() videoInfo.nextVideo = extractVideoInfoItem(doc.select("div[class=\"watch-sidebar-section\"]").first()
.select("li").first()); .select("li").first());

View File

@ -49,5 +49,5 @@
<string name="showNextAndSimilarTitle">Show next and similar videos</string> <string name="showNextAndSimilarTitle">Show next and similar videos</string>
<string name="urlNotSupportedText">URL not supported.</string> <string name="urlNotSupportedText">URL not supported.</string>
<string name="showSimilarVideosButtonText">Similar videos</string> <string name="showSimilarVideosButtonText">Similar videos</string>
<string name="contentCountryTitle">Preferable content language</string> <string name="searchLanguageTitle">Preferable content language</string>
</resources> </resources>