[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-post-scrape-craigslist-python-en":3},{"post":4,"faq":34,"faqLdJson":54,"faqLdJsonScript":79,"alternatePaths":80,"recommendations":82,"contentLocale":20},{"authors":5,"custom_excerpt":13,"excerpt":13,"feature_image":14,"featured":15,"id":16,"meta_description":13,"meta_title":17,"og_description":8,"og_image":8,"og_title":8,"primary_author":18,"primary_tag":19,"published_at":22,"reading_time":23,"slug":24,"status":25,"tags":26,"title":17,"twitter_description":8,"twitter_image":8,"twitter_title":31,"updated_at":32,"visibility":21,"lexical":33},[6],{"bio":7,"facebook":8,"instagram":8,"linkedin":8,"location":9,"name":10,"profile_image":11,"slug":12,"tiktok":8,"twitter":8,"website":8,"youtube":8},"At Rola IP, Adrian Cole writes about proxy infrastructure, including residential and datacenter proxies, IP routing, session persistence, and rotation, helping users balance reliability, performance, and cost.",null,"Adrian Cole在Rola IP负责代理网络基础设施相关内容，主要关注住宅代理与机房代理差异、IP路由、会话保持、IP轮换和连接稳定性，帮助用户理解性能、可用性与成本之间的权衡。","Adrian Cole","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F07\u002FPixPin_2026-07-21_14-45-20.png","adrian","Learn how to scrape Craigslist with Python and Playwright. Follow step-by-step examples to extract listings, prices, and locations, then export data to CSV.","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002FScrape-Craigslist-Python-article-cover-image.webp",false,"6acc82974956c90001bf1357","How to Scrape Craigslist with Python: Step-by-Step Playwright Tutorial",{"bio":7,"facebook":8,"instagram":8,"linkedin":8,"location":9,"name":10,"profile_image":11,"slug":12,"tiktok":8,"twitter":8,"website":8,"youtube":8},{"description":8,"feature_image":8,"name":20,"slug":20,"visibility":21},"en","public","2026-10-12T07:37:16.000Z",11,"scrape-craigslist-python","published",[27,28],{"description":8,"feature_image":8,"name":20,"slug":20,"visibility":21},{"description":8,"feature_image":8,"name":29,"slug":30,"visibility":21},"教程","guides","Scrape Craigslist with Python","2026-11-18T11:52:02.000Z","{\"root\":{\"children\":[{\"type\":\"markdown\",\"version\":1,\"markdown\":\"This guide walks through a Python and Playwright workflow for collecting Craigslist search results. You will extract titles, prices, locations, and listing URLs, handle scroll loading, check a sample against its detail page, and export a five-column CSV.\\n\\n## Choose Your Craigslist Search\\n\\nCraigslist organizes housing, secondhand goods, and job listings by city and category. This example uses a New York \\\"for sale\\\" search for \\\"laptop.\\\" Before starting, review Craigslist's \u003Ca href=\\\"https:\u002F\u002Fwww.craigslist.org\u002Fabout\u002Fterms.of.use\\\" rel=\\\"nofollow\\\">terms of use\u003C\u002Fa> and \u003Ca href=\\\"https:\u002F\u002Fwww.craigslist.org\u002Frobots.txt\\\" rel=\\\"nofollow\\\">robots.txt\u003C\u002Fa>, and obtain any permission required for your collection.\\n\\n## How to Scrape Craigslist with Python\\n\\n### Step 1: Choose the City, Category, and Search Term\\n\\nOpen the New York \\\"for sale\\\" search page for \\\"laptop.\\\" The city entry point, the category, and the search term together define the scope of your sample. For a cross-city analysis, run each city separately, and don't treat one city's results as national data. The example URL is the \u003Ca href=\\\"https:\u002F\u002Fwww.craigslist.org\u002Fsearch\u002Farea\u002Fnewyork?cat=sss&amp;query=laptop\\\" rel=\\\"nofollow\\\">New York Craigslist search page\u003C\u002Fa>.\\n\\n![New York Craigslist search page for the keyword laptop](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fimage1-craigslist-new-york-laptop-search-page.webp)\\n\\nFigure 1: New York Craigslist search results for the example query.\\n\\n### Step 2: Install Playwright and Prepare the Browser\\n\\nInstall Python Playwright and Chromium. If Chrome is already installed on your machine, you can also put the path to its executable in `CHROME_EXECUTABLE`, and the script will use it to launch the browser. The full script for the commands below is in Step 9.\\n\\n```bash\\npython -m pip install playwright\\npython -m playwright install chromium\\npython craigslist_live_playwright.py --max-results 20 --max-scrolls 3\\n```\\n\\nFor Playwright's browser installation, navigation, and waiting methods, see the \u003Ca href=\\\"https:\u002F\u002Fplaywright.dev\u002Fpython\u002Fdocs\u002Fintro\\\" rel=\\\"nofollow\\\">official Python documentation\u003C\u002Fa>. Before the first run, you can open the same search page by hand to confirm that it shows listings on your current network.\\n\\nFor repeatable installations, pin your working Playwright version and use its matching Chromium build.\\n\\n### Step 3: Wait for the Listings and Switch to List Mode\\n\\nThe script waits for a visible `a.posting-title`, clicks the page's list button, and waits for a visible result again after the view changes. This page fetches posts asynchronously, so you can't start parsing just because the outer document returned HTTP 200. List mode puts the title, location, and price on one row, which makes it easier to check that the fields belong to the same record.\\n\\n![Craigslist list mode after switching, with title, location, and green price on the same row](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fimage2-craigslist-list-view-mode.webp)\\nFigure 2: List mode showing a title, location, and price on one result row.\\n\\n### Step 4: Locate the Title, Price, Location, and Detail Link\\n\\nThe example search page uses `a.posting-title`, and its parent result area contains `.priceinfo` and `.result-location`. Through Playwright's `evaluate_all`, the script runs the JavaScript below inside the page: starting from each title link, it walks up to the same result area and then extracts the fields. The script keeps only HTTPS Craigslist URLs whose path starts with `\u002Fview\u002F`, the detail-page path shown by the example links.\\n\\n```javascript\\ncard = link.closest('.result-data, .gallery-card')\\ntitle = link.innerText.trim()\\nprice = card?.querySelector('.priceinfo')?.innerText.trim() || ''\\nlocation = card?.querySelector('.result-location')?.innerText.trim() || ''\\n```\\n\\n![First Craigslist listing with its title, location, and price highlighted](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fimage3-highlighted-title-location-price-fields.webp)\\nFigure 3: The title, location, and price fields highlighted on a search result.\\n\\n### Step 5: Keep the Raw Price and Clean the USD Amount\\n\\nThe displayed price text is saved in `price` with surrounding whitespace removed, for example `$1,199`. Only when it fully matches a single US dollar amount is Decimal used to produce `price_usd=1199`. For missing prices, \\\"make offer\\\" text, and price ranges, `price_usd` stays empty while `price` retains the displayed text. Monthly rent for housing and pay for jobs can't be interpreted from a dollar figure alone, so record the time unit separately.\\n\\n```python\\nraw_price = '$1,199'\\nprice_usd = parse_price_usd(raw_price)  # '1199'\\n```\\n\\nAs price-cleaning examples, `$40` and `$1,199` produce `40` and `1199`, respectively. The location field is the text displayed on the post, so it can vary in capitalization or contain whatever the seller typed in. If you want to count by city, it needs further cleaning, and you can't treat it as a verified administrative region.\\n\\n### Step 6: Scroll Down to Collect More Results\\n\\nThe search interface shown here uses a dynamic list, so you shouldn't assume that the traditional `?s=120` pagination still works. Each time, the script scrolls down 1800 pixels, reads the title links in the current DOM, and de-duplicates them by detail URL. `--max-scrolls` controls the maximum number of scrolls, and `--max-results` controls the number of rows finally exported. The browser may load more records than the export cap. The script waits up to ten seconds for a URL not previously collected, then stops and logs the reason if none appears. A slow response can require a longer wait in your environment.\\n\\n![New York listings after scrolling, with later records visible at the top right](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fimage4-craigslist-scrolled-results-deduplicated.webp)\\nFigure 4: Listings at a later scroll position in the illustrated search interface.\\n\\n### Step 7: Export the Five-Column CSV\\n\\nThe script writes five columns, `title, price, price_usd, location, url`, to a UTF-8 CSV. First check the total row count, then spot-check that titles, prices, and detail links correspond. The Python standard library's \u003Ca href=\\\"https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Fcsv.html\\\" rel=\\\"nofollow\\\">csv module documentation\u003C\u002Fa> explains how DictWriter writes rows.\\n\\n| Field | Meaning and validation |\\n|---|---|\\n| `title` | Listing title; require non-empty text and compare sampled titles with details. |\\n| `price` | Displayed price text with surrounding whitespace removed; retain currency symbols and ranges. |\\n| `price_usd` | A single parsed USD amount; blank for missing, ranged, or non-numeric prices. |\\n| `location` | Displayed location text, not a verified administrative region. |\\n| `url` | De-duplication key; verify source, path, and sampled detail DOM. |\\n\\n### Step 8: Open One Detail Page to Verify the Fields\\n\\nTake the first collected listing URL and compare its title and asking price with the detail page. The script performs this sample check before exporting the CSV and a separate validation report. Extract the detail title and price from separate nodes, normalize whitespace in titles, and compare parsed prices exactly. `$40` must not match `$400`. Record `passed`, `mismatched`, or `unavailable` separately from export status.\\n\\n### Step 9: Copy the Full Python Script\\n\\nSave the following complete example as `craigslist_live_playwright.py`. It exports a bounded sample and writes a separate validation report. The default wait limits are 30 seconds for visible listings, 10 seconds for a new URL after scrolling, and 15 seconds for detail fields.\\n\\n```python\\n\\\"\\\"\\\"Collect a small sample of Craigslist search results with Playwright.\\\"\\\"\\\"\\n\\nimport argparse\\nimport csv\\nimport json\\nimport os\\nimport re\\nfrom decimal import Decimal\\nfrom pathlib import Path\\nfrom time import monotonic\\nfrom urllib.parse import urlencode, urlparse\\n\\nfrom playwright.sync_api import TimeoutError as PlaywrightTimeout\\nfrom playwright.sync_api import Error as PlaywrightError\\nfrom playwright.sync_api import sync_playwright\\n\\n\\nFIELDS = (\\\"title\\\", \\\"price\\\", \\\"price_usd\\\", \\\"location\\\", \\\"url\\\")\\n\\n\\ndef parse_price_usd(raw):\\n    match = re.fullmatch(\\n        r\\\"\\\\$\\\\s*((?:\\\\d{1,3}(?:,\\\\d{3})+|\\\\d+)(?:\\\\.\\\\d{2})?)\\\",\\n        raw.strip(),\\n    )\\n    return str(Decimal(match.group(1).replace(\\\",\\\", \\\"\\\"))) if match else \\\"\\\"\\n\\n\\ndef visible_rows(page):\\n    return page.locator(\\\"a.posting-title\\\").evaluate_all(\\\"\\\"\\\"links => links.map(link => {\\n        const card = link.closest('.result-data, .gallery-card');\\n        return {\\n            title: link.innerText.trim(),\\n            price: card?.querySelector('.priceinfo')?.innerText.trim() || '',\\n            location: card?.querySelector('.result-location')?.innerText.trim() || '',\\n            url: link.href\\n        };\\n    })\\\"\\\"\\\")\\n\\n\\ndef compare_fields(row, detail_title, detail_price):\\n    title_matches = \\\" \\\".join(row[\\\"title\\\"].split()) == \\\" \\\".join(detail_title.split())\\n    list_amount = parse_price_usd(row[\\\"price\\\"])\\n    detail_amount = parse_price_usd(detail_price)\\n    if not title_matches:\\n        return {\\\"status\\\": \\\"mismatched\\\", \\\"title_matches\\\": False,\\n                \\\"reason\\\": \\\"List and detail titles differ\\\"}\\n    if not list_amount or not detail_amount:\\n        return {\\\"status\\\": \\\"unavailable\\\", \\\"title_matches\\\": True,\\n                \\\"reason\\\": \\\"One or both prices are not a single USD amount\\\"}\\n    price_matches = Decimal(list_amount) == Decimal(detail_amount)\\n    return {\\\"status\\\": \\\"passed\\\" if title_matches and price_matches else \\\"mismatched\\\",\\n            \\\"title_matches\\\": title_matches, \\\"price_matches\\\": price_matches}\\n\\n\\nclass AccessGuard:\\n    def __init__(self, context):\\n        self.failure = None\\n        context.on(\\\"response\\\", self.on_response)\\n        context.on(\\\"requestfailed\\\", self.on_failed)\\n\\n    def on_response(self, response):\\n        # Only target-site documents and data requests can stop this run.\\n        kind = response.request.resource_type\\n        host = urlparse(response.url).hostname\\n        if host == \\\"www.craigslist.org\\\" and (response.status in (403, 429, 407) or (\\n            kind in (\\\"document\\\", \\\"xhr\\\", \\\"fetch\\\") and response.status >= 400\\n        )):\\n            retry = response.headers.get(\\\"retry-after\\\", \\\"not supplied\\\")\\n            self.failure = f\\\"HTTP {response.status}; Retry-After={retry}; stop and review\\\"\\n\\n    def on_failed(self, request):\\n        if urlparse(request.url).hostname == \\\"www.craigslist.org\\\" and request.resource_type in (\\\"document\\\", \\\"xhr\\\", \\\"fetch\\\"):\\n            self.failure = \\\"Document\u002Fdata request failed; stop and inspect the network\\\"\\n\\n    def check(self, page):\\n        if self.failure:\\n            raise RuntimeError(self.failure)\\n        text = page.locator(\\\"body\\\").inner_text(timeout=5000).lower()\\n        if self.failure:\\n            raise RuntimeError(self.failure)\\n        markers = (\\\"captcha\\\", \\\"error 15\\\", \\\"access denied\\\", \\\"verify you are human\\\")\\n        if any(marker in text for marker in markers):\\n            raise RuntimeError(\\\"Possible access challenge; stop for manual inspection\\\")\\n\\n\\ndef navigate(page, url, guard):\\n    response = page.goto(url, wait_until=\\\"domcontentloaded\\\", timeout=45000)\\n    guard.check(page)\\n    print(f\\\"Document: HTTP {response.status if response else 'unknown'}\\\")\\n    if response is None or response.status != 200:\\n        raise RuntimeError(\\\"Document unavailable; stop and review access\\\")\\n\\n\\ndef is_detail_url(value):\\n    parsed = urlparse(value)\\n    return (\\n        parsed.scheme == \\\"https\\\"\\n        and parsed.hostname == \\\"www.craigslist.org\\\"\\n        and parsed.path.startswith(\\\"\u002Fview\u002F\\\")\\n    )\\n\\n\\ndef collect(city, category, query, max_results, max_scrolls, output, shots):\\n    url = f\\\"https:\u002F\u002Fwww.craigslist.org\u002Fsearch\u002Farea\u002F{city}\\\"\\n    rows_by_url = {}\\n    with sync_playwright() as playwright:\\n        launch_options = {\\\"headless\\\": True}\\n        if os.environ.get(\\\"CHROME_EXECUTABLE\\\"):\\n            launch_options[\\\"executable_path\\\"] = os.environ[\\\"CHROME_EXECUTABLE\\\"]\\n        if os.environ.get(\\\"ROLA_PROXY_SERVER\\\"):\\n            launch_options[\\\"proxy\\\"] = {\\n                \\\"server\\\": os.environ[\\\"ROLA_PROXY_SERVER\\\"],\\n                \\\"username\\\": os.environ.get(\\\"ROLA_PROXY_USER\\\", \\\"\\\"),\\n                \\\"password\\\": os.environ.get(\\\"ROLA_PROXY_PASSWORD\\\", \\\"\\\"),\\n            }\\n        browser = playwright.chromium.launch(**launch_options)\\n        try:\\n            context = browser.new_context(viewport={\\\"width\\\": 1360, \\\"height\\\": 900}, service_workers=\\\"block\\\")\\n            guard = AccessGuard(context)\\n            page = context.new_page()\\n            navigate(page, url + \\\"?\\\" + urlencode({\\\"cat\\\": category, \\\"query\\\": query}), guard)\\n            deadline = monotonic() + 30\\n            while not page.locator(\\\"a.posting-title\\\").first.is_visible():\\n                guard.check(page)\\n                if monotonic() >= deadline:\\n                    raise RuntimeError(\\\"No listings within 30 seconds; inspect loading and selectors\\\")\\n                page.wait_for_timeout(250)\\n            page.locator('button[title=\\\"list\\\"]').click(timeout=10000)\\n            page.locator(\\\"a.posting-title\\\").first.wait_for(state=\\\"visible\\\", timeout=30000)\\n            guard.check(page)\\n            page.screenshot(path=str(shots \u002F \\\"search_list.png\\\"))\\n            for step in range(max_scrolls + 1):\\n                guard.check(page)\\n                for row in visible_rows(page):\\n                    if is_detail_url(row[\\\"url\\\"]) and row[\\\"title\\\"] and row[\\\"url\\\"] not in rows_by_url:\\n                        row[\\\"price_usd\\\"] = parse_price_usd(row[\\\"price\\\"])\\n                        rows_by_url[row[\\\"url\\\"]] = row\\n                print(f\\\"Step {step}: {len(rows_by_url)} distinct source-filtered URLs\\\")\\n                if step == max_scrolls:\\n                    print(\\\"Stopped: scroll limit reached\\\")\\n                    break\\n                seen = set(rows_by_url)\\n                page.evaluate(\\\"window.scrollBy(0, 1800)\\\")\\n                deadline = monotonic() + 10\\n                while monotonic() \u003C deadline:\\n                    guard.check(page)\\n                    candidates = [row for row in visible_rows(page) if row[\\\"title\\\"] and is_detail_url(row[\\\"url\\\"])]\\n                    if any(row[\\\"url\\\"] not in seen for row in candidates):\\n                        break\\n                    page.wait_for_timeout(250)\\n                else:\\n                    print(\\\"Stopped: no unseen DOM URL within 10 seconds\\\")\\n                    break\\n            guard.check(page)\\n            rows = list(rows_by_url.values())[:max_results]\\n            if not rows:\\n                raise RuntimeError(\\\"No listing rows collected; check list mode, selectors and network responses\\\")\\n            validation = {\\\"sample_size\\\": min(1, len(rows)), \\\"status\\\": \\\"unavailable\\\"}\\n            if rows:\\n                detail = context.new_page()\\n                try:\\n                    navigate(detail, rows[0][\\\"url\\\"], guard)\\n                    # Re-check these selectors when the detail-page layout changes.\\n                    title_node = detail.locator(\\\"#titletextonly\\\")\\n                    price_node = detail.locator(\\\"h1 .price\\\")\\n                    deadline = monotonic() + 15\\n                    while title_node.count() != 1 or price_node.count() != 1:\\n                        guard.check(detail)\\n                        if monotonic() >= deadline:\\n                            raise PlaywrightTimeout(\\\"Detail title\u002Fprice selectors unavailable\\\")\\n                        detail.wait_for_timeout(250)\\n                    guard.check(detail)\\n                    detail_title = title_node.inner_text()\\n                    detail_price = price_node.inner_text()\\n                    guard.check(detail)\\n                    validation.update(compare_fields(rows[0], detail_title, detail_price))\\n                except (PlaywrightTimeout, PlaywrightError):\\n                    guard.check(detail)\\n                    validation[\\\"reason\\\"] = \\\"Detail load or selector check unavailable\\\"\\n                finally:\\n                    detail.close()\\n            print(f\\\"Detail sample validation: {validation}\\\")\\n            guard.check(page)\\n            if guard.failure:\\n                raise RuntimeError(guard.failure)\\n            output.parent.mkdir(parents=True, exist_ok=True)\\n            with output.open(\\\"w\\\", encoding=\\\"utf-8-sig\\\", newline=\\\"\\\") as file:\\n                writer = csv.DictWriter(file, fieldnames=FIELDS)\\n                writer.writeheader()\\n                writer.writerows(rows)\\n            report = output.with_suffix(\\\".validation.json\\\")\\n            report.write_text(json.dumps(validation, indent=2), encoding=\\\"utf-8\\\")\\n        finally:\\n            browser.close()\\n    print(f\\\"Exported {len(rows)} rows to {output}; see sample validation separately\\\")\\n    for row in rows[:3]:\\n        print(f\\\"{row['title'][:46]} | {row['price']} | {row['location']} | {row['url']}\\\")\\n\\n\\ndef main():\\n    parser = argparse.ArgumentParser()\\n    parser.add_argument(\\\"--city\\\", default=\\\"newyork\\\")\\n    parser.add_argument(\\\"--category\\\", default=\\\"sss\\\")\\n    parser.add_argument(\\\"--query\\\", default=\\\"laptop\\\")\\n    parser.add_argument(\\\"--max-results\\\", type=int, default=20)\\n    parser.add_argument(\\\"--max-scrolls\\\", type=int, default=3)\\n    parser.add_argument(\\\"--output\\\", type=Path, default=Path(\\\"craigslist_live.csv\\\"))\\n    parser.add_argument(\\\"--shots\\\", type=Path, default=Path(\\\"screenshots\\\"))\\n    args = parser.parse_args()\\n    if not re.fullmatch(r\\\"[a-z]+\\\", args.city):\\n        parser.error(\\\"--city must be an area slug using lowercase letters\\\")\\n    if not re.fullmatch(r\\\"[a-z]{3}\\\", args.category):\\n        parser.error(\\\"--category must be a three-letter code\\\")\\n    if not 1 \u003C= args.max_results \u003C= 100 or not 0 \u003C= args.max_scrolls \u003C= 10:\\n        parser.error(\\\"set --max-results to 1..100 and --max-scrolls to 0..10\\\")\\n    args.shots.mkdir(parents=True, exist_ok=True)\\n    collect(args.city, args.category, args.query, args.max_results,\\n            args.max_scrolls, args.output, args.shots)\\n\\n\\nif __name__ == \\\"__main__\\\":\\n    main()\\n```\\n\\n## How Do You Validate the Exported Craigslist CSV?\\n\\nValidate the export separately from the download. Check the exact five column names, unique URLs, non-empty titles, and each displayed price's relationship to its normalized value. Compare sampled titles and prices with detail pages using exact normalized values. The script checks the first collected listing against its detail page. Missing detail nodes produce `unavailable`. Once both nodes can be read, a title difference takes priority and produces `mismatched`, even if the price text is empty or cannot be parsed. With matching titles, unparseable prices produce `unavailable`, unequal amounts produce `mismatched`, and equal amounts produce `passed`.\\n\\nThe script saves its one-row sample check beside the CSV, replacing the output filename's extension with `.validation.json` (by default, `craigslist_live.validation.json`). The status describes that one-row sample. The CSV contains all collected rows up to `--max-results`, regardless of the sample status. Use `mismatched` to investigate field differences and `unavailable` to investigate missing nodes or unparseable prices.\\n\\n## How to Adjust When You Change Categories and Filters\\n\\nIn this article, `sss` is the \\\"for sale\\\" example. Housing and job categories have different category entry points and field combinations, so first choose the category, city, and filters by hand on the website, then confirm the URL and the DOM. Housing may need the number of bedrooms, floor area, and rent period, and jobs may need a pay unit; don't use the secondhand-goods `price_usd` directly as a universal field. The script's `--city`, `--category`, and `--query` can serve as inputs, but the selectors for any new category must be re-verified.\\n\\nFor multi-city projects, I recommend keeping the city, category, keyword, collection time, and raw price string for every run, and de-duplicating by detail URL in the storage layer. Validate field quality on a small number of pages first, and only then decide whether to widen the collection scope.\\n\\n## What to Do About 403 Errors, Blank Pages, or Broken Selectors\\n\\nThe script stops on observed 403 or 429 responses, proxy authentication errors, and possible access challenges. For 403, check the access conditions before running again. For 429, inspect `Retry-After`; the script does not retry automatically. For 407, check the proxy username, password, and endpoint. Proxy connection failures may also appear as navigation errors. If challenge detection triggers, inspect the page text to identify the cause.\\n\\nIf the main document returns 200 but `a.posting-title` never appears, first check whether the page is still loading asynchronously, and check the listing requests, any JavaScript errors, and whether the area slug is correct. If the page has been redesigned, re-check the title, price, and location nodes. Don't parse a blank page as a normal result of zero records.\\n\\n## How Can Rola IP Help When You Scrape Craigslist?\\n\\nWhen collecting from multiple cities, first pick the right Craigslist city page, and only then think about the network exit. The [Rola IP rotating residential proxy](https:\u002F\u002Frola-ip.co\u002Fresidential-ip\u002F) product page describes coverage in more than 190 countries and regions, an IP pool of more than 80 million, per-request rotation, sticky sessions, and other capabilities. City-level targeting can support regional verification, but a proxy exit cannot replace Craigslist's own city filtering.\\n\\n![Rola IP residential proxy product page](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fimage7-rola-ip-rotating-residential-proxy-page.webp)\\n\\nFigure 5: Rola IP residential proxy product information.\\n\\nRola IP's [web scraping use cases](https:\u002F\u002Frola-ip.co\u002Fweb-scraping-use-case\u002F) page describes regional targeting, session control, and automation integrations. Available parameters depend on the chosen product and plan.\\n\\nThe script's configuration example uses an HTTP proxy endpoint. Set `ROLA_PROXY_SERVER`, `ROLA_PROXY_USER`, and `ROLA_PROXY_PASSWORD` locally, and Playwright will hand them to the browser's proxy configuration. For the gateway, authentication, and region parameters, refer to the [Rola IP Python integration guide](https:\u002F\u002Fdoc.rola-ip.co\u002Fguide\u002Fintegration\u002Fpython.html) and the \u003Ca href=\\\"https:\u002F\u002Fplaywright.dev\u002Fpython\u002Fdocs\u002Fnetwork\\\" rel=\\\"nofollow\\\">Playwright network documentation\u003C\u002Fa>. Rola's Python guide includes HTTP and SOCKS5 Requests examples. Playwright documents browser and context proxy configuration for HTTP(S) and SOCKSv5, with username\u002Fpassword fields for HTTP(S) proxies. Test the exact provider protocol and authentication combination before production use.\\n\\n```bash\\nexport ROLA_PROXY_SERVER='http:\u002F\u002FYOUR_HOST:PORT'\\nexport ROLA_PROXY_USER='YOUR_USERNAME'\\nexport ROLA_PROXY_PASSWORD='YOUR_PASSWORD'\\npython craigslist_live_playwright.py --max-results 20 --max-scrolls 3\\n```\\n\\nFor Windows PowerShell, use:\\n\\n```powershell\\n$env:ROLA_PROXY_SERVER = 'http:\u002F\u002FYOUR_HOST:PORT'\\n$env:ROLA_PROXY_USER = 'YOUR_USERNAME'\\n$env:ROLA_PROXY_PASSWORD = 'YOUR_PASSWORD'\\npython craigslist_live_playwright.py --max-results 20 --max-scrolls 3\\n```\\n\\n![Rola IP Python proxy integration documentation](https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002Fimage8-rola-ip-python-integration-docs.webp)\\n\\nFigure 6: Rola IP Python integration documentation for proxy authentication examples.\\n\\nIf you want to extend to data fields on other product platforms, see Rola IP's [Python product information scraping tutorial](https:\u002F\u002Frola-ip.co\u002Fblog\u002Fpython-web-scraping-for-product-information\u002F). For help choosing a proxy type, configuring a connection, and checking the exit IP, see our [Craigslist proxies](https:\u002F\u002Frola-ip.co\u002Fblog\u002Fcraigslist-proxies\u002F) guide. The example below shows how to pass proxy settings to Playwright.\\n\"},{\"children\":[],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1}],\"direction\":null,\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}",{"items":35,"inline":15},[36,39,42,45,48,51],{"title":37,"desc":38},"Are Craigslist's Internal Endpoints a Public API?","\u003Cp dir=\"ltr\">\u003Cspan style=\"white-space: pre-wrap;\">An endpoint used by the website is not necessarily a documented public API. Internal endpoints can depend on browser state and change with the site's frontend, so check for official API documentation before building an integration around one.\u003C\u002Fspan>\u003C\u002Fp>",{"title":40,"desc":41},"Why Might Requests and a Browser Receive Different Responses?","\u003Cp dir=\"ltr\">\u003Cspan style=\"white-space: pre-wrap;\">They use different clients, headers, and loading sequences, so a server may respond differently. A browser can execute JavaScript and load asynchronous data that a plain HTTP request does not. Use the response status and the browser's Network panel to distinguish an HTTP error from content loaded by JavaScript.\u003C\u002Fspan>\u003C\u002Fp>",{"title":43,"desc":44},"What If the Price Is Missing or Is Not a Single Dollar Amount?","\u003Cp dir=\"ltr\">\u003Cspan style=\"white-space: pre-wrap;\">Keep the raw \u003C\u002Fspan>\u003Ccode spellcheck=\"false\" style=\"white-space: pre-wrap;\">\u003Cspan>price\u003C\u002Fspan>\u003C\u002Fcode>\u003Cspan style=\"white-space: pre-wrap;\"> and leave \u003C\u002Fspan>\u003Ccode spellcheck=\"false\" style=\"white-space: pre-wrap;\">\u003Cspan>price_usd\u003C\u002Fspan>\u003C\u002Fcode>\u003Cspan style=\"white-space: pre-wrap;\"> empty. Don't treat a missing value as zero, and don't pick an arbitrary endpoint of a price range.\u003C\u002Fspan>\u003C\u002Fp>",{"title":46,"desc":47},"How Do I Scrape More Results?","\u003Cp dir=\"ltr\">\u003Cspan style=\"white-space: pre-wrap;\">For the interface illustrated here, use scrolling and \u003C\u002Fspan>\u003Ccode spellcheck=\"false\" style=\"white-space: pre-wrap;\">\u003Cspan>--max-scrolls\u003C\u002Fspan>\u003C\u002Fcode>\u003Cspan style=\"white-space: pre-wrap;\"> to control the collection window. De-duplicate by listing URL, wait for URLs that have not already been collected, and do not assume a fixed number of items per page.\u003C\u002Fspan>\u003C\u002Fp>",{"title":49,"desc":50},"Do I Have to Use a Proxy?","\u003Cp dir=\"ltr\">\u003Cspan style=\"white-space: pre-wrap;\">No. The script can run without proxy settings. Configure a proxy when your project needs a particular regional exit or session setup.\u003C\u002Fspan>\u003C\u002Fp>",{"title":52,"desc":53},"Can the Script Be Used Directly for Housing or Job Listings?","\u003Cp dir=\"ltr\">\u003Cspan style=\"white-space: pre-wrap;\">You can swap the parameters, but the field patterns and page structure need to be re-checked. Housing rent and job pay also require recording the unit and period, so you can't directly reuse the price cleaning built for secondhand goods.\u003C\u002Fspan>\u003C\u002Fp>",{"@context":55,"@type":56,"@id":57,"mainEntity":58},"https:\u002F\u002Fschema.org","FAQPage","https:\u002F\u002Frola-ip.co\u002Fblog\u002Fscrape-craigslist-python\u002F#faq",[59,64,67,70,73,76],{"@type":60,"name":37,"acceptedAnswer":61},"Question",{"@type":62,"text":63},"Answer","An endpoint used by the website is not necessarily a documented public API. Internal endpoints can depend on browser state and change with the site's frontend, so check for official API documentation before building an integration around one.",{"@type":60,"name":40,"acceptedAnswer":65},{"@type":62,"text":66},"They use different clients, headers, and loading sequences, so a server may respond differently. A browser can execute JavaScript and load asynchronous data that a plain HTTP request does not. Use the response status and the browser's Network panel to distinguish an HTTP error from content loaded by JavaScript.",{"@type":60,"name":43,"acceptedAnswer":68},{"@type":62,"text":69},"Keep the raw price and leave price_usd empty. Don't treat a missing value as zero, and don't pick an arbitrary endpoint of a price range.",{"@type":60,"name":46,"acceptedAnswer":71},{"@type":62,"text":72},"For the interface illustrated here, use scrolling and --max-scrolls to control the collection window. De-duplicate by listing URL, wait for URLs that have not already been collected, and do not assume a fixed number of items per page.",{"@type":60,"name":49,"acceptedAnswer":74},{"@type":62,"text":75},"No. The script can run without proxy settings. Configure a proxy when your project needs a particular regional exit or session setup.",{"@type":60,"name":52,"acceptedAnswer":77},{"@type":62,"text":78},"You can swap the parameters, but the field patterns and page structure need to be re-checked. Housing rent and job pay also require recording the unit and period, so you can't directly reuse the price cleaning built for secondhand goods.","{\"@context\":\"https:\u002F\u002Fschema.org\",\"@type\":\"FAQPage\",\"@id\":\"https:\u002F\u002Frola-ip.co\u002Fblog\u002Fscrape-craigslist-python\u002F#faq\",\"mainEntity\":[{\"@type\":\"Question\",\"name\":\"Are Craigslist's Internal Endpoints a Public API?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"An endpoint used by the website is not necessarily a documented public API. Internal endpoints can depend on browser state and change with the site's frontend, so check for official API documentation before building an integration around one.\"}},{\"@type\":\"Question\",\"name\":\"Why Might Requests and a Browser Receive Different Responses?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"They use different clients, headers, and loading sequences, so a server may respond differently. A browser can execute JavaScript and load asynchronous data that a plain HTTP request does not. Use the response status and the browser's Network panel to distinguish an HTTP error from content loaded by JavaScript.\"}},{\"@type\":\"Question\",\"name\":\"What If the Price Is Missing or Is Not a Single Dollar Amount?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Keep the raw price and leave price_usd empty. Don't treat a missing value as zero, and don't pick an arbitrary endpoint of a price range.\"}},{\"@type\":\"Question\",\"name\":\"How Do I Scrape More Results?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"For the interface illustrated here, use scrolling and --max-scrolls to control the collection window. De-duplicate by listing URL, wait for URLs that have not already been collected, and do not assume a fixed number of items per page.\"}},{\"@type\":\"Question\",\"name\":\"Do I Have to Use a Proxy?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No. The script can run without proxy settings. Configure a proxy when your project needs a particular regional exit or session setup.\"}},{\"@type\":\"Question\",\"name\":\"Can the Script Be Used Directly for Housing or Job Listings?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"You can swap the parameters, but the field patterns and page structure need to be re-checked. Housing rent and job pay also require recording the unit and period, so you can't directly reuse the price cleaning built for secondhand goods.\"}}]}",[81],"\u002Fblog\u002Fscrape-craigslist-python\u002F",{"prev":83,"next":93,"related":104,"popular":138,"latest":204},{"id":84,"title":85,"slug":86,"feature_image":87,"published_at":88,"twitter_title":86,"primary_tag":89,"tags":90},"6acc9bcf4956c90001bf13eb","Shopee Price Tracker: How to Build Reliable Price Monitoring","shopee-price-tracker","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002FShopee-Price-Tracker-How-to-Build-Reliable-Price-Monitoring.webp","2026-10-12T08:43:58.000Z",{"name":20,"slug":20},[91,92],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":94,"title":95,"slug":96,"feature_image":97,"published_at":98,"twitter_title":99,"primary_tag":100,"tags":101},"6ac9f94a4956c90001bf1219","How to Scrape WooCommerce Products with Python","scrape-woocommerce-products","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F10\u002FScrape-WooCommerce-Products-article-cover-image.webp","2026-10-10T09:07:25.000Z","Scrape WooCommerce Products",{"name":20,"slug":20},[102,103],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},[105,116,127],{"id":106,"title":107,"slug":108,"feature_image":109,"published_at":110,"twitter_title":111,"primary_tag":112,"tags":113},"6b0d3e4b92ab700001dc0a73","Scrape Indeed Jobs with Python: Extract Job Fields and Export to CSV","scrape-indeed-jobs","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FScrape-Indeed-Jobs.webp","2026-11-30T09:37:05.000Z","indeed job scraper",{"name":20,"slug":20},[114,115],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":117,"title":118,"slug":119,"feature_image":120,"published_at":121,"twitter_title":122,"primary_tag":123,"tags":124},"6b0d2bcb92ab700001dc0a12","Node.js HTTP Proxy Tutorial: Send HTTPS Requests with Rola IP and Verify the Exit IP","node-js-http-proxy","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FNode.js-HTTP-Proxy-Tutorial_-Send-HTTPS-Requests-with-Rola-IP-and-Verify-the-Exit-IP.webp","2026-11-30T07:58:57.000Z","node js http proxy",{"name":20,"slug":20},[125,126],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":128,"title":129,"slug":130,"feature_image":131,"published_at":132,"twitter_title":133,"primary_tag":134,"tags":135},"6b09485d92ab700001dc0953","How to Set Up Chrome DevTools MCP for Multi-Region Geo-Testing with Residential Proxies","chrome-devtools-mcp-proxy-setup","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002Fchrome-devtools-mcp-proxy-setup.webp","2026-11-27T09:22:44.000Z","chrome-devtools-mcp proxy setup",{"name":20,"slug":20},[136,137],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},[139,154,166,178,190],{"id":140,"title":141,"slug":142,"feature_image":143,"published_at":144,"twitter_title":145,"primary_tag":146,"tags":147},"6aa1292f4956c90001bef44e","ProxySite.com Review (2026): Is It Safe? 5 Best Alternatives","proxysite-review-alternatives","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F09\u002FProxySite-Review-and--Alternatives-article-cover-image.webp","2026-09-09T10:16:50.000Z","proxysite",{"name":20,"slug":20},[148,149,152],{"name":20,"slug":20,"visibility":21},{"name":150,"slug":151,"visibility":21},"对比选型","comparisons",{"name":153,"slug":153,"visibility":21},"hot",{"id":155,"title":156,"slug":157,"feature_image":158,"published_at":159,"twitter_title":160,"primary_tag":161,"tags":162},"6a978f9a4956c90001bee8bb","BlockAway Alternatives: 6 Best Options (2026)","blockaway-alternatives","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F09\u002FBlockAway-Alternatives-article-cover-image.webp","2026-09-02T03:14:08.000Z","blockaway alternative",{"name":20,"slug":20},[163,164,165],{"name":20,"slug":20,"visibility":21},{"name":150,"slug":151,"visibility":21},{"name":153,"slug":153,"visibility":21},{"id":167,"title":168,"slug":169,"feature_image":170,"published_at":171,"twitter_title":172,"primary_tag":173,"tags":174},"6a912ce84956c90001bee35d","HTTPX vs Requests vs aiohttp: Features, Performance, and Python Use Cases","httpx-vs-requests-vs-aiohttp","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F08\u002FHTTPX-vs-Requests-vs-aiohttp-article-cover-image.webp","2026-08-28T07:27:34.000Z","httpx vs requests",{"name":20,"slug":20},[175,176,177],{"name":20,"slug":20,"visibility":21},{"name":150,"slug":151,"visibility":21},{"name":153,"slug":153,"visibility":21},{"id":179,"title":180,"slug":181,"feature_image":182,"published_at":183,"twitter_title":184,"primary_tag":185,"tags":186},"6a90fcea4956c90001bee256","8 Best Germany Proxies in 2026: Provider Comparison","best-germany-proxies","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F08\u002FBest-Germany-Proxies-article-cover-image.webp","2026-08-28T03:40:55.000Z","germany proxy",{"name":20,"slug":20},[187,188,189],{"name":20,"slug":20,"visibility":21},{"name":150,"slug":151,"visibility":21},{"name":153,"slug":153,"visibility":21},{"id":191,"title":192,"slug":193,"feature_image":194,"published_at":195,"twitter_title":196,"primary_tag":197,"tags":198},"6a8e92664956c90001beddc2","Bing Rank Tracker: Reliable Local SERP Monitoring Guide","bing-rank-tracker","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F08\u002F-------16.webp","2026-08-26T07:42:04.000Z","bing rank checker",{"name":20,"slug":20},[199,200,203],{"name":20,"slug":20,"visibility":21},{"name":201,"slug":202,"visibility":21},"应用场景","use-cases",{"name":153,"slug":153,"visibility":21},[205,218,229,240,251],{"id":206,"title":207,"slug":208,"feature_image":209,"published_at":210,"twitter_title":211,"primary_tag":212,"tags":213},"6b0946f492ab700001dc0920","Best Rotating Proxies in 2026 7 Rotating Proxy Providers Compared","best-rotating-proxies","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FBest-Rotating-Proxies-in-2026-7-Rotating-Proxy-Providers-Compared.webp","2026-11-27T09:07:09.000Z","best rotating proxies",{"name":20,"slug":20},[214,215],{"name":20,"slug":20,"visibility":21},{"name":216,"slug":217,"visibility":21},"排行榜","top-picks",{"id":219,"title":220,"slug":221,"feature_image":222,"published_at":223,"twitter_title":224,"primary_tag":225,"tags":226},"6b07a50492ab700001dc0603","How to Configure an NGINX Docker Reverse Proxy with Rola IP Egress","nginx-docker-reverse-proxy","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FHow-to-Configure-an-NGINX-Docker-Reverse-Proxy-with-Rola-IP-Egress-1.webp","2026-11-26T03:21:51.000Z","nginx docker reverse proxy",{"name":20,"slug":20},[227,228],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":230,"title":231,"slug":232,"feature_image":233,"published_at":234,"twitter_title":235,"primary_tag":236,"tags":237},"6b079b8692ab700001dc05ce","Android Proxy Settings for Mobile Network: The No-Root Guide (2026)","android-proxy-settings-mobile-network","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FAndroid-Proxy-Settings-for-Mobile-Network_-The-No-Root-Guide--2026-.webp","2026-11-26T03:10:40.000Z","android proxy settings mobile network",{"name":20,"slug":20},[238,239],{"name":20,"slug":20,"visibility":21},{"name":29,"slug":30,"visibility":21},{"id":241,"title":242,"slug":243,"feature_image":244,"published_at":245,"twitter_title":246,"primary_tag":247,"tags":248},"6b0655a092ab700001dc0440","Rammerhead Proxy: Setup, HTTP Upstreams and Alternatives","rammerhead-alternatives","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002Frammerhead-alternatives.webp","2026-11-25T03:59:48.000Z","Rammerhead Proxy",{"name":20,"slug":20},[249,250],{"name":20,"slug":20,"visibility":21},{"name":150,"slug":151,"visibility":21},{"id":252,"title":253,"slug":254,"feature_image":255,"published_at":256,"twitter_title":257,"primary_tag":258,"tags":259},"6b05417f92ab700001dc034d","ProxyEmpire Review (2026): Our Best Alternative for Predictable Bulk Residential Use","proxyempire-review","https:\u002F\u002Frola-ip.co\u002F__ghost__\u002Fcontent\u002Fimages\u002F2026\u002F11\u002FProxyEmpire-Review--2026-_-Our-Best-Alternative-for-Predictable-Bulk-Residential-Use.webp","2026-11-24T08:12:53.000Z","proxyempire review",{"name":20,"slug":20},[260,261],{"name":20,"slug":20,"visibility":21},{"name":150,"slug":151,"visibility":21}]