mirror of
https://github.com/iv-org/invidious
synced 2024-11-14 07:03:33 +01:00
Use sidebar for pulling subscriptions
This commit is contained in:
parent
6d3e88aeb5
commit
d1841b9be5
@ -621,12 +621,14 @@ def fetch_user(sid, client, headers)
|
|||||||
feed = XML.parse_html(feed.body)
|
feed = XML.parse_html(feed.body)
|
||||||
|
|
||||||
channels = [] of String
|
channels = [] of String
|
||||||
feed.xpath_nodes(%q(//a[@class="subscription-title yt-uix-sessionlink"]/@href)).each do |channel|
|
feed.xpath_nodes(%q(//ul[@id="guide-channels"]/li/a)).each do |channel|
|
||||||
channel_id = channel.content.lstrip("/channel/").not_nil!
|
if !["Popular on YouTube", "Music", "Sports", "Gaming"].includes? channel["title"]
|
||||||
|
channel_id = channel["href"].lstrip("/channel/").not_nil!
|
||||||
get_channel(channel_id, client, PG_DB)
|
get_channel(channel_id, client, PG_DB)
|
||||||
|
|
||||||
channels << channel_id
|
channels << channel_id
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
email = feed.xpath_node(%q(//a[@class="yt-masthead-picker-header yt-masthead-picker-active-account"]))
|
email = feed.xpath_node(%q(//a[@class="yt-masthead-picker-header yt-masthead-picker-active-account"]))
|
||||||
if email
|
if email
|
||||||
|
Loading…
Reference in New Issue
Block a user