Hi, I would like to know how I can scrap a web page that has Javascript using PyQt5, the page from which I want to extract information is this: link
From this page I want to take the name of the series and the chapters. This is what I have so far:
import sys
from bs4 import BeautifulSoup
from PyQt5.QtWebKitWidgets import QWebPage
from PyQt5.QtWidgets import QApplication
from urllib.request import urlopen
class Render(QWebPage):
def __init__(self, html):
self.html = None
self.app = QApplication(sys.argv)
QWebPage.__init__(self)
self.loadFinished.connect(self._loadFinished)
self.mainFrame().setHtml(html)
self.app.exec_()
def _loadFinished(self, result):
self.html = self.mainFrame().toHtml()
self.app.quit()
url = 'https://www.tumangaonline.com/biblioteca/mangas/22954/Sonomono-Nochi-Ni'
source_html = urlopen(url)
rendered_html = Render(source_html.read()).html
soup = BeautifulSoup(rendered_html, 'lxml')
p = soup.find_all('a')
print('title is %r' % soup.select_one('title').text)
print(p)