|
| 1 | +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from typing import Dict |
| 6 | +from typing_extensions import Literal, Required, Annotated, TypedDict |
| 7 | + |
| 8 | +from .._types import SequenceNotStr |
| 9 | +from .._utils import PropertyInfo |
| 10 | + |
| 11 | +__all__ = ["WebWebScrapeBytesParams"] |
| 12 | + |
| 13 | + |
| 14 | +class WebWebScrapeBytesParams(TypedDict, total=False): |
| 15 | + url: Required[str] |
| 16 | + """Full HTTP(S) URL of the resource to download, such as an image, PDF, or page.""" |
| 17 | + |
| 18 | + country: Literal[ |
| 19 | + "ad", |
| 20 | + "ae", |
| 21 | + "af", |
| 22 | + "ag", |
| 23 | + "ai", |
| 24 | + "al", |
| 25 | + "am", |
| 26 | + "ao", |
| 27 | + "ar", |
| 28 | + "at", |
| 29 | + "au", |
| 30 | + "aw", |
| 31 | + "az", |
| 32 | + "ba", |
| 33 | + "bb", |
| 34 | + "bd", |
| 35 | + "be", |
| 36 | + "bf", |
| 37 | + "bg", |
| 38 | + "bh", |
| 39 | + "bi", |
| 40 | + "bj", |
| 41 | + "bm", |
| 42 | + "bn", |
| 43 | + "bo", |
| 44 | + "bq", |
| 45 | + "br", |
| 46 | + "bs", |
| 47 | + "bw", |
| 48 | + "by", |
| 49 | + "bz", |
| 50 | + "ca", |
| 51 | + "cd", |
| 52 | + "cf", |
| 53 | + "cg", |
| 54 | + "ch", |
| 55 | + "ci", |
| 56 | + "cl", |
| 57 | + "cm", |
| 58 | + "cn", |
| 59 | + "co", |
| 60 | + "cr", |
| 61 | + "cv", |
| 62 | + "cw", |
| 63 | + "cy", |
| 64 | + "cz", |
| 65 | + "de", |
| 66 | + "dj", |
| 67 | + "dk", |
| 68 | + "dm", |
| 69 | + "do", |
| 70 | + "dz", |
| 71 | + "ec", |
| 72 | + "ee", |
| 73 | + "eg", |
| 74 | + "es", |
| 75 | + "et", |
| 76 | + "fi", |
| 77 | + "fj", |
| 78 | + "fr", |
| 79 | + "ga", |
| 80 | + "gb", |
| 81 | + "gd", |
| 82 | + "ge", |
| 83 | + "gf", |
| 84 | + "gg", |
| 85 | + "gh", |
| 86 | + "gm", |
| 87 | + "gn", |
| 88 | + "gp", |
| 89 | + "gq", |
| 90 | + "gr", |
| 91 | + "gt", |
| 92 | + "gu", |
| 93 | + "gw", |
| 94 | + "gy", |
| 95 | + "hk", |
| 96 | + "hn", |
| 97 | + "hr", |
| 98 | + "ht", |
| 99 | + "hu", |
| 100 | + "id", |
| 101 | + "ie", |
| 102 | + "il", |
| 103 | + "im", |
| 104 | + "in", |
| 105 | + "iq", |
| 106 | + "ir", |
| 107 | + "is", |
| 108 | + "it", |
| 109 | + "je", |
| 110 | + "jm", |
| 111 | + "jo", |
| 112 | + "jp", |
| 113 | + "ke", |
| 114 | + "kg", |
| 115 | + "kh", |
| 116 | + "kn", |
| 117 | + "kr", |
| 118 | + "kw", |
| 119 | + "ky", |
| 120 | + "kz", |
| 121 | + "la", |
| 122 | + "lb", |
| 123 | + "lc", |
| 124 | + "lk", |
| 125 | + "lr", |
| 126 | + "ls", |
| 127 | + "lt", |
| 128 | + "lu", |
| 129 | + "lv", |
| 130 | + "ly", |
| 131 | + "ma", |
| 132 | + "mc", |
| 133 | + "md", |
| 134 | + "me", |
| 135 | + "mf", |
| 136 | + "mg", |
| 137 | + "mk", |
| 138 | + "ml", |
| 139 | + "mm", |
| 140 | + "mn", |
| 141 | + "mo", |
| 142 | + "mq", |
| 143 | + "mr", |
| 144 | + "mt", |
| 145 | + "mu", |
| 146 | + "mv", |
| 147 | + "mw", |
| 148 | + "mx", |
| 149 | + "my", |
| 150 | + "mz", |
| 151 | + "na", |
| 152 | + "nc", |
| 153 | + "ne", |
| 154 | + "ng", |
| 155 | + "ni", |
| 156 | + "nl", |
| 157 | + "no", |
| 158 | + "np", |
| 159 | + "nz", |
| 160 | + "om", |
| 161 | + "pa", |
| 162 | + "pe", |
| 163 | + "pf", |
| 164 | + "pg", |
| 165 | + "ph", |
| 166 | + "pk", |
| 167 | + "pl", |
| 168 | + "pr", |
| 169 | + "ps", |
| 170 | + "pt", |
| 171 | + "py", |
| 172 | + "qa", |
| 173 | + "re", |
| 174 | + "ro", |
| 175 | + "rs", |
| 176 | + "ru", |
| 177 | + "rw", |
| 178 | + "sa", |
| 179 | + "sc", |
| 180 | + "sd", |
| 181 | + "se", |
| 182 | + "sg", |
| 183 | + "si", |
| 184 | + "sk", |
| 185 | + "sl", |
| 186 | + "sm", |
| 187 | + "sn", |
| 188 | + "so", |
| 189 | + "sr", |
| 190 | + "ss", |
| 191 | + "st", |
| 192 | + "sv", |
| 193 | + "sx", |
| 194 | + "sy", |
| 195 | + "sz", |
| 196 | + "tc", |
| 197 | + "td", |
| 198 | + "tg", |
| 199 | + "th", |
| 200 | + "tj", |
| 201 | + "tl", |
| 202 | + "tm", |
| 203 | + "tn", |
| 204 | + "tr", |
| 205 | + "tt", |
| 206 | + "tw", |
| 207 | + "tz", |
| 208 | + "ua", |
| 209 | + "ug", |
| 210 | + "us", |
| 211 | + "uy", |
| 212 | + "uz", |
| 213 | + "vc", |
| 214 | + "ve", |
| 215 | + "vg", |
| 216 | + "vi", |
| 217 | + "vn", |
| 218 | + "ye", |
| 219 | + "yt", |
| 220 | + "za", |
| 221 | + "zm", |
| 222 | + "zw", |
| 223 | + ] |
| 224 | + """ |
| 225 | + Fetch the target page through a residential proxy in this country (ISO 3166-1 |
| 226 | + alpha-2). |
| 227 | + """ |
| 228 | + |
| 229 | + headers: Dict[str, str] |
| 230 | + """Optional outbound HTTP headers, such as Referer, Cookie, or Authorization. |
| 231 | +
|
| 232 | + Send as a JSON object or deep-object query params such as |
| 233 | + headers[Referer]=https://example.com/. Host, Content-Length, and hop-by-hop |
| 234 | + transport headers are rejected. Authorization and cookies are removed when a |
| 235 | + redirect changes origin. |
| 236 | + """ |
| 237 | + |
| 238 | + tags: SequenceNotStr[str] |
| 239 | + """Comma-separated tags for tracking request usage. |
| 240 | +
|
| 241 | + Up to 20 tags, each 1-50 characters. |
| 242 | + """ |
| 243 | + |
| 244 | + timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] |
| 245 | + """Optional timeout in milliseconds for the request. |
| 246 | +
|
| 247 | + If the request takes longer than this value, it will be aborted with a 408 |
| 248 | + status code. Maximum allowed value is 300000ms (5 minutes). |
| 249 | + """ |
| 250 | + |
| 251 | + zdr: Literal["enabled", "disabled"] |
| 252 | + """ |
| 253 | + Set to enabled to bypass shared caches and omit request and response content |
| 254 | + from retained usage logs. Requires zero data retention to be enabled for your |
| 255 | + organization (contact support@context.dev), otherwise the request fails with |
| 256 | + ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true. |
| 257 | + """ |
0 commit comments