title: How to use CSS selectors to retrieve specific links lying in some class using BeautifulSoup?
body: <p>I am new to Python and I am learning it for scraping purposes I am using BeautifulSoup to collect links (i.e href of 'a' tag). I am trying to collect the links under the "UPCOMING EVENTS" tab of site <a href="http://allevents.in/lahore/" rel="noreferrer">http://allevents.in/lahore/</a>. I am using Firebug to inspect the element and to get the CSS path but this code returns me nothing. I am looking for the fix and also some suggestions for how I can choose proper CSS selectors to retrieve desired links from any site. I wrote this piece of code:</p>
  
  <pre><code>from bs4 import BeautifulSoup
  
  import requests
  
  url = "http://allevents.in/lahore/"
  
  r  = requests.get(url)
  
  data = r.text
  
  soup = BeautifulSoup(data)
  for link in soup.select( 'html body div.non-overlay.gray-trans-back div.container div.row div.span8 div#eh-1748056798.events-horizontal div.eh-container.row ul.eh-slider li.h-item div.h-meta div.title a[href]'):
      print link.get('href')
  </code></pre>