title: Scrape a class within a class
body: <p>I want to scrape <code>class_="href"</code> with in the <code>class_="_e4d"</code>.  Basically looking to scrape a class within a class using BeautifulSoup.  </p>
  
  <pre><code>from bs4 import BeautifulSoup
  import selenium.webdriver as webdriver
  
  url = ("https://www.google.com/search?...")
  
  def get_related_search(url):
      driver = webdriver.Chrome("C:\\Users\\John\\bin\\chromedriver.exe")
      driver.get(url)
      soup = BeautifulSoup(driver.page_source)
      relate_result = soup.find_all("p", class_="_e4b")
      return relate_result[0]
  
  relate_url = get_related_search(url)
  print(relate_url)
  </code></pre>
  
  <p>Results:  markup_type=markup_type))
  p class="_e4b"}{a href="/search?...a}{/p}</p>
  
  <p>I now want to scrape the href result. I am not sure what the next step would be.  Thanks for the help.  </p>
  
  <p>Note:  I replaced &lt;> with {} since it was not showing up as html script</p>