Scraping jazz transcriptions with Playwright

With BeautifulSoup, the content is not retrieved because the Javascript page is not being executed to load the transcriptions

import pandas as pd
from bs4 import BeautifulSoup
import requests

url = "https://www.blueblackjazz.com/en/jazz-piano-transcriptions/"
response = requests.get(url)
soup = BeautifulSoup(response.text, "html.parser")
print(soup.find('table').prettify())
<table class="table table-striped table-condensed">
 <tr class="small">
  <th>
  </th>
  <th>
   <a href="#searchFieldId" ng-click="sortBy='name';">
    Sort by transcription name
   </a>
  </th>
  <th>
   <a href="#searchFieldId" ng-click="sortBy='artist';">
    By artist
   </a>
  </th>
  <th>
   <a href="#searchFieldId" ng-click="sortBy='date';">
    By date
   </a>
  </th>
  <th>
   <a href="#searchFieldId" ng-click="sortBy='note';">
    By note
   </a>
  </th>
  <th>
  </th>
 </tr>
 <tr ng-hide="pageall" ng-repeat="book in filteredBooks = (books |searchByText:searchText)">
  <td>
   <small>
    Book
   </small>
  </td>
  <td>
   <a ng-bind-html="book.title | highlight:searchText | unsafe" ng-href="&lt;% book.url %&gt;">
   </a>
  </td>
  <td ng-bind-html="book.artist | highlight:searchText | unsafe" style="max-width:160px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap;">
  </td>
  <td>
  </td>
  <td>
  </td>
 </tr>
 <!-- tr ng-repeat="transcription in filteredTranscriptions = (transcriptions|searchByText:searchText|limitTo:limit|orderBy:sortBy)"-->
 <tr ng-repeat="transcription in filteredTranscriptions = (transcriptions|searchByText:searchText|limitTo:limit|orderBy:[sortBy, 'name'])">
  <td>
  </td>
  <td>
   <a ng-bind-html="transcription.name | highlight:searchText | unsafe" ng-href="&lt;% transcription.url %&gt;">
   </a>
  </td>
  <td ng-bind-html="transcription.artist | highlight:searchText | unsafe" style="max-width:160px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap;">
  </td>
  <td style="max-width:120px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap;">
   &lt;% transcription.date %&gt;
  </td>
  <td style="max-width:120px; text-overflow:ellipsis; overflow:hidden; white-space:nowrap;">
   &lt;% transcription.note %&gt;
  </td>
 </tr>
</table>

Full code to obtain a pandas DataFrame

import pandas as pd
from playwright.async_api import async_playwright

async def scrape_jazz_data():
    async with async_playwright() as p:
        # Launch the browser and create a new context
        browser = await p.chromium.launch()
        context = await browser.new_context()
        # Create a new page within the context
        page = await context.new_page()
        # Navigate to the webpage containing the list of transcriptions
        await page.goto("https://www.blueblackjazz.com/en/jazz-piano-transcriptions/")
        # Wait for the content to load
        await page.wait_for_load_state("networkidle")
        await page.wait_for_selector('.table.table-striped.table-condensed')
        # Find all rows in the table
        rows = await page.query_selector_all('.table.table-striped.table-condensed tbody tr')
        transcriptions = []
        for row in rows:
            # Extract data from each row
            cells = await row.query_selector_all('td')
            if len(cells) > 3:
                title = await cells[1].inner_text()
                artist = await cells[2].inner_text()
                date = await cells[3].inner_text()
                note = await cells[4].inner_text()
                transcriptions.append({
                    'title': title,
                    'artist': artist,
                    'date': date,
                    'note': note
                })
        await browser.close()

    return pd.DataFrame(transcriptions)

jazz_transcriptions_df = await scrape_jazz_data()
jazz_transcriptions_df
title artist date note
0 20 Solos For Piano Volume 1 Fats Waller
1 20 Solos For Piano Volume 2 Fats Waller
2 20 Solos For Piano Volume 3 Fats Waller
3 17 Solos For Piano Volume 1 James P. Johnson
4 17 Solos For Piano Volume 2 James P. Johnson
... ... ... ... ...
425 You're Gonna Be Sorry Fats Waller 1941 C Maj
426 You're My Favorite Memory Teddy Wilson 1946 Eb Maj
427 You're the top Fats Waller 1935 Eb Maj
428 Zig Zag Willie "the Lion" Smith 1949 E min
429 Zonky Fats Waller 1935 F min

430 rows × 4 columns