Skip to content
Advertisement

I have a small problem with PyQt5 WebEngineView and html of url: “https://www.remove.bg”

I have Enabled downloads in pyqtwebengineview and it works well. However,I have some problems with the site:”https://www.remove.bg”

So I downloaded The html content of that site and the problem is an anchor tag.

JavaScript

If I simply remove this target atrribute,It works well.
This works

JavaScript

difference is just target atrribute.What to do. How to make this site work correctly.

Advertisement

Answer

The redirection link has an attribute of “_blank” that according to the protocol must open a new tab so in a previous answer I explained what the implementation should be, I will omit that part and will only show the code where I remove the new tab when the download is finished.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement