title: Filter h1 HTML With BeautifulSoup
body: <p>I'm Writing a <strong>CODE Algorithm BELOW</strong>: </p>
  
  <pre><code>from selenium import webdriver
  from bs4 import BeautifulSoup
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  import requests
  import time
  browser =webdriver.Firefox(executable_path=r'C:/path/geckodriver.exe')
  browser.get('https://brainly.com.br/app/ask?entry=hero&amp;q=15+12')
  WebDriverWait(browser,10).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR,'a[href*="/tarefa"]')))
  html=browser.page_source
  #html = browser.execute_script("return document.documentElement.outerHTML")
  p=[]
  soup=BeautifulSoup(html,'html.parser')
  for link in soup.select('div.sg-actions-list__hole &gt; a[href*="/tarefa"]'):
      ref=link.get('href')
      rt = ('https://brainly.com.br'+str(ref))
      p.append(rt)
  
  g=[]
  for url in p:
      r = requests.get(url).text
      time.sleep(10)
  
  
  rs= BeautifulSoup(r,'html.parser')
  
  
  df = rs.select('div &gt; h1')
  print(df) 
  </code></pre>
  
  <p><code>HTML</code> I need to filter: </p>
  
  <pre><code>&lt;div class="brn-content-image"&gt;
  &lt;h1 class="sg-text sg-text--large sg-text--regular"&gt;
  Tinha 12 cruzeiros e gastei 15 cruzeiros esta situação pode ser representada por a 15 - 12 B 12 + 15 C 12 - 11 e D - 12 + 15
  &lt;/h1&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p><strong>AND</strong></p>
  
  <pre><code>&lt;div class="brn-content-image"&gt;
  &lt;h1 class="sg-text sg-text--large sg-text--regular"&gt;
  [(-15)12]12:(-15)142?
  &lt;/h1&gt;
  &lt;/div&gt; 
  </code></pre>
  
  <p>At Variable <code>r</code> I am storing the source code for 8 URLS, ie 8 Source Code which I am not sure is the problem that I cannot filter it with. </p>
  
  <p>Using Code to Filter HTML: </p>
  
  <pre><code>rs= BeautifulSoup(r,'html.parser')
  df = rs.select('div &gt; h1')
  print(df)
  </code></pre>
  
  <p><strong>What mistake am I making?.</strong></p>