Questions tagged [playwright-python]

Microsoft Playwright is a web automation library comparable to Selenium. This tag refers to the Python port of the library.

Microsoft Playwright is a web automation library comparable to Selenium. Originally a Javascript project, this is now also available in Python.

Related tags:

365 questions
0
votes
3 answers

How to asynchronizely save image with Playwright in Python?

I'm implementing a python web scraper using Playwright and I'm interested in saving images given their urls (i.e. each url contains and only contains the corresponding image). However, I have trouble finding the correct asynchronized Python method…
0
votes
1 answer

page.close() not working as expected in Playwright and asyncio

I have written a web scraper which needs to scrape few hundred pages asynchronously in Playwright-Python after login. I've came across aiometer from @Florimond Manca (https://github.com/florimondmanca/aiometer) to limit requests in the main async…
0
votes
1 answer

Can't scrape multiple pages using scrapy-playwright api

CONTEXT: I'm just a newbie in web scraping. I was trying to scrape a local e-commerce site. It's a dynamic website so I am using scrapy-playwright(chromium) with proxies. PROBLEM: It was running smoothly until I tried to scrape multiple pages. I am…
Sadik
  • 1
0
votes
0 answers

Extract complete URL from a link

I am scrapping amanzon.co.in using scrapy-playwright. I am able to extract description, rating and price of desired item. However for going to next page I want to extract href for Next Page button at the bottom of the page. Thru scrapy-playwright…
Aman Khanna
  • 367
  • 3
  • 7
  • 16
0
votes
0 answers

Scrapy with Playwright using a Proxy does not work in Docker container

So basically, I'm using Scrapy with Playwright so that I can access some Javascript sites (in a Docker container). It works perfectly on my local machine, but when I push it up to run in AWS, some sites are blocked because the IP address is not a…
0
votes
1 answer

Why can't I interact (fill, click, etc) with this element using Playwright in my Python code?

I'm using Playwright to access and interact with a website and it was going perfect till I found myself in the page where I can't interact any button ou search bar to apply a filter. I can use .locator('xpath') to find the elemente, but when I tried…
0
votes
1 answer

Playwright error: 'Page.inner_html' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback

I have written a Playwright async function which extracts laboratory results from our lab information system. However, I struggle to get rid of the following error despite "await"-ing every request I can see. The code still runs successfully, but…
0
votes
0 answers

NotImplementedError when try to start Playwright browser via NiceGui

Error NotImplementedError raises when I try to start Playwright browser "context" by clicking NiceGui button. I also use Thread for multibrowsing in future. nicegui_program.py from nicegui import ui from threading import Thread from…
0
votes
1 answer

How to conditionally disable proxies for some requests playwright python

try: with sync_playwright() as p: driver = p.firefox.launch(hedless=headless, proxy={ "server": 'fa****y.com:10000', 'username': 'iu***53cpeuytpna0cc7bd7', …
Sabir
  • 1
  • 1
0
votes
1 answer

Playwright Python - find fillable form by partial placeholder

As described in the title, I'm trying to find a fillable field on a webpage whose placeholder contains the word 'name'. Examples of ones I'd like it to select are ones with placeholder text 'First Name' and 'SEARCH BY NAME' and even 'SuRiNaMe'…
0
votes
0 answers

How to install python plawright dependencies in custom location on linux

I am trying to run a script using Firefox playwright on a Linux server, and I am unable to install the dependencies for it to the usual /lib64 path. Is there a way I can install them locally, like I was able to do with the main playwright package…
0
votes
1 answer

Assigning the contents of XPath result from Playwright into a list

Using Playwright, the code below successfully prints the title of stackoverflow.co. This works because the Xpath query (//title) produces only ONE result (there is only one title). page.goto("https://stackoverflow.co") page_text =…
Melter
  • 5
  • 1
  • 2
0
votes
0 answers

Python Playwright with pytest - Test against different environments and different variables

Im looking to use Playwright on python/pytest to test against a web page. The system im working on has 3 different environments that we need to deploy against, for example https://env1.com, https://env2.com, https://env3.com The first question is…
0
votes
1 answer

Trouble waiting for changes to complete that are triggered by Python Playwright `select_option`

I'm trying to scrape a site that reports internet service availability by address. Addresses can be selected from a list created for a specific postcode. After an address is selected, a table is updated with the availability of various services. My…
user676952
  • 33
  • 2
0
votes
1 answer

How to get class name in python playwright?

How to get a Class name using playwright and pyton? I tried that but without success. It could also be the color that is contained in the css page.locator('xpath=//*[@id="__next"]/div[1]/div/div[2]/div[1]/div[1]/div/div[1]').Class()