kakakakakku blog

Weekly Tech Blog: Keep on Learning!

2023-01-11から1日間の記事一覧

Playwright for Python: a タグの href 属性を取得する

Playwright for Python でリンクタグ a タグの href 属性から URL を取得するときは,Locator オブジェクトで get_attribute('href') のように実装する. page.locator('h1#title > a').get_attribute('href') page.locator('h1.entry-title > a').nth(0).ge…