Skip to content

Commit 8a7756f

Browse files
committed
Update API documentation for version 0.8.23
1 parent 6dff0fe commit 8a7756f

19 files changed

Lines changed: 1071 additions & 513 deletions

docs/scrapfly/api_response.html

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -598,16 +598,11 @@ <h3>Inherited members</h3>
598598
pass
599599

600600
try:
601-
from compression import zstd as _zstd # noqa: F401 - Python 3.14+ native zstd
602-
if &#39;zstd&#39; not in self.SUPPORTED_COMPRESSION:
601+
from urllib3.response import HAS_ZSTD
602+
if HAS_ZSTD and &#39;zstd&#39; not in self.SUPPORTED_COMPRESSION:
603603
self.SUPPORTED_COMPRESSION.append(&#39;zstd&#39;)
604604
except ImportError:
605-
try:
606-
import zstandard # noqa: F401 - aligned with urllib3 for transparent decompression
607-
if &#39;zstd&#39; not in self.SUPPORTED_COMPRESSION:
608-
self.SUPPORTED_COMPRESSION.append(&#39;zstd&#39;)
609-
except ImportError:
610-
pass
605+
pass
611606

612607
self.content_encoding: str = &#39;, &#39;.join(self.SUPPORTED_COMPRESSION)
613608
self._signing_secret: Optional[Tuple[str]] = None
@@ -745,11 +740,11 @@ <h3>Class variables</h3>
745740
</dd>
746741
<dt id="scrapfly.api_response.ResponseBodyHandler.SUPPORTED_COMPRESSION"><code class="name">var <span class="ident">SUPPORTED_COMPRESSION</span></code></dt>
747742
<dd>
748-
<div class="desc"></div>
743+
<div class="desc"><p>The type of the None singleton.</p></div>
749744
</dd>
750745
<dt id="scrapfly.api_response.ResponseBodyHandler.SUPPORTED_CONTENT_TYPES"><code class="name">var <span class="ident">SUPPORTED_CONTENT_TYPES</span></code></dt>
751746
<dd>
752-
<div class="desc"></div>
747+
<div class="desc"><p>The type of the None singleton.</p></div>
753748
</dd>
754749
</dl>
755750
<h3>Methods</h3>
@@ -856,7 +851,7 @@ <h3>Methods</h3>
856851
&#39;result&#39;: {
857852
&#39;request_headers&#39;: {},
858853
&#39;status&#39;: &#39;DONE&#39;,
859-
&#39;success&#39;: 200 &gt;= self.response.status_code &lt; 300,
854+
&#39;success&#39;: 200 &lt;= self.response.status_code &lt; 300,
860855
&#39;response_headers&#39;: self.response.headers,
861856
&#39;status_code&#39;: self.response.status_code,
862857
&#39;reason&#39;: self.response.reason,
@@ -924,7 +919,7 @@ <h3>Methods</h3>
924919
&#34;&#34;&#34;
925920
Success means Scrapfly api reply correctly to the call, but the scrape can be unsuccessful if the upstream reply with error status code
926921
&#34;&#34;&#34;
927-
return 200 &gt;= self.response.status_code &lt;= 299
922+
return 200 &lt;= self.response.status_code &lt;= 299
928923

929924
@property
930925
def scrape_success(self) -&gt; bool:
@@ -941,7 +936,7 @@ <h3>Methods</h3>
941936
return None
942937

943938
if self.scrape_success is False:
944-
return self.scrape_result[&#39;error&#39;]
939+
return self.scrape_result.get(&#39;error&#39;)
945940

946941
@property
947942
def upstream_status_code(self) -&gt; Optional[int]:
@@ -1170,11 +1165,11 @@ <h3>Class variables</h3>
11701165
<dl>
11711166
<dt id="scrapfly.api_response.ScrapeApiResponse.large_object_handler"><code class="name">var <span class="ident">large_object_handler</span> : Callable</code></dt>
11721167
<dd>
1173-
<div class="desc"></div>
1168+
<div class="desc"><p>The type of the None singleton.</p></div>
11741169
</dd>
11751170
<dt id="scrapfly.api_response.ScrapeApiResponse.scrape_config"><code class="name">var <span class="ident">scrape_config</span><a title="scrapfly.scrape_config.ScrapeConfig" href="scrape_config.html#scrapfly.scrape_config.ScrapeConfig">ScrapeConfig</a></code></dt>
11761171
<dd>
1177-
<div class="desc"></div>
1172+
<div class="desc"><p>The type of the None singleton.</p></div>
11781173
</dd>
11791174
</dl>
11801175
<h3>Instance variables</h3>
@@ -1236,7 +1231,7 @@ <h3>Instance variables</h3>
12361231
return None
12371232

12381233
if self.scrape_success is False:
1239-
return self.scrape_result[&#39;error&#39;]</code></pre>
1234+
return self.scrape_result.get(&#39;error&#39;)</code></pre>
12401235
</details>
12411236
<div class="desc"></div>
12421237
</dd>
@@ -1320,7 +1315,7 @@ <h3>Instance variables</h3>
13201315
&#34;&#34;&#34;
13211316
Success means Scrapfly api reply correctly to the call, but the scrape can be unsuccessful if the upstream reply with error status code
13221317
&#34;&#34;&#34;
1323-
return 200 &gt;= self.response.status_code &lt;= 299</code></pre>
1318+
return 200 &lt;= self.response.status_code &lt;= 299</code></pre>
13241319
</details>
13251320
<div class="desc"><p>Success means Scrapfly api reply correctly to the call, but the scrape can be unsuccessful if the upstream reply with error status code</p></div>
13261321
</dd>

docs/scrapfly/client.html

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -74,43 +74,43 @@ <h3>Class variables</h3>
7474
<dl>
7575
<dt id="scrapfly.client.ScraperAPI.MONITORING_ACCOUNT_AGGREGATION"><code class="name">var <span class="ident">MONITORING_ACCOUNT_AGGREGATION</span></code></dt>
7676
<dd>
77-
<div class="desc"></div>
77+
<div class="desc"><p>The type of the None singleton.</p></div>
7878
</dd>
7979
<dt id="scrapfly.client.ScraperAPI.MONITORING_DATA_FORMAT_PROMETHEUS"><code class="name">var <span class="ident">MONITORING_DATA_FORMAT_PROMETHEUS</span></code></dt>
8080
<dd>
81-
<div class="desc"></div>
81+
<div class="desc"><p>The type of the None singleton.</p></div>
8282
</dd>
8383
<dt id="scrapfly.client.ScraperAPI.MONITORING_DATA_FORMAT_STRUCTURED"><code class="name">var <span class="ident">MONITORING_DATA_FORMAT_STRUCTURED</span></code></dt>
8484
<dd>
85-
<div class="desc"></div>
85+
<div class="desc"><p>The type of the None singleton.</p></div>
8686
</dd>
8787
<dt id="scrapfly.client.ScraperAPI.MONITORING_PERIOD_LAST_1H"><code class="name">var <span class="ident">MONITORING_PERIOD_LAST_1H</span></code></dt>
8888
<dd>
89-
<div class="desc"></div>
89+
<div class="desc"><p>The type of the None singleton.</p></div>
9090
</dd>
9191
<dt id="scrapfly.client.ScraperAPI.MONITORING_PERIOD_LAST_24H"><code class="name">var <span class="ident">MONITORING_PERIOD_LAST_24H</span></code></dt>
9292
<dd>
93-
<div class="desc"></div>
93+
<div class="desc"><p>The type of the None singleton.</p></div>
9494
</dd>
9595
<dt id="scrapfly.client.ScraperAPI.MONITORING_PERIOD_LAST_5m"><code class="name">var <span class="ident">MONITORING_PERIOD_LAST_5m</span></code></dt>
9696
<dd>
97-
<div class="desc"></div>
97+
<div class="desc"><p>The type of the None singleton.</p></div>
9898
</dd>
9999
<dt id="scrapfly.client.ScraperAPI.MONITORING_PERIOD_LAST_7D"><code class="name">var <span class="ident">MONITORING_PERIOD_LAST_7D</span></code></dt>
100100
<dd>
101-
<div class="desc"></div>
101+
<div class="desc"><p>The type of the None singleton.</p></div>
102102
</dd>
103103
<dt id="scrapfly.client.ScraperAPI.MONITORING_PERIOD_SUBSCRIPTION"><code class="name">var <span class="ident">MONITORING_PERIOD_SUBSCRIPTION</span></code></dt>
104104
<dd>
105-
<div class="desc"></div>
105+
<div class="desc"><p>The type of the None singleton.</p></div>
106106
</dd>
107107
<dt id="scrapfly.client.ScraperAPI.MONITORING_PROJECT_AGGREGATION"><code class="name">var <span class="ident">MONITORING_PROJECT_AGGREGATION</span></code></dt>
108108
<dd>
109-
<div class="desc"></div>
109+
<div class="desc"><p>The type of the None singleton.</p></div>
110110
</dd>
111111
<dt id="scrapfly.client.ScraperAPI.MONITORING_TARGET_AGGREGATION"><code class="name">var <span class="ident">MONITORING_TARGET_AGGREGATION</span></code></dt>
112112
<dd>
113-
<div class="desc"></div>
113+
<div class="desc"><p>The type of the None singleton.</p></div>
114114
</dd>
115115
</dl>
116116
</dd>
@@ -1170,103 +1170,103 @@ <h3>Class variables</h3>
11701170
<dl>
11711171
<dt id="scrapfly.client.ScrapflyClient.CONCURRENCY_AUTO"><code class="name">var <span class="ident">CONCURRENCY_AUTO</span></code></dt>
11721172
<dd>
1173-
<div class="desc"></div>
1173+
<div class="desc"><p>The type of the None singleton.</p></div>
11741174
</dd>
11751175
<dt id="scrapfly.client.ScrapflyClient.DATETIME_FORMAT"><code class="name">var <span class="ident">DATETIME_FORMAT</span></code></dt>
11761176
<dd>
1177-
<div class="desc"></div>
1177+
<div class="desc"><p>The type of the None singleton.</p></div>
11781178
</dd>
11791179
<dt id="scrapfly.client.ScrapflyClient.DEFAULT_CONNECT_TIMEOUT"><code class="name">var <span class="ident">DEFAULT_CONNECT_TIMEOUT</span></code></dt>
11801180
<dd>
1181-
<div class="desc"></div>
1181+
<div class="desc"><p>The type of the None singleton.</p></div>
11821182
</dd>
11831183
<dt id="scrapfly.client.ScrapflyClient.DEFAULT_CRAWLER_API_READ_TIMEOUT"><code class="name">var <span class="ident">DEFAULT_CRAWLER_API_READ_TIMEOUT</span></code></dt>
11841184
<dd>
1185-
<div class="desc"></div>
1185+
<div class="desc"><p>The type of the None singleton.</p></div>
11861186
</dd>
11871187
<dt id="scrapfly.client.ScrapflyClient.DEFAULT_EXTRACTION_API_READ_TIMEOUT"><code class="name">var <span class="ident">DEFAULT_EXTRACTION_API_READ_TIMEOUT</span></code></dt>
11881188
<dd>
1189-
<div class="desc"></div>
1189+
<div class="desc"><p>The type of the None singleton.</p></div>
11901190
</dd>
11911191
<dt id="scrapfly.client.ScrapflyClient.DEFAULT_READ_TIMEOUT"><code class="name">var <span class="ident">DEFAULT_READ_TIMEOUT</span></code></dt>
11921192
<dd>
1193-
<div class="desc"></div>
1193+
<div class="desc"><p>The type of the None singleton.</p></div>
11941194
</dd>
11951195
<dt id="scrapfly.client.ScrapflyClient.DEFAULT_SCREENSHOT_API_READ_TIMEOUT"><code class="name">var <span class="ident">DEFAULT_SCREENSHOT_API_READ_TIMEOUT</span></code></dt>
11961196
<dd>
1197-
<div class="desc"></div>
1197+
<div class="desc"><p>The type of the None singleton.</p></div>
11981198
</dd>
11991199
<dt id="scrapfly.client.ScrapflyClient.DEFAULT_WEBSCRAPING_API_READ_TIMEOUT"><code class="name">var <span class="ident">DEFAULT_WEBSCRAPING_API_READ_TIMEOUT</span></code></dt>
12001200
<dd>
1201-
<div class="desc"></div>
1201+
<div class="desc"><p>The type of the None singleton.</p></div>
12021202
</dd>
12031203
<dt id="scrapfly.client.ScrapflyClient.HOST"><code class="name">var <span class="ident">HOST</span></code></dt>
12041204
<dd>
1205-
<div class="desc"></div>
1205+
<div class="desc"><p>The type of the None singleton.</p></div>
12061206
</dd>
12071207
<dt id="scrapfly.client.ScrapflyClient.brotli"><code class="name">var <span class="ident">brotli</span> : bool</code></dt>
12081208
<dd>
1209-
<div class="desc"></div>
1209+
<div class="desc"><p>The type of the None singleton.</p></div>
12101210
</dd>
12111211
<dt id="scrapfly.client.ScrapflyClient.connect_timeout"><code class="name">var <span class="ident">connect_timeout</span> : int</code></dt>
12121212
<dd>
1213-
<div class="desc"></div>
1213+
<div class="desc"><p>The type of the None singleton.</p></div>
12141214
</dd>
12151215
<dt id="scrapfly.client.ScrapflyClient.debug"><code class="name">var <span class="ident">debug</span> : bool</code></dt>
12161216
<dd>
1217-
<div class="desc"></div>
1217+
<div class="desc"><p>The type of the None singleton.</p></div>
12181218
</dd>
12191219
<dt id="scrapfly.client.ScrapflyClient.default_read_timeout"><code class="name">var <span class="ident">default_read_timeout</span> : int</code></dt>
12201220
<dd>
1221-
<div class="desc"></div>
1221+
<div class="desc"><p>The type of the None singleton.</p></div>
12221222
</dd>
12231223
<dt id="scrapfly.client.ScrapflyClient.distributed_mode"><code class="name">var <span class="ident">distributed_mode</span> : bool</code></dt>
12241224
<dd>
1225-
<div class="desc"></div>
1225+
<div class="desc"><p>The type of the None singleton.</p></div>
12261226
</dd>
12271227
<dt id="scrapfly.client.ScrapflyClient.extraction_api_read_timeout"><code class="name">var <span class="ident">extraction_api_read_timeout</span> : int</code></dt>
12281228
<dd>
1229-
<div class="desc"></div>
1229+
<div class="desc"><p>The type of the None singleton.</p></div>
12301230
</dd>
12311231
<dt id="scrapfly.client.ScrapflyClient.host"><code class="name">var <span class="ident">host</span> : str</code></dt>
12321232
<dd>
1233-
<div class="desc"></div>
1233+
<div class="desc"><p>The type of the None singleton.</p></div>
12341234
</dd>
12351235
<dt id="scrapfly.client.ScrapflyClient.key"><code class="name">var <span class="ident">key</span> : str</code></dt>
12361236
<dd>
1237-
<div class="desc"></div>
1237+
<div class="desc"><p>The type of the None singleton.</p></div>
12381238
</dd>
12391239
<dt id="scrapfly.client.ScrapflyClient.max_concurrency"><code class="name">var <span class="ident">max_concurrency</span> : int</code></dt>
12401240
<dd>
1241-
<div class="desc"></div>
1241+
<div class="desc"><p>The type of the None singleton.</p></div>
12421242
</dd>
12431243
<dt id="scrapfly.client.ScrapflyClient.monitoring_api_read_timeout"><code class="name">var <span class="ident">monitoring_api_read_timeout</span> : int</code></dt>
12441244
<dd>
1245-
<div class="desc"></div>
1245+
<div class="desc"><p>The type of the None singleton.</p></div>
12461246
</dd>
12471247
<dt id="scrapfly.client.ScrapflyClient.read_timeout"><code class="name">var <span class="ident">read_timeout</span> : int</code></dt>
12481248
<dd>
1249-
<div class="desc"></div>
1249+
<div class="desc"><p>The type of the None singleton.</p></div>
12501250
</dd>
12511251
<dt id="scrapfly.client.ScrapflyClient.reporter"><code class="name">var <span class="ident">reporter</span> : scrapfly.reporter.Reporter</code></dt>
12521252
<dd>
1253-
<div class="desc"></div>
1253+
<div class="desc"><p>The type of the None singleton.</p></div>
12541254
</dd>
12551255
<dt id="scrapfly.client.ScrapflyClient.screenshot_api_read_timeout"><code class="name">var <span class="ident">screenshot_api_read_timeout</span> : int</code></dt>
12561256
<dd>
1257-
<div class="desc"></div>
1257+
<div class="desc"><p>The type of the None singleton.</p></div>
12581258
</dd>
12591259
<dt id="scrapfly.client.ScrapflyClient.verify"><code class="name">var <span class="ident">verify</span> : bool</code></dt>
12601260
<dd>
1261-
<div class="desc"></div>
1261+
<div class="desc"><p>The type of the None singleton.</p></div>
12621262
</dd>
12631263
<dt id="scrapfly.client.ScrapflyClient.version"><code class="name">var <span class="ident">version</span> : str</code></dt>
12641264
<dd>
1265-
<div class="desc"></div>
1265+
<div class="desc"><p>The type of the None singleton.</p></div>
12661266
</dd>
12671267
<dt id="scrapfly.client.ScrapflyClient.web_scraping_api_read_timeout"><code class="name">var <span class="ident">web_scraping_api_read_timeout</span> : int</code></dt>
12681268
<dd>
1269-
<div class="desc"></div>
1269+
<div class="desc"><p>The type of the None singleton.</p></div>
12701270
</dd>
12711271
</dl>
12721272
<h3>Instance variables</h3>

docs/scrapfly/crawler/crawler_config.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -394,39 +394,39 @@ <h3>Class variables</h3>
394394
<dl>
395395
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.ALL_WEBHOOK_EVENTS"><code class="name">var <span class="ident">ALL_WEBHOOK_EVENTS</span></code></dt>
396396
<dd>
397-
<div class="desc"></div>
397+
<div class="desc"><p>The type of the None singleton.</p></div>
398398
</dd>
399399
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_CANCELLED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_CANCELLED</span></code></dt>
400400
<dd>
401-
<div class="desc"></div>
401+
<div class="desc"><p>The type of the None singleton.</p></div>
402402
</dd>
403403
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_FINISHED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_FINISHED</span></code></dt>
404404
<dd>
405-
<div class="desc"></div>
405+
<div class="desc"><p>The type of the None singleton.</p></div>
406406
</dd>
407407
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_STARTED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_STARTED</span></code></dt>
408408
<dd>
409-
<div class="desc"></div>
409+
<div class="desc"><p>The type of the None singleton.</p></div>
410410
</dd>
411411
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_STOPPED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_STOPPED</span></code></dt>
412412
<dd>
413-
<div class="desc"></div>
413+
<div class="desc"><p>The type of the None singleton.</p></div>
414414
</dd>
415415
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_URL_DISCOVERED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_URL_DISCOVERED</span></code></dt>
416416
<dd>
417-
<div class="desc"></div>
417+
<div class="desc"><p>The type of the None singleton.</p></div>
418418
</dd>
419419
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_URL_FAILED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_URL_FAILED</span></code></dt>
420420
<dd>
421-
<div class="desc"></div>
421+
<div class="desc"><p>The type of the None singleton.</p></div>
422422
</dd>
423423
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_URL_SKIPPED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_URL_SKIPPED</span></code></dt>
424424
<dd>
425-
<div class="desc"></div>
425+
<div class="desc"><p>The type of the None singleton.</p></div>
426426
</dd>
427427
<dt id="scrapfly.crawler.crawler_config.CrawlerConfig.WEBHOOK_CRAWLER_URL_VISITED"><code class="name">var <span class="ident">WEBHOOK_CRAWLER_URL_VISITED</span></code></dt>
428428
<dd>
429-
<div class="desc"></div>
429+
<div class="desc"><p>The type of the None singleton.</p></div>
430430
</dd>
431431
</dl>
432432
<h3>Methods</h3>

docs/scrapfly/crawler/crawler_response.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -682,27 +682,27 @@ <h3>Class variables</h3>
682682
<dl>
683683
<dt id="scrapfly.crawler.crawler_response.CrawlerStatusResponse.STATUS_CANCELLED"><code class="name">var <span class="ident">STATUS_CANCELLED</span></code></dt>
684684
<dd>
685-
<div class="desc"></div>
685+
<div class="desc"><p>The type of the None singleton.</p></div>
686686
</dd>
687687
<dt id="scrapfly.crawler.crawler_response.CrawlerStatusResponse.STATUS_COMPLETED"><code class="name">var <span class="ident">STATUS_COMPLETED</span></code></dt>
688688
<dd>
689-
<div class="desc"></div>
689+
<div class="desc"><p>The type of the None singleton.</p></div>
690690
</dd>
691691
<dt id="scrapfly.crawler.crawler_response.CrawlerStatusResponse.STATUS_DONE"><code class="name">var <span class="ident">STATUS_DONE</span></code></dt>
692692
<dd>
693-
<div class="desc"></div>
693+
<div class="desc"><p>The type of the None singleton.</p></div>
694694
</dd>
695695
<dt id="scrapfly.crawler.crawler_response.CrawlerStatusResponse.STATUS_FAILED"><code class="name">var <span class="ident">STATUS_FAILED</span></code></dt>
696696
<dd>
697-
<div class="desc"></div>
697+
<div class="desc"><p>The type of the None singleton.</p></div>
698698
</dd>
699699
<dt id="scrapfly.crawler.crawler_response.CrawlerStatusResponse.STATUS_PENDING"><code class="name">var <span class="ident">STATUS_PENDING</span></code></dt>
700700
<dd>
701-
<div class="desc"></div>
701+
<div class="desc"><p>The type of the None singleton.</p></div>
702702
</dd>
703703
<dt id="scrapfly.crawler.crawler_response.CrawlerStatusResponse.STATUS_RUNNING"><code class="name">var <span class="ident">STATUS_RUNNING</span></code></dt>
704704
<dd>
705-
<div class="desc"></div>
705+
<div class="desc"><p>The type of the None singleton.</p></div>
706706
</dd>
707707
</dl>
708708
<h3>Instance variables</h3>

0 commit comments

Comments
 (0)