Python: List youtube videos titles and url from an extracted HTML
<p>I'm making a simple script with Python 3.5, it asks a title (e.g. a song), it goes on youtube.com/results?search_query=my+title and extracts the html code.</p>

<p>That's what I did, but now i'm facing a problem: I want my script to list the videos propositions title and register the corresponding link, so e.g it gives me a list like this</p>

<blockquote>
  <p>Search: "eazy e"</p>
  
  <ol>
  <li>Eazy E - Real muthaf***** G's</li>
  <li>Eazy E - Boys In Da Hood etc..</li>
  </ol>
  
  <p>Insert the number of the video:</p>
</blockquote>

<p>The problem here is that I have a HUGE load of html code and I don't know how to list what I want to have...</p>

<p>I used urlib.request.urlopen('<a href="http://youtube.com/results?search_query=" rel="nofollow">http://youtube.com/results?search_query=</a>'+url_search_content) to extract the html code</p>

<p>Please help</p>

<p>You can use the built in htmlparser library in python to extract the tags that contain the titles of the videos that you want. This library will be give you multiple ways to parse through tags as well as provide you with a clearer readable output.</p>

<p><a href="https://docs.python.org/3/library/html.parser.html" rel="nofollow">https://docs.python.org/3/library/html.parser.html</a></p>

<p>Keep in mind though that youtube search results are often multiple pages of content, and your html results will only be for one of these pages.</p>

python html video youtube