title: If statement executing regardless
body: <p>I'm using the requests library in python to grab a webpage's text data, however this should only occur if a particular sentence is found, yet... it still does.</p>
  <pre><code>pageresult = requests.get(combo[0], headers=header).text
          
  if &quot;We're sorry, but the page you were looking for couldn't be found&quot; or &quot;Page not found&quot; in pageresult:
      print('on page\n')
      print(combo[0])
      text_file = open(&quot;PAGERESULT.txt&quot;, &quot;w&quot;)
      text_file.write(pageresult)
      text_file.close()
  </code></pre>
  <p>For some reason this <code>if</code> statement still executes, even though the conditions are not met.</p>
  <p>Neither &quot;We're sorry, but the page you were looking for couldn't be found&quot; or &quot;Page not found&quot; are in the website text data, yet the statement still executes?</p>