Skip to content

Commit

Permalink
enhance youtube detection
Browse files Browse the repository at this point in the history
  • Loading branch information
martinrotter committed Nov 6, 2024
1 parent 667397c commit fb5ff84
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/librssguard-standard/src/parsers/atomparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ QList<StandardFeed*> AtomParser::discoverFeeds(ServiceRoot* root, const QUrl& ur
QString youtube_channel_id =
QRegularExpression(QSL("\"externalChannelId\": ?\"([^\"]+)\"")).match(direct_html_data).captured(1);

if (youtube_channel_id.isEmpty()) {
// Try to get channel ID differently.
youtube_channel_id =
QRegularExpression(QSL("{\"key\":\"browse_id\",\"value\":\"([^\"]+)\"}")).match(direct_html_data).captured(1);
}

if (!youtube_channel_id.isEmpty()) {
my_url = QSL("https://www.youtube.com/feeds/videos.xml?channel_id=%1").arg(youtube_channel_id);
res = NetworkFactory::performNetworkOperation(my_url,
Expand Down

0 comments on commit fb5ff84

Please sign in to comment.