#๐Ÿ”’ playwright timeout (again)

7 messages ยท Page 1 of 1 (latest)

thick plover
#

'''import requests
from bs4 import BeautifulSoup as bs
from playwright.sync_api import sync_playwright, Playwright

def run(playwright):
chromium = playwright.chromium
browser = chromium.launch(headless=True)
page = browser.new_page()
page.goto("https://www.newegg.com/asus-prime-rtx5080-o16g-nvidia-geforce-rtx-5080-16gb-gddr7/p/N82E16814126744")
product_raw = page.locator("css=.product-title")
product_title = product_raw.inner_text()
html = page.content()
browser.close()
with sync_playwright() as playwright:
run(playwright)

print("bombo")

#newegglink = "https://www.newegg.com/asus-prime-rtx5080-o16g-nvidia-geforce-rtx-5080-16gb-gddr7/p/N82E16814126744"

#newegghtml = requests.get(newegglink)
#neweggstring = newegghtml.text

#soup = bs(neweggstring, "html.parser")

#product_name = soup.find("h1", class_="product-title")

#print(soup)'''

i had this issue a few days ago, someone suggest i use locator instead of wait for element to load, but i still get timeout error....

white orchidBOT
#

Hey @thick plover!

Please edit your message to use a code block

You are using the wrong character instead of backticks. Use ```, not '''.

Also, add a py after the three backticks.

```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
white orchidBOT
#

@thick plover

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

nocturne star
# thick plover '''import requests from bs4 import BeautifulSoup as bs from playwright.sync_api ...

!rule tos unfortunately this is against newegg's TOS, so we can't help you here. Please close this post and don't ask about this script here in the future.

Whether on behalf of yourself or on behalf of any third-party, you agree not to:

  • Access or attempt to access the Site, or any portion thereof, through any automated means, including but not limited to the use of scripts or web crawlers;
  • โ€œScrapeโ€, duplicate, reproduce, copy, republish, license, sell, trade or resell the Site for any purpose;
white orchidBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

white orchidBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.