Why doesn't QtWebkit render this webpage properly?
-
I am using
python3-pyqt5.qtwebkit
on Ubuntu18.04, 64 bit
to render webpages using Python3 and Qt5. However, this URL doesn't get rendered properly (see below). Below is the code I am using. What could the reason be?import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtWebKit import * from PyQt5.QtWebKitWidgets import * from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow app = QApplication(sys.argv) web = QWebView() web.load(QUrl("https://www.semanticscholar.org/search?q=Amplification%20Hell%3A%20Revisiting%20Network%20Protocols%20for%20DDoS%20Abuse.&sort=relevance")) web.show() sys.exit(app.exec_())
-
I am using
python3-pyqt5.qtwebkit
on Ubuntu18.04, 64 bit
to render webpages using Python3 and Qt5. However, this URL doesn't get rendered properly (see below). Below is the code I am using. What could the reason be?import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtWebKit import * from PyQt5.QtWebKitWidgets import * from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow app = QApplication(sys.argv) web = QWebView() web.load(QUrl("https://www.semanticscholar.org/search?q=Amplification%20Hell%3A%20Revisiting%20Network%20Protocols%20for%20DDoS%20Abuse.&sort=relevance")) web.show() sys.exit(app.exec_())
Because something is broken or missing in JavaScript engine, and parsing of code in
AppEntry.584b85bf40.js
fails with syntax error. Sorry but it probably cannot be fixed without updating whole WebKit code to its modern state -
@Konstantin-Tokarev said in Why doesn't QtWebkit render this webpage properly?:
Because something is broken or missing in JavaScript engine, and parsing of code in
AppEntry.584b85bf40.js
fails with syntax error. Sorry but it probably cannot be fixed without updating whole WebKit code to its modern stateHow did you debug this? Is there any logging available?
Also, does QtWebkit use some non-recent version of Webkit engine? Isn't it just a wrapper around Webkit? Can the shipped version be updated easily (I guess not)?
-
@Konstantin-Tokarev said in Why doesn't QtWebkit render this webpage properly?:
Because something is broken or missing in JavaScript engine, and parsing of code in
AppEntry.584b85bf40.js
fails with syntax error. Sorry but it probably cannot be fixed without updating whole WebKit code to its modern stateHow did you debug this? Is there any logging available?
Also, does QtWebkit use some non-recent version of Webkit engine? Isn't it just a wrapper around Webkit? Can the shipped version be updated easily (I guess not)?
How did you debug this? Is there any logging available?
Yes, there is JS console in Web Inspector. Also it's possible to get console messages via API
Also, does QtWebkit use some non-recent version of Webkit engine?
5.212 (which is currently shipped in Ubuntu) is based on WebKit branch from 2016