Skip to content

Commit

Permalink
add booking.com
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Fernandes committed Feb 1, 2024
1 parent 31f0d58 commit bd413a4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion e2e/scrappers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('RowsX - scrappers tests', () => {
await appPage.bringToFront();
await appPage.goto(spec.url, { waitUntil: 'domcontentloaded' });
await extensionPage.goto(extensionUrl, { waitUntil: 'domcontentloaded' });
await appPage.waitForTimeout(200);
await appPage.waitForTimeout(500);
await extensionPage.bringToFront();
const button = await extensionPage.waitForSelector('.copy-btn');
await button.click();
Expand Down
27 changes: 16 additions & 11 deletions src/scrappers/booking.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
url: https://www.booking.com/searchresults*
listElementsQuery: .TableRecords > tbody > tr
header: Booking.com search results
listElementsQuery: '[data-testid="property-card"]'
elementParser:
- title: Date Movement
query: 'td:nth-child(1) > span'
- title: Title
query: '[data-testid="title"]'
type: text

- title: Date Movement
query: 'td:nth-child(2) > div > span'
- title: Review score
query: '[data-testid="review-score"] div:nth-child(1)'
type: text

- title: Description
query: 'td:nth-child(3) > div > div:nth-child(2) > div > div:nth-child(2) > a'
- title: Distance
query: '[data-testid="distance"]'
type: text

- title: Value
query: 'td:nth-child(4) > div > span'
- title: Price w/ discounts
query: '[data-testid="price-and-discounted-price"]'
type: text

- title: Balance
query: 'td:nth-child(5) > div > span'
- title: Offers
query: '[data-testid="gallery-ribbon"]'
type: text

- title: Booking URL
query: a
type: clean-url

0 comments on commit bd413a4

Please sign in to comment.