Skip to content

Commit

Permalink
Fix YouTube username lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefansundin committed Sep 20, 2023
1 parent dd83e91 commit f5e175a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
next "Error: Could not find the user. Please try with a video url instead." if response.code == 404
raise(App::GoogleError, response) if !response.success?
doc = Nokogiri::HTML(response.body)
doc.at("meta[itemprop='channelId']")&.[]("content") || "Error: Could not find the user. Please try with a video url instead."
doc.at("meta[itemprop='identifier']")&.[]("content") || "Error: Could not find the user. Please try with a video url instead."
end
elsif video_id
channel_id, _ = App::Cache.cache("youtube.video", video_id, 60*60, 60) do
Expand Down

0 comments on commit f5e175a

Please sign in to comment.