title: Unable to select HTML element using BeautifulSoup CSS-selector but was able to get the element in JS using CSS-selectors
body: <p>I am using Python and the BeautfulSoup HTML parser to select HTML elements. However, I'm unable to get this working. </p>
  
  <pre><code>response = requests_session.post(login_url, headers=headers, data=data_credentials) # log in to the requests Session so that you can reuse it
  
  search_url= 'https://www.website.com/search.php'
  p_id='342953'
  
  response = requests_session.get(search_url,headers=headers, params={'query':p_id,'type':'p'})
  redirected_urls=response.url
  th_soup = BeautifulSoup(response.content, 'html.parser')
  trx_ht =th_soup.select("body &gt; table &gt; tbody &gt; tr &gt; td &gt; table &gt; tbody &gt; tr:nth-child(2) &gt; td:nth-child(2) &gt; div:nth-child(3) &gt; table &gt; tbody &gt; tr:nth-child(11) &gt; td &gt; table &gt; tbody &gt; tr:nth-child(4) &gt; td:nth-child(5) &gt; input[type='hidden']:nth-child(1)")
  </code></pre>