forked from Archives/Athou_commafeed
improve youtube feed URL getter
This commit is contained in:
@@ -113,8 +113,6 @@ public class FeedFetcher {
|
|||||||
private String extractYoutubeFeedUrl(String url) {
|
private String extractYoutubeFeedUrl(String url) {
|
||||||
Pattern regexp = Pattern.compile("(.*\\byoutube\\.com)\\/channel\\/([^\\/]+)", Pattern.CASE_INSENSITIVE);
|
Pattern regexp = Pattern.compile("(.*\\byoutube\\.com)\\/channel\\/([^\\/]+)", Pattern.CASE_INSENSITIVE);
|
||||||
Matcher matcher = regexp.matcher(url);
|
Matcher matcher = regexp.matcher(url);
|
||||||
if ( matcher.find() ) {
|
return matcher.find() ? matcher.group(1) + "/feeds/videos.xml?channel_id=" + matcher.group(2) : null;
|
||||||
return matcher.group(1) + "/feeds/videos.xml?channel_id=" + matcher.group(2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user