title: Trying to make this webcrawler print a specific song depending on the users input
body: <p>Trying to make this web crawler ask the user for a position of a song from the top charts and then print that song, position etc. I've been able to do all of this but the position is always one more. For example, if you asked for the 2nd top song of the week, it would give you the third.</p>
  <pre class="lang-py prettyprint-override"><code>import requests
  from bs4 import BeautifulSoup
  
  lol = input(&quot;Number: &quot;)
  
  if lol == &quot;1&quot;:
  
      url = 'https://www.officialcharts.com/charts/singles-chart/'
      req = requests.get(url)
      soup = BeautifulSoup(req.content, 'html.parser')
  
      print(&quot;&quot;)
      print(&quot;TYPE THE POSITION&quot;)
      user_pos = int(input(&quot;Please pick a number between 1 - 100: &quot;))
      if 1 &lt;= user_pos &lt;= 100:
          hit = soup.find_all(&quot;div&quot;, class_=&quot;title-artist&quot;)[user_pos - 1]
          title, artist = [hr.text for hr in hit.findAll(&quot;a&quot;)]
          print(&quot;POSITION | TITLE | ARTISTS&quot;)
          print(user_pos, &quot;|&quot;, title, &quot;|&quot;, artist)
      else:
          print(&quot;Next time pick a number between 1 and 100&quot;)
  </code></pre>