From ac95600650f5110b076508033134d1144e695bf5 Mon Sep 17 00:00:00 2001 From: Karim shoair Date: Mon, 16 Dec 2024 13:27:14 +0200 Subject: [PATCH] docs: add an example that uses `page.urljoin` --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index dde62c8..92c76b2 100644 --- a/README.md +++ b/README.md @@ -406,6 +406,9 @@ You can select elements by their text content in multiple ways, here's a full ex >>> page.find_by_text('Tipping the Velvet') # Find the first element whose text fully matches this text +>>> page.urljoin(page.find_by_text('Tipping the Velvet').attrib['href']) # We use `page.urljoin` to return the full URL from the relative `href` +'https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html' + >>> page.find_by_text('Tipping the Velvet', first_match=False) # Get all matches if there are more []