title: PyQt4 to PyQt5 -> mainFrame() deprecated, need fix to load web pages
body: <p>I'm doing Sentdex's PyQt4 YouTube tutorial <a href="https://www.youtube.com/watch?v=FSH77vnOGqU" rel="noreferrer">right here</a>. I'm trying to follow along but use PyQt5 instead. It's a simple web scraping app. I followed along with Sentdex's tutorial and I got here:</p>
  
  <p><a href="https://i.stack.imgur.com/JdlLb.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JdlLb.png" alt="enter image description here"></a></p>
  
  <p>Now I'm trying to write the same application with PyQt5 and this is what I have:</p>
  
  <pre><code>import os
  import sys
  from PyQt5.QtWidgets import QApplication
  from PyQt5.QtCore import QUrl, QEventLoop
  from PyQt5.QtWebEngineWidgets import QWebEnginePage
  from bs4 import BeautifulSoup
  import requests
  
  
  class Client(QWebEnginePage):
      def __init__(self, url):
          self.app = QApplication(sys.argv)
          QWebEnginePage.__init__(self)
          self.loadFinished.connect(self._loadFinished)
          self.load(QUrl(url))
          self.app.exec_()
  
      def _loadFinished(self):
          self.app.quit()
  
  
  url = 'https://pythonprogramming.net/parsememcparseface/'
  client_response = Client(url)
  
  #I think the issue is here at LINE 26
  source = client_response.mainFrame().toHtml()
  
  soup = BeautifulSoup(source, "html.parser")
  js_test = soup.find('p', class_='jstest')
  print(js_test.text)
  </code></pre>
  
  <p>When I run this, I get the message: </p>
  
  <blockquote>
  <pre><code>source = client_response.mainFrame().toHtml()
  AttributeError: 'Client' object has no attribute 'mainFrame'
  </code></pre>
  </blockquote>
  
  <p>I've tried a few different solutions but none work. Any help would be appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Logging QUrl(url) on line 15 returns this value:</p>
  
  <blockquote>
    <p><code>PyQt5.QtCore.QUrl('https://pythonprogramming.net/parsememcparseface/')</code></p>
  </blockquote>
  
  <p>When I try <code>source = client_response.load(QUrl(url))</code> for line 26, I end up with the message:</p>
  
  <blockquote>
    <p><code>File "test3.py", line 28, in &lt;module&gt;
            soup = BeautifulSoup(source, "html.parser")
          File "/Users/MYNAME/.venv/qtproject/lib/python3.6/site-packages/bs4/__init__.py", line 192, in __init__
            elif len(markup) &lt;= 256 and (
        TypeError: object of type 'NoneType' has no len()
    </code></p>
  </blockquote>
  
  <p>When I try <code>source = client_response.url()</code> I get:</p>
  
  <blockquote>
  <pre><code>soup = BeautifulSoup(source, "html.parser")
        File "/Users/MYNAME/.venv/qtproject/lib/python3.6/site-packages/bs4/__init__.py", line 192, in __init__
          elif len(markup) &lt;= 256 and (
      TypeError: object of type 'QUrl' has no len()
  </code></pre>
  </blockquote>