Create three HTML fixture files in __tests__/scraper/fixtures/ to support deterministic testing of the scraper's HTML parsing logic: - sample-listing.html: Contains 10 real unit articles extracted from the live listings page, covering studios, 1BR, and 2BR floor plans with varied pricing and availability dates. - sample-listing-empty.html: Minimal page structure with an empty units section, for testing graceful handling of pages with no listings. - sample-listing-call.html: Contains units with "Call for pricing" instead of numeric rent values, for testing the parser's handling of non-numeric price fields.
65 lines
2.3 KiB
HTML
65 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head><title>Country Club Towers - Call for Pricing</title></head>
|
|
<body>
|
|
<section class="spaces__tab-unit">
|
|
<article
|
|
class="spaces-unit floor_2760 spaces-community-country-club-towers 1bed 1bath spaces-market-country-club-towers-gardens penthouse"
|
|
data-spaces-id="9001"
|
|
data-spaces-soonest="Now"
|
|
data-spaces-sort-date="1706745600"
|
|
data-spaces-sort-price="Call for pricing"
|
|
data-spaces-sort-area="750"
|
|
data-spaces-sort-bed="1"
|
|
data-spaces-unit="P-101"
|
|
data-spaces-unit-id="9001"
|
|
data-spaces-unit-floor="1"
|
|
data-spaces-obj="unit"
|
|
data-spaces-unavailable="false"
|
|
data-spaces-available="true"
|
|
data-spaces-community="Country Club Towers"
|
|
data-spaces-asset="420"
|
|
data-spaces-specials-content=""
|
|
data-spaces-plan-id="500"
|
|
data-spaces-sort-plan-name="Penthouse A"
|
|
data-spaces-sort-bath="1"
|
|
data-spaces-href="?spaces_tab=unit-detail&detail=9001"
|
|
data-spaces-inventory-href="?spaces_tab=unit-detail&detail=9001"
|
|
aria-label="Unit P-101">
|
|
<div class="spaces-unit__inner">
|
|
<span class="spaces-unit__price">Call for pricing</span>
|
|
<span class="spaces-unit__unit">P-101</span>
|
|
</div>
|
|
</article>
|
|
<article
|
|
class="spaces-unit floor_2760 spaces-community-country-club-towers 2bed 2bath spaces-market-country-club-towers-gardens penthouse"
|
|
data-spaces-id="9002"
|
|
data-spaces-soonest="Now"
|
|
data-spaces-sort-date="1706745600"
|
|
data-spaces-sort-price="Call for pricing"
|
|
data-spaces-sort-area="900"
|
|
data-spaces-sort-bed="2"
|
|
data-spaces-unit="P-102"
|
|
data-spaces-unit-id="9002"
|
|
data-spaces-unit-floor="2"
|
|
data-spaces-obj="unit"
|
|
data-spaces-unavailable="false"
|
|
data-spaces-available="true"
|
|
data-spaces-community="Country Club Towers"
|
|
data-spaces-asset="420"
|
|
data-spaces-specials-content=""
|
|
data-spaces-plan-id="501"
|
|
data-spaces-sort-plan-name="Penthouse B"
|
|
data-spaces-sort-bath="2"
|
|
data-spaces-href="?spaces_tab=unit-detail&detail=9002"
|
|
data-spaces-inventory-href="?spaces_tab=unit-detail&detail=9002"
|
|
aria-label="Unit P-102">
|
|
<div class="spaces-unit__inner">
|
|
<span class="spaces-unit__price">Call for pricing</span>
|
|
<span class="spaces-unit__unit">P-102</span>
|
|
</div>
|
|
</article>
|
|
</section>
|
|
</body>
|
|
</html>
|