title: Scrape instance of Youtube verified badge using Beautiful Soup?
body: <p>I've been trying to check from a youtube video link that the channel/uploader is verified (blue badge). Seems like Youtube API doesn't have functionality for this, so I've been trying to scrape using <code>BeautifulSoup</code>. Here is what I tried:</p>
  <pre><code>from bs4 import BeautifulSoup
  import requests
  
  url = &quot;https://www.youtube.com/watch?v=&quot; + video_id
  source = requests.get(url).text
  bs = BeautifulSoup(source, 'lxml')
      
  # does not work
  bs.find_all(&quot;div&quot;, {&quot;class&quot;: &quot;badge badge-style-type-verified style-scope ytd-badge-supported-renderer&quot;})
  </code></pre>
  <p>I tried tracing the hierarchy of the HTML elements leading to the <code>ytd-badge</code> class and I found this by inspecting:</p>
  <p>html -&gt; body -&gt; ytd-app -&gt; #content -&gt; #page-manager -&gt; ytd-watch-flexy -&gt; #columns -&gt; #primary -&gt; div#primary-inner.style-scope.ytd-watch-flexy -&gt; #meta -&gt; #meta-content -&gt; ytd-video-secondary-info-renderer.style-scope.ytd-watch-flexy -&gt; #container -&gt; div.#top-row.style-scope.ytd-video-secondary-info-renderer -&gt; ytd-video-owner-renderer -&gt; div.#upload-info.style-scope.ytd-video-owner-renderer -&gt; #channel-name -&gt;  ytd-badge-supported-renderer.style-scope.ytd-channel-name</p>
  <p>It's pretty long and crazy so I was wondering how I could access it? Is there an easier way to accomplish this using Python? Thanks!</p>