title: I want to retrieve the text inside a html tag on a specific line
body: <p>I am using html.parser and urllib.request. I am not going to use any non-native modules, but I am open to using other native ones if they are necessary.
  Currently (a portion of) my code looks like this:</p>
  
  <pre><code>class MyHTMLParser(HTMLParser):
      def handle_data(self, data):
          if self.getpos()[0] == 167:
              print(self.data)
  </code></pre>
  
  <p>The issue I am having is that HTMLParser.getpos always returns a tuple of (1, x), where x is a number that increases each time, but seemingly randomly), like this:</p>
  
  <pre>
  (1, 21)
  (1, 41)
  (1, 51)
  (1, 77)
  (1, 134)
  (1, 206)
  (1, 406)
  (1, 509)
  (1, 553)
  (1, 627)
  (1, 680)
  (1, 784)
  (1, 1143)
  (1, 1368)
  </pre>
  
  <p>I feel like the whole html.parser module is written in a very stupid way and could have been thought out much better. Obviously it works, but it's counter-intuitive.
  <br> 
  Full code:</p>
  
  <pre><code>from urllib.request import *
  from html.parser import HTMLParser
  class MyHTMLParser(HTMLParser):
      def handle_data(self, data):
        print(self.getpos())
        if self.getpos()[0] == 167:
          print(data)
  parser = MyHTMLParser()
  html = urlopen("https://www.azlyrics.com/lyrics/aha/takeonme.html").read()
  parser.feed(str(html))
  </code></pre>