I want to download some files with QWebEngineProfile but the downloadRequested Signal is not getting called on a certain website. I tried to use linkedClicked but I didn´t find this signal. Here is a cutout of my code:
class MainWindow(QtWidgets.QMainWindow, Webview.Ui_MainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent)
self.setupUi(self)
self.webView.page().profile().downloadRequested.connect(self.download_requested)
def download_requested(self, download):
tmp_file = tmpPath + "/File"
download.setPath(tmp_file)
download.accept()
download.finished.connect(self.download_finished)
print(download.path())
@staticmethod
def download_finished():
print("finished")
When I now run the code, it neither prints "finished" nor the Path to save the file.