browser

How to fix: TypeError: filter expected 2 arguments, got 1

How to fix: TypeError: filter expected 2 arguments, got 1 Question: I am making a browser using python and PyQt5/PySide6. I implemented an adblock which uses a list to block ads from opening as tabs. ` class WebPage(QWebEnginePage): adblocker = filter(open(os.path.join("build files", "adlist.txt"), encoding="utf8")) def __init__(self, parent=None): super().__init__(parent) def acceptNavigationRequest(self, url, _type, isMainFrame): urlString = …

Total answers: 1

How can I store a link in a variable and open it using os.system()

How can I store a link in a variable and open it using os.system() Question: I want to make an app in Python to open links the user assigned to buttons. For that I have to assign links to variables and open them. I tried opening them with the webbrowser module, but they would open …

Total answers: 1

Close or Switch Tabs in Playwright/Python

Close or Switch Tabs in Playwright/Python Question: I’m doing an automation, at the time of download it opens a tab, sometimes it doesn’t close automatically, so how can I close a tab in playwright using python? Asked By: user19016544 || Source Answers: I managed to make a code that closes only a specific tab! all_pages …

Total answers: 2

Can Playwright be used to launch a browser instance

Can Playwright be used to launch a browser instance Question: I’m finding that in some cases web pages are being rendered in one browser materially different than another browser. Specifically, Playwright running webkit is rendering a different structure than what I see when viewing the page in a standalone Chrome browser. No clue why and …

Total answers: 3

Using Selenium without using any browser

Using Selenium without using any browser Question: I have been trying to do web automation using Selenium. Is there any way to use a browser like Chrome or Firefox without actually installing them, like using some alternate options, or having portable versions of them. If I can use portable versions how do I tell Selenium …

Total answers: 2

Browser automation handling Basic Authorization login prompt

Browser automation handling Basic Authorization login prompt Question: I’m trying to automate data entry using selnium in chorme but after each click on the website I’m getting a login prompt which I want to ignore for proceeding to next step. it’s the login page which I have to go through. I have to use website …

Total answers: 1

how to open jupyter notebook on desirable browser

how to open jupyter notebook on desirable browser Question: When I start jupyter notebook, it loads on internet explorer, but I want to open jupyter notebook on my desirable browser, please provide a general solution for all browsers. I am using windows 7. Asked By: user13451261 || Source Answers: go to C:UsersusernameAppDataRoamingjupyterruntime and then rightclick …

Total answers: 2

Cookies not saved in the browser

Cookies not saved in the browser Question: I am trying to set a cookie in my browser using a Python Flask backend however, when we call the set cookie function I am unable to observe the cookie being saved by the browser. The following is my current understanding about how this is supposed to work: …

Total answers: 1

How to set program.exe as a default browser in Windows 10?

How to set program.exe as a default browser in Windows 10? Question: I need to set my program.exe as a default browser in Windows 10. I can’t find the way how to do that. Even with regedit. Please give some advice how to do that? Thanks! Asked By: Quanti Monati || Source Answers: I assume …

Total answers: 2

Python + Browser with Mac: Error – 'chromedriver' executable needs to be in PATH

Python + Browser with Mac: Error – 'chromedriver' executable needs to be in PATH Question: I did the following but came across the error: selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home from splinter import Browser browser = Browser(‘chrome’) How can I go about resolving the issue using Mac? Thank you …

Total answers: 3