Skip to content

Commit 780b335

Browse files
author
stlc-bot
committed
feat(billing): charge for 404s and skip fraud accounting (#1152)
Stainless-Generated-From: 14c0cc72070fad5c5a6a093ccf89ebcb598c4bb4
1 parent fc30712 commit 780b335

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/Client.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function __construct(
125125
'Accept' => 'application/json',
126126
'User-Agent' => sprintf('context.dev/PHP %s', VERSION),
127127
'X-Stainless-Lang' => 'php',
128-
'X-Stainless-Package-Version' => '2.17.1',
128+
'X-Stainless-Package-Version' => '2.18.0',
129129
'X-Stainless-Arch' => Util::machtype(),
130130
'X-Stainless-OS' => Util::ostype(),
131131
'X-Stainless-Runtime' => php_sapi_name(),

‎src/Services/WebRawService.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ public function webScrapeImages(
576576
* | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing. A partial result (`finalDOMState: "still-loading"`, only with timeoutOpts.behavior=return-partial) is billed at the base 1 credit with no OCR or actions surcharge |
577577
* | 400 | No | Invalid input, skipped PDF, or the page could not be scraped. error_code WEBSITE_BLOCKED specifically means the site answered with an anti-bot challenge, CAPTCHA wall, or login shell instead of the page (even when the site returned HTTP 200) — retrying later or from another country sometimes succeeds |
578578
* | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
579-
* | 404 | No | Target page returned or fingerprinted as not found |
579+
* | 404 | Yes — 1 credit, or 2 credits with actions | Target page returned or fingerprinted as not found |
580580
* | 408 | No | Request timed out. With timeoutOpts.behavior=return-partial this only happens when nothing usable had rendered by the deadline |
581581
* | 413 | No | Target content exceeds the maximum supported size (20 MB) |
582582
* | 415 | No | Unsupported content type |

‎src/Services/WebService.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ public function webScrapeImages(
711711
* | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing. A partial result (`finalDOMState: "still-loading"`, only with timeoutOpts.behavior=return-partial) is billed at the base 1 credit with no OCR or actions surcharge |
712712
* | 400 | No | Invalid input, skipped PDF, or the page could not be scraped. error_code WEBSITE_BLOCKED specifically means the site answered with an anti-bot challenge, CAPTCHA wall, or login shell instead of the page (even when the site returned HTTP 200) — retrying later or from another country sometimes succeeds |
713713
* | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
714-
* | 404 | No | Target page returned or fingerprinted as not found |
714+
* | 404 | Yes — 1 credit, or 2 credits with actions | Target page returned or fingerprinted as not found |
715715
* | 408 | No | Request timed out. With timeoutOpts.behavior=return-partial this only happens when nothing usable had rendered by the deadline |
716716
* | 413 | No | Target content exceeds the maximum supported size (20 MB) |
717717
* | 415 | No | Unsupported content type |

‎src/Web/WebWebScrapeMdParams.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* | 200 | Yes — 1 credit, or 2 credits with actions | Successful scrape, including a zero-length result when includeSelectors matched nothing. A partial result (`finalDOMState: "still-loading"`, only with timeoutOpts.behavior=return-partial) is billed at the base 1 credit with no OCR or actions surcharge |
3030
* | 400 | No | Invalid input, skipped PDF, or the page could not be scraped. error_code WEBSITE_BLOCKED specifically means the site answered with an anti-bot challenge, CAPTCHA wall, or login shell instead of the page (even when the site returned HTTP 200) — retrying later or from another country sometimes succeeds |
3131
* | 401 / 403 | No | Invalid/disabled key, insufficient permissions, or credits exhausted; inspect error_code |
32-
* | 404 | No | Target page returned or fingerprinted as not found |
32+
* | 404 | Yes — 1 credit, or 2 credits with actions | Target page returned or fingerprinted as not found |
3333
* | 408 | No | Request timed out. With timeoutOpts.behavior=return-partial this only happens when nothing usable had rendered by the deadline |
3434
* | 413 | No | Target content exceeds the maximum supported size (20 MB) |
3535
* | 415 | No | Unsupported content type |

0 commit comments

Comments
 (0)