fixed NPE for services where comments is not available

This commit is contained in:
Ritvik Saraf 2018-09-19 05:32:14 +05:30
parent 4794e16dcb
commit e04787f340
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,11 @@ public abstract class StreamingService {
}
public CommentsExtractor getCommentsExtractor(String url) throws ExtractionException {
return getCommentsExtractor(getCommentsLHFactory().fromUrl(url));
ListLinkHandlerFactory llhf = getCommentsLHFactory();
if(null == llhf) {
return null;
}
return getCommentsExtractor(llhf.fromUrl(url));
}