Do not parse the upload dates of search results as they could be downloaded in a different language than the rest of the pages.

This commit is contained in:
wojcik-online 2018-02-06 22:32:53 +01:00
parent e432a95032
commit da8f169409
2 changed files with 3 additions and 6 deletions

View File

@ -39,11 +39,8 @@ public class YoutubeSearchEngine extends SearchEngine {
private static final String TAG = YoutubeSearchEngine.class.toString();
public static final String CHARSET_UTF_8 = "UTF-8";
private final TimeAgoParser timeAgoParser;
public YoutubeSearchEngine(int serviceId, TimeAgoParser timeAgoParser) {
public YoutubeSearchEngine(int serviceId) {
super(serviceId);
this.timeAgoParser = timeAgoParser;
}
@Override
@ -111,7 +108,7 @@ public class YoutubeSearchEngine extends SearchEngine {
// video item type
} else if ((el = item.select("div[class*=\"yt-lockup-video\"]").first()) != null) {
collector.commit(new YoutubeStreamInfoItemExtractor(el, timeAgoParser));
collector.commit(new YoutubeStreamInfoItemExtractor(el, null));
} else if ((el = item.select("div[class*=\"yt-lockup-channel\"]").first()) != null) {
collector.commit(new YoutubeChannelInfoItemExtractor(el));
} else if ((el = item.select("div[class*=\"yt-lockup-playlist\"]").first()) != null &&

View File

@ -48,7 +48,7 @@ public class YoutubeService extends StreamingService {
@Override
public SearchEngine getSearchEngine() {
return new YoutubeSearchEngine(getServiceId(), getTimeAgoParser());
return new YoutubeSearchEngine(getServiceId());
}
@Override