add feed function
This commit is contained in:
parent
6beb36f92f
commit
f3a73ecc4a
|
@ -147,7 +147,7 @@ public class ChannelActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
Log.d(TAG, info.feed_url);
|
Log.d(TAG, info.feed_url);
|
||||||
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(info.feed_url + ".rss"));
|
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(info.feed_url));
|
||||||
startActivity(i);
|
startActivity(i);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -122,7 +122,11 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFeedUrl() throws ParsingException {
|
public String getFeedUrl() throws ParsingException {
|
||||||
return siteUrl + "/feed";
|
try {
|
||||||
|
return doc.select("link[title=\"RSS\"]").first().attr("abs:href");
|
||||||
|
} catch(Exception e) {
|
||||||
|
throw new ParsingException("Could not get feed url", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getUserUrl() throws ParsingException {
|
private String getUserUrl() throws ParsingException {
|
||||||
|
|
Loading…
Reference in New Issue