decodo-sdk 2.4.0__tar.gz → 2.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/PKG-INFO +1 -14
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/README.md +0 -13
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/pyproject.toml +7 -1
- decodo_sdk-2.4.1/src/decodo/__init__.py +116 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/generate_targets.py +13 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/generated/targets.py +86 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/PKG-INFO +1 -14
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/SOURCES.txt +1 -0
- decodo_sdk-2.4.1/tests/test_generated_exports.py +41 -0
- decodo_sdk-2.4.0/src/decodo/__init__.py +0 -321
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/LICENSE +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/setup.cfg +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/api/__init__.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/api/web_scraping_api.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/client.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/__init__.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/codegen.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/__init__.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/generate_parameters.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/shared.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/types.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/errors.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/generated/__init__.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/generated/decodo.ir.json +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/generated/parameters.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/http.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/py.typed +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/__init__.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/build_target_meta.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/bundled_schema.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/constants.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/expand_path.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/remote_schema.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/resolve_latest_ir.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/schema/types.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/targets.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/types/__init__.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/types/data_api.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/types/requests.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/types/responses.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/dependency_links.txt +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/requires.txt +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/top_level.txt +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/tests/test_client.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/tests/test_data_api.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/tests/test_http.py +0 -0
- {decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/tests/test_web_scraping_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: decodo-sdk
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: Official Python SDK for the Decodo APIs
|
|
5
5
|
Author: Decodo
|
|
6
6
|
License: MIT License
|
|
@@ -595,13 +595,8 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
595
595
|
| Target | Parameter class | Description | Example input |
|
|
596
596
|
| ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
|
|
597
597
|
| `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
|
|
598
|
-
| `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
|
|
599
|
-
| `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
|
|
600
|
-
| `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
|
|
601
|
-
| `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
|
|
602
598
|
| `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
|
|
603
599
|
| `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
|
|
604
|
-
| `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
|
|
605
600
|
| `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
|
|
606
601
|
| `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
|
|
607
602
|
| `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
|
|
@@ -621,8 +616,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
621
616
|
| `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
|
|
622
617
|
| `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
|
|
623
618
|
| `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
|
|
624
|
-
| `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
|
|
625
|
-
| `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
|
|
626
619
|
|
|
627
620
|
### Social media
|
|
628
621
|
|
|
@@ -631,18 +624,14 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
631
624
|
| `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
|
|
632
625
|
| `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
|
|
633
626
|
| `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
|
|
634
|
-
| `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
|
|
635
627
|
| `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
|
|
636
|
-
| `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
|
|
637
628
|
| `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
|
|
638
|
-
| `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
|
|
639
629
|
| `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
|
|
640
630
|
| `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
|
|
641
631
|
| `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
|
|
642
632
|
| `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
|
|
643
633
|
| `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
|
|
644
634
|
| `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
|
|
645
|
-
| `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
|
|
646
635
|
|
|
647
636
|
### AI tools
|
|
648
637
|
|
|
@@ -671,8 +660,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
671
660
|
| `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
|
|
672
661
|
| `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
|
|
673
662
|
|
|
674
|
-
> `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
|
|
675
|
-
|
|
676
663
|
For the full target list and parameter details, see the API documentation:
|
|
677
664
|
|
|
678
665
|
- [Target list](https://help.decodo.com/docs/web-scraping-api-targets)
|
|
@@ -545,13 +545,8 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
545
545
|
| Target | Parameter class | Description | Example input |
|
|
546
546
|
| ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
|
|
547
547
|
| `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
|
|
548
|
-
| `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
|
|
549
|
-
| `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
|
|
550
|
-
| `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
|
|
551
|
-
| `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
|
|
552
548
|
| `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
|
|
553
549
|
| `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
|
|
554
|
-
| `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
|
|
555
550
|
| `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
|
|
556
551
|
| `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
|
|
557
552
|
| `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
|
|
@@ -571,8 +566,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
571
566
|
| `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
|
|
572
567
|
| `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
|
|
573
568
|
| `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
|
|
574
|
-
| `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
|
|
575
|
-
| `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
|
|
576
569
|
|
|
577
570
|
### Social media
|
|
578
571
|
|
|
@@ -581,18 +574,14 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
581
574
|
| `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
|
|
582
575
|
| `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
|
|
583
576
|
| `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
|
|
584
|
-
| `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
|
|
585
577
|
| `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
|
|
586
|
-
| `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
|
|
587
578
|
| `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
|
|
588
|
-
| `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
|
|
589
579
|
| `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
|
|
590
580
|
| `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
|
|
591
581
|
| `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
|
|
592
582
|
| `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
|
|
593
583
|
| `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
|
|
594
584
|
| `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
|
|
595
|
-
| `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
|
|
596
585
|
|
|
597
586
|
### AI tools
|
|
598
587
|
|
|
@@ -621,8 +610,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
621
610
|
| `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
|
|
622
611
|
| `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
|
|
623
612
|
|
|
624
|
-
> `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
|
|
625
|
-
|
|
626
613
|
For the full target list and parameter details, see the API documentation:
|
|
627
614
|
|
|
628
615
|
- [Target list](https://help.decodo.com/docs/web-scraping-api-targets)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "decodo-sdk"
|
|
3
|
-
version = "2.4.
|
|
3
|
+
version = "2.4.1"
|
|
4
4
|
description = "Official Python SDK for the Decodo APIs"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -65,3 +65,9 @@ ignore_errors = true
|
|
|
65
65
|
[tool.pytest.ini_options]
|
|
66
66
|
testpaths = ["tests"]
|
|
67
67
|
|
|
68
|
+
[tool.semantic_release]
|
|
69
|
+
version_toml = ["pyproject.toml:project.version"]
|
|
70
|
+
commit_parser = "conventional"
|
|
71
|
+
|
|
72
|
+
[tool.semantic_release.branches.main]
|
|
73
|
+
match = "main"
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
from .api.web_scraping_api import WebScrapingApi, WebScrapingApiRoutes
|
|
2
|
+
from .client import DecodoClient, DecodoConfig, WebScrapingApiConfig
|
|
3
|
+
from .errors import (
|
|
4
|
+
AuthenticationError,
|
|
5
|
+
CrawlError,
|
|
6
|
+
CrawlInterruptedError,
|
|
7
|
+
CrawlTimeoutError,
|
|
8
|
+
DecodoError,
|
|
9
|
+
RateLimitError,
|
|
10
|
+
TimeoutError,
|
|
11
|
+
ValidationError,
|
|
12
|
+
)
|
|
13
|
+
from .schema.bundled_schema import BundledSchema
|
|
14
|
+
from .schema.remote_schema import RemoteSchema
|
|
15
|
+
from .schema.types import DecodoSchema, RemoteSchemaLoadOptions
|
|
16
|
+
from .targets import Target, targets
|
|
17
|
+
from .types.data_api import (
|
|
18
|
+
CrawlPage,
|
|
19
|
+
CrawlPagesResponse,
|
|
20
|
+
CrawlRequest,
|
|
21
|
+
CrawlResponse,
|
|
22
|
+
CrawlStatus,
|
|
23
|
+
CrawlStatusResponse,
|
|
24
|
+
MapRequest,
|
|
25
|
+
MapResponse,
|
|
26
|
+
SearchRequest,
|
|
27
|
+
SearchResponse,
|
|
28
|
+
)
|
|
29
|
+
from .types.responses import (
|
|
30
|
+
AsyncTaskResponse,
|
|
31
|
+
BatchResponse,
|
|
32
|
+
ResultEntry,
|
|
33
|
+
SyncResponse,
|
|
34
|
+
TaskMetadata,
|
|
35
|
+
TaskResultsResponse,
|
|
36
|
+
TaskStatus,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
_GENERATED_PARAMETER_NAMES = ("ParameterMeta", "parameter_meta")
|
|
40
|
+
|
|
41
|
+
_codegen_available = False
|
|
42
|
+
_CODEGEN_NAMES: frozenset[str] = frozenset()
|
|
43
|
+
try:
|
|
44
|
+
from .generated import targets as _generated_targets
|
|
45
|
+
from .generated.parameters import ParameterMeta, parameter_meta # noqa: F401
|
|
46
|
+
|
|
47
|
+
# Read before the star import: generated files from before __all__ was emitted
|
|
48
|
+
# fall through to the "run codegen" hint instead of re-exporting their imports.
|
|
49
|
+
_CODEGEN_NAMES = frozenset([*_GENERATED_PARAMETER_NAMES, *_generated_targets.__all__])
|
|
50
|
+
from .generated.targets import * # noqa: F403
|
|
51
|
+
|
|
52
|
+
_codegen_available = True
|
|
53
|
+
except (ImportError, AttributeError):
|
|
54
|
+
_CODEGEN_NAMES = frozenset()
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _is_codegen_name(name: str) -> bool:
|
|
58
|
+
return name.endswith("Params") or name in {
|
|
59
|
+
*_GENERATED_PARAMETER_NAMES,
|
|
60
|
+
"ScrapeRequest",
|
|
61
|
+
"BatchRequest",
|
|
62
|
+
"target_meta",
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def __getattr__(name: str) -> object:
|
|
67
|
+
if not _codegen_available and _is_codegen_name(name):
|
|
68
|
+
raise ImportError(
|
|
69
|
+
f"'{name}' requires generated types. "
|
|
70
|
+
"Editable install: run python -m decodo.codegen.codegen, then use 'from decodo import ...'. "
|
|
71
|
+
"Pip install: run python -m decodo.codegen.codegen --out-dir ./decodo_generated, "
|
|
72
|
+
"then use 'from decodo_generated.targets import ...'."
|
|
73
|
+
)
|
|
74
|
+
raise AttributeError(f"module 'decodo' has no attribute {name!r}")
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
__all__ = [
|
|
78
|
+
"DecodoClient",
|
|
79
|
+
"DecodoConfig",
|
|
80
|
+
"WebScrapingApiConfig",
|
|
81
|
+
"WebScrapingApi",
|
|
82
|
+
"WebScrapingApiRoutes",
|
|
83
|
+
"BundledSchema",
|
|
84
|
+
"RemoteSchema",
|
|
85
|
+
"DecodoSchema",
|
|
86
|
+
"RemoteSchemaLoadOptions",
|
|
87
|
+
"Target",
|
|
88
|
+
"targets",
|
|
89
|
+
"SyncResponse",
|
|
90
|
+
"AsyncTaskResponse",
|
|
91
|
+
"BatchResponse",
|
|
92
|
+
"TaskMetadata",
|
|
93
|
+
"TaskResultsResponse",
|
|
94
|
+
"TaskStatus",
|
|
95
|
+
"ResultEntry",
|
|
96
|
+
"SearchRequest",
|
|
97
|
+
"SearchResponse",
|
|
98
|
+
"MapRequest",
|
|
99
|
+
"MapResponse",
|
|
100
|
+
"CrawlRequest",
|
|
101
|
+
"CrawlResponse",
|
|
102
|
+
"CrawlStatusResponse",
|
|
103
|
+
"CrawlStatus",
|
|
104
|
+
"CrawlPage",
|
|
105
|
+
"CrawlPagesResponse",
|
|
106
|
+
"DecodoError",
|
|
107
|
+
"AuthenticationError",
|
|
108
|
+
"RateLimitError",
|
|
109
|
+
"ValidationError",
|
|
110
|
+
"TimeoutError",
|
|
111
|
+
"CrawlError",
|
|
112
|
+
"CrawlInterruptedError",
|
|
113
|
+
"CrawlTimeoutError",
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
__all__ += sorted(_CODEGEN_NAMES)
|
{decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/generate_targets.py
RENAMED
|
@@ -191,6 +191,19 @@ def _get_targets_file_contents(api: WebScrapingApiIR) -> str:
|
|
|
191
191
|
lines.append("]")
|
|
192
192
|
lines.append("")
|
|
193
193
|
|
|
194
|
+
exported = [
|
|
195
|
+
*(_class_name(k) for k in target_keys),
|
|
196
|
+
*(_batch_class_name(k) for k in target_keys),
|
|
197
|
+
"ScrapeRequest",
|
|
198
|
+
"BatchRequest",
|
|
199
|
+
"target_meta",
|
|
200
|
+
]
|
|
201
|
+
lines.append("__all__ = [")
|
|
202
|
+
for name in exported:
|
|
203
|
+
lines.append(f" {json.dumps(name)},")
|
|
204
|
+
lines.append("]")
|
|
205
|
+
lines.append("")
|
|
206
|
+
|
|
194
207
|
return "\n".join(lines)
|
|
195
208
|
|
|
196
209
|
|
|
@@ -1237,3 +1237,89 @@ BatchRequest = Annotated[
|
|
|
1237
1237
|
Union[GoogleSearchBatchParams | GoogleTravelHotelsBatchParams | GoogleBatchParams | GoogleAiModeBatchParams | GoogleAdsBatchParams | GoogleLensBatchParams | BingSearchBatchParams | BingBatchParams | AmazonProductBatchParams | AmazonPricingBatchParams | AmazonSearchBatchParams | AmazonSellersBatchParams | AmazonBestsellersBatchParams | AmazonBatchParams | WalmartProductBatchParams | WalmartSearchBatchParams | WalmartBatchParams | TargetProductBatchParams | TargetSearchBatchParams | TargetStoreBatchParams | UniversalBatchParams | ChatgptBatchParams | PerplexityBatchParams | GeminiBatchParams | BbbBatchParams | AutotraderBatchParams | MobileBatchParams | AirbnbBatchParams | AppleAppStoreBatchParams | TiktokPostBatchParams | TiktokShopSearchBatchParams | TiktokShopProductBatchParams | TiktokBatchParams | RedditPostBatchParams | RedditSubredditBatchParams | RedditUserBatchParams | YoutubeMetadataBatchParams | YoutubeSearchBatchParams | YoutubeSubtitlesBatchParams | YoutubeChannelBatchParams],
|
|
1238
1238
|
pydantic.Field(discriminator='target'),
|
|
1239
1239
|
]
|
|
1240
|
+
|
|
1241
|
+
__all__ = [
|
|
1242
|
+
"GoogleSearchParams",
|
|
1243
|
+
"GoogleTravelHotelsParams",
|
|
1244
|
+
"GoogleParams",
|
|
1245
|
+
"GoogleAiModeParams",
|
|
1246
|
+
"GoogleAdsParams",
|
|
1247
|
+
"GoogleLensParams",
|
|
1248
|
+
"BingSearchParams",
|
|
1249
|
+
"BingParams",
|
|
1250
|
+
"AmazonProductParams",
|
|
1251
|
+
"AmazonPricingParams",
|
|
1252
|
+
"AmazonSearchParams",
|
|
1253
|
+
"AmazonSellersParams",
|
|
1254
|
+
"AmazonBestsellersParams",
|
|
1255
|
+
"AmazonParams",
|
|
1256
|
+
"WalmartProductParams",
|
|
1257
|
+
"WalmartSearchParams",
|
|
1258
|
+
"WalmartParams",
|
|
1259
|
+
"TargetProductParams",
|
|
1260
|
+
"TargetSearchParams",
|
|
1261
|
+
"TargetStoreParams",
|
|
1262
|
+
"UniversalParams",
|
|
1263
|
+
"ChatgptParams",
|
|
1264
|
+
"PerplexityParams",
|
|
1265
|
+
"GeminiParams",
|
|
1266
|
+
"BbbParams",
|
|
1267
|
+
"AutotraderParams",
|
|
1268
|
+
"MobileParams",
|
|
1269
|
+
"AirbnbParams",
|
|
1270
|
+
"AppleAppStoreParams",
|
|
1271
|
+
"TiktokPostParams",
|
|
1272
|
+
"TiktokShopSearchParams",
|
|
1273
|
+
"TiktokShopProductParams",
|
|
1274
|
+
"TiktokParams",
|
|
1275
|
+
"RedditPostParams",
|
|
1276
|
+
"RedditSubredditParams",
|
|
1277
|
+
"RedditUserParams",
|
|
1278
|
+
"YoutubeMetadataParams",
|
|
1279
|
+
"YoutubeSearchParams",
|
|
1280
|
+
"YoutubeSubtitlesParams",
|
|
1281
|
+
"YoutubeChannelParams",
|
|
1282
|
+
"GoogleSearchBatchParams",
|
|
1283
|
+
"GoogleTravelHotelsBatchParams",
|
|
1284
|
+
"GoogleBatchParams",
|
|
1285
|
+
"GoogleAiModeBatchParams",
|
|
1286
|
+
"GoogleAdsBatchParams",
|
|
1287
|
+
"GoogleLensBatchParams",
|
|
1288
|
+
"BingSearchBatchParams",
|
|
1289
|
+
"BingBatchParams",
|
|
1290
|
+
"AmazonProductBatchParams",
|
|
1291
|
+
"AmazonPricingBatchParams",
|
|
1292
|
+
"AmazonSearchBatchParams",
|
|
1293
|
+
"AmazonSellersBatchParams",
|
|
1294
|
+
"AmazonBestsellersBatchParams",
|
|
1295
|
+
"AmazonBatchParams",
|
|
1296
|
+
"WalmartProductBatchParams",
|
|
1297
|
+
"WalmartSearchBatchParams",
|
|
1298
|
+
"WalmartBatchParams",
|
|
1299
|
+
"TargetProductBatchParams",
|
|
1300
|
+
"TargetSearchBatchParams",
|
|
1301
|
+
"TargetStoreBatchParams",
|
|
1302
|
+
"UniversalBatchParams",
|
|
1303
|
+
"ChatgptBatchParams",
|
|
1304
|
+
"PerplexityBatchParams",
|
|
1305
|
+
"GeminiBatchParams",
|
|
1306
|
+
"BbbBatchParams",
|
|
1307
|
+
"AutotraderBatchParams",
|
|
1308
|
+
"MobileBatchParams",
|
|
1309
|
+
"AirbnbBatchParams",
|
|
1310
|
+
"AppleAppStoreBatchParams",
|
|
1311
|
+
"TiktokPostBatchParams",
|
|
1312
|
+
"TiktokShopSearchBatchParams",
|
|
1313
|
+
"TiktokShopProductBatchParams",
|
|
1314
|
+
"TiktokBatchParams",
|
|
1315
|
+
"RedditPostBatchParams",
|
|
1316
|
+
"RedditSubredditBatchParams",
|
|
1317
|
+
"RedditUserBatchParams",
|
|
1318
|
+
"YoutubeMetadataBatchParams",
|
|
1319
|
+
"YoutubeSearchBatchParams",
|
|
1320
|
+
"YoutubeSubtitlesBatchParams",
|
|
1321
|
+
"YoutubeChannelBatchParams",
|
|
1322
|
+
"ScrapeRequest",
|
|
1323
|
+
"BatchRequest",
|
|
1324
|
+
"target_meta",
|
|
1325
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: decodo-sdk
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Summary: Official Python SDK for the Decodo APIs
|
|
5
5
|
Author: Decodo
|
|
6
6
|
License: MIT License
|
|
@@ -595,13 +595,8 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
595
595
|
| Target | Parameter class | Description | Example input |
|
|
596
596
|
| ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
|
|
597
597
|
| `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
|
|
598
|
-
| `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
|
|
599
|
-
| `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
|
|
600
|
-
| `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
|
|
601
|
-
| `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
|
|
602
598
|
| `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
|
|
603
599
|
| `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
|
|
604
|
-
| `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
|
|
605
600
|
| `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
|
|
606
601
|
| `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
|
|
607
602
|
| `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
|
|
@@ -621,8 +616,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
621
616
|
| `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
|
|
622
617
|
| `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
|
|
623
618
|
| `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
|
|
624
|
-
| `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
|
|
625
|
-
| `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
|
|
626
619
|
|
|
627
620
|
### Social media
|
|
628
621
|
|
|
@@ -631,18 +624,14 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
631
624
|
| `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
|
|
632
625
|
| `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
|
|
633
626
|
| `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
|
|
634
|
-
| `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
|
|
635
627
|
| `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
|
|
636
|
-
| `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
|
|
637
628
|
| `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
|
|
638
|
-
| `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
|
|
639
629
|
| `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
|
|
640
630
|
| `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
|
|
641
631
|
| `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
|
|
642
632
|
| `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
|
|
643
633
|
| `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
|
|
644
634
|
| `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
|
|
645
|
-
| `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
|
|
646
635
|
|
|
647
636
|
### AI tools
|
|
648
637
|
|
|
@@ -671,8 +660,6 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
|
|
|
671
660
|
| `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
|
|
672
661
|
| `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
|
|
673
662
|
|
|
674
|
-
> `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
|
|
675
|
-
|
|
676
663
|
For the full target list and parameter details, see the API documentation:
|
|
677
664
|
|
|
678
665
|
- [Target list](https://help.decodo.com/docs/web-scraping-api-targets)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
import pytest
|
|
6
|
+
|
|
7
|
+
import decodo
|
|
8
|
+
from decodo.codegen.web_scraping_api.generate_targets import _get_targets_file_contents
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TestGeneratedTargetsAll:
|
|
12
|
+
def test_all_lists_every_generated_class_and_union(self, minimal_ir: dict[str, Any]) -> None:
|
|
13
|
+
namespace: dict[str, Any] = {}
|
|
14
|
+
exec(_get_targets_file_contents(minimal_ir["apis"]["webScrapingApi"]), namespace)
|
|
15
|
+
|
|
16
|
+
assert namespace["__all__"] == [
|
|
17
|
+
"GoogleSearchParams",
|
|
18
|
+
"GoogleSearchBatchParams",
|
|
19
|
+
"ScrapeRequest",
|
|
20
|
+
"BatchRequest",
|
|
21
|
+
"target_meta",
|
|
22
|
+
]
|
|
23
|
+
for name in namespace["__all__"]:
|
|
24
|
+
assert name in namespace
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.mark.skipif(not decodo._codegen_available, reason="generated types not present")
|
|
28
|
+
class TestPackageExports:
|
|
29
|
+
def test_every_generated_name_is_importable_from_decodo(self) -> None:
|
|
30
|
+
from decodo.generated import parameters, targets
|
|
31
|
+
|
|
32
|
+
for name in targets.__all__:
|
|
33
|
+
assert getattr(decodo, name) is getattr(targets, name)
|
|
34
|
+
assert name in decodo.__all__
|
|
35
|
+
for name in ["ParameterMeta", "parameter_meta"]:
|
|
36
|
+
assert getattr(decodo, name) is getattr(parameters, name)
|
|
37
|
+
assert name in decodo.__all__
|
|
38
|
+
|
|
39
|
+
def test_target_absent_from_ir_raises_attribute_error(self) -> None:
|
|
40
|
+
with pytest.raises(AttributeError):
|
|
41
|
+
decodo.NoSuchTargetParams # noqa: B018
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
from .api.web_scraping_api import WebScrapingApi, WebScrapingApiRoutes
|
|
2
|
-
from .client import DecodoClient, DecodoConfig, WebScrapingApiConfig
|
|
3
|
-
from .errors import (
|
|
4
|
-
AuthenticationError,
|
|
5
|
-
CrawlError,
|
|
6
|
-
CrawlInterruptedError,
|
|
7
|
-
CrawlTimeoutError,
|
|
8
|
-
DecodoError,
|
|
9
|
-
RateLimitError,
|
|
10
|
-
TimeoutError,
|
|
11
|
-
ValidationError,
|
|
12
|
-
)
|
|
13
|
-
from .schema.bundled_schema import BundledSchema
|
|
14
|
-
from .schema.remote_schema import RemoteSchema
|
|
15
|
-
from .schema.types import DecodoSchema, RemoteSchemaLoadOptions
|
|
16
|
-
from .targets import Target, targets
|
|
17
|
-
from .types.data_api import (
|
|
18
|
-
CrawlPage,
|
|
19
|
-
CrawlPagesResponse,
|
|
20
|
-
CrawlRequest,
|
|
21
|
-
CrawlResponse,
|
|
22
|
-
CrawlStatus,
|
|
23
|
-
CrawlStatusResponse,
|
|
24
|
-
MapRequest,
|
|
25
|
-
MapResponse,
|
|
26
|
-
SearchRequest,
|
|
27
|
-
SearchResponse,
|
|
28
|
-
)
|
|
29
|
-
from .types.responses import (
|
|
30
|
-
AsyncTaskResponse,
|
|
31
|
-
BatchResponse,
|
|
32
|
-
ResultEntry,
|
|
33
|
-
SyncResponse,
|
|
34
|
-
TaskMetadata,
|
|
35
|
-
TaskResultsResponse,
|
|
36
|
-
TaskStatus,
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
_codegen_available = False
|
|
40
|
-
try:
|
|
41
|
-
from .generated.parameters import ParameterMeta, parameter_meta # noqa: F401
|
|
42
|
-
from .generated.targets import ( # noqa: F401
|
|
43
|
-
AirbnbBatchParams,
|
|
44
|
-
AirbnbParams,
|
|
45
|
-
AmazonBatchParams,
|
|
46
|
-
AmazonBestsellersBatchParams,
|
|
47
|
-
AmazonBestsellersParams,
|
|
48
|
-
AmazonParams,
|
|
49
|
-
AmazonPricingBatchParams,
|
|
50
|
-
AmazonPricingParams,
|
|
51
|
-
AmazonProductBatchParams,
|
|
52
|
-
AmazonProductParams,
|
|
53
|
-
AmazonSearchBatchParams,
|
|
54
|
-
AmazonSearchParams,
|
|
55
|
-
AmazonSellersBatchParams,
|
|
56
|
-
AmazonSellersParams,
|
|
57
|
-
AppleAppStoreBatchParams,
|
|
58
|
-
AppleAppStoreParams,
|
|
59
|
-
AutotraderBatchParams,
|
|
60
|
-
AutotraderParams,
|
|
61
|
-
BatchRequest,
|
|
62
|
-
BbbBatchParams,
|
|
63
|
-
BbbParams,
|
|
64
|
-
BingBatchParams,
|
|
65
|
-
BingParams,
|
|
66
|
-
BingSearchBatchParams,
|
|
67
|
-
BingSearchParams,
|
|
68
|
-
ChatgptBatchParams,
|
|
69
|
-
ChatgptParams,
|
|
70
|
-
EcommerceBatchParams,
|
|
71
|
-
EcommerceParams,
|
|
72
|
-
GeminiBatchParams,
|
|
73
|
-
GeminiParams,
|
|
74
|
-
GoogleAdsBatchParams,
|
|
75
|
-
GoogleAdsParams,
|
|
76
|
-
GoogleAiModeBatchParams,
|
|
77
|
-
GoogleAiModeParams,
|
|
78
|
-
GoogleBatchParams,
|
|
79
|
-
GoogleLensBatchParams,
|
|
80
|
-
GoogleLensParams,
|
|
81
|
-
GoogleMapsBatchParams,
|
|
82
|
-
GoogleMapsParams,
|
|
83
|
-
GoogleParams,
|
|
84
|
-
GoogleSearchBatchParams,
|
|
85
|
-
GoogleSearchParams,
|
|
86
|
-
GoogleShoppingProductBatchParams,
|
|
87
|
-
GoogleShoppingProductParams,
|
|
88
|
-
GoogleShoppingSearchBatchParams,
|
|
89
|
-
GoogleShoppingSearchParams,
|
|
90
|
-
GoogleSuggestBatchParams,
|
|
91
|
-
GoogleSuggestParams,
|
|
92
|
-
GoogleTravelHotelsBatchParams,
|
|
93
|
-
GoogleTravelHotelsParams,
|
|
94
|
-
GoogleTrendsExploreBatchParams,
|
|
95
|
-
GoogleTrendsExploreParams,
|
|
96
|
-
InstagramGraphqlProfileBatchParams,
|
|
97
|
-
InstagramGraphqlProfileParams,
|
|
98
|
-
LowesSearchBatchParams,
|
|
99
|
-
LowesSearchParams,
|
|
100
|
-
MobileBatchParams,
|
|
101
|
-
MobileParams,
|
|
102
|
-
PerplexityBatchParams,
|
|
103
|
-
PerplexityParams,
|
|
104
|
-
RedditPostBatchParams,
|
|
105
|
-
RedditPostParams,
|
|
106
|
-
RedditSubredditBatchParams,
|
|
107
|
-
RedditSubredditParams,
|
|
108
|
-
RedditUserBatchParams,
|
|
109
|
-
RedditUserParams,
|
|
110
|
-
ScrapeRequest,
|
|
111
|
-
TargetProductBatchParams,
|
|
112
|
-
TargetProductParams,
|
|
113
|
-
TargetSearchBatchParams,
|
|
114
|
-
TargetSearchParams,
|
|
115
|
-
TargetStoreBatchParams,
|
|
116
|
-
TargetStoreParams,
|
|
117
|
-
TiktokBatchParams,
|
|
118
|
-
TiktokParams,
|
|
119
|
-
TiktokPostBatchParams,
|
|
120
|
-
TiktokPostParams,
|
|
121
|
-
TiktokShopProductBatchParams,
|
|
122
|
-
TiktokShopProductParams,
|
|
123
|
-
TiktokShopSearchBatchParams,
|
|
124
|
-
TiktokShopSearchParams,
|
|
125
|
-
UniversalBatchParams,
|
|
126
|
-
UniversalEcommerceBatchParams,
|
|
127
|
-
UniversalEcommerceParams,
|
|
128
|
-
UniversalParams,
|
|
129
|
-
WalmartBatchParams,
|
|
130
|
-
WalmartParams,
|
|
131
|
-
WalmartProductBatchParams,
|
|
132
|
-
WalmartProductParams,
|
|
133
|
-
WalmartSearchBatchParams,
|
|
134
|
-
WalmartSearchParams,
|
|
135
|
-
YoutubeChannelBatchParams,
|
|
136
|
-
YoutubeChannelParams,
|
|
137
|
-
YoutubeMetadataBatchParams,
|
|
138
|
-
YoutubeMetadataParams,
|
|
139
|
-
YoutubeSearchBatchParams,
|
|
140
|
-
YoutubeSearchMaxBatchParams,
|
|
141
|
-
YoutubeSearchMaxParams,
|
|
142
|
-
YoutubeSearchParams,
|
|
143
|
-
YoutubeSubtitlesBatchParams,
|
|
144
|
-
YoutubeSubtitlesParams,
|
|
145
|
-
YoutubeTranscriptBatchParams,
|
|
146
|
-
YoutubeTranscriptParams,
|
|
147
|
-
YoutubeVideoBatchParams,
|
|
148
|
-
YoutubeVideoParams,
|
|
149
|
-
target_meta,
|
|
150
|
-
)
|
|
151
|
-
_codegen_available = True
|
|
152
|
-
except ImportError:
|
|
153
|
-
pass
|
|
154
|
-
|
|
155
|
-
_CODEGEN_NAMES: frozenset[str] = frozenset(
|
|
156
|
-
[
|
|
157
|
-
"AirbnbBatchParams",
|
|
158
|
-
"AirbnbParams",
|
|
159
|
-
"AmazonBatchParams",
|
|
160
|
-
"AmazonBestsellersBatchParams",
|
|
161
|
-
"AmazonBestsellersParams",
|
|
162
|
-
"AmazonParams",
|
|
163
|
-
"AmazonPricingBatchParams",
|
|
164
|
-
"AmazonPricingParams",
|
|
165
|
-
"AmazonProductBatchParams",
|
|
166
|
-
"AmazonProductParams",
|
|
167
|
-
"AmazonSearchBatchParams",
|
|
168
|
-
"AmazonSearchParams",
|
|
169
|
-
"AmazonSellersBatchParams",
|
|
170
|
-
"AmazonSellersParams",
|
|
171
|
-
"AppleAppStoreBatchParams",
|
|
172
|
-
"AppleAppStoreParams",
|
|
173
|
-
"AutotraderBatchParams",
|
|
174
|
-
"AutotraderParams",
|
|
175
|
-
"BatchRequest",
|
|
176
|
-
"BbbBatchParams",
|
|
177
|
-
"BbbParams",
|
|
178
|
-
"BingBatchParams",
|
|
179
|
-
"BingParams",
|
|
180
|
-
"BingSearchBatchParams",
|
|
181
|
-
"BingSearchParams",
|
|
182
|
-
"ChatgptBatchParams",
|
|
183
|
-
"ChatgptParams",
|
|
184
|
-
"EcommerceBatchParams",
|
|
185
|
-
"EcommerceParams",
|
|
186
|
-
"GeminiBatchParams",
|
|
187
|
-
"GeminiParams",
|
|
188
|
-
"GoogleAdsBatchParams",
|
|
189
|
-
"GoogleAdsParams",
|
|
190
|
-
"GoogleAiModeBatchParams",
|
|
191
|
-
"GoogleAiModeParams",
|
|
192
|
-
"GoogleBatchParams",
|
|
193
|
-
"GoogleLensBatchParams",
|
|
194
|
-
"GoogleLensParams",
|
|
195
|
-
"GoogleMapsBatchParams",
|
|
196
|
-
"GoogleMapsParams",
|
|
197
|
-
"GoogleParams",
|
|
198
|
-
"GoogleSearchBatchParams",
|
|
199
|
-
"GoogleSearchParams",
|
|
200
|
-
"GoogleShoppingProductBatchParams",
|
|
201
|
-
"GoogleShoppingProductParams",
|
|
202
|
-
"GoogleShoppingSearchBatchParams",
|
|
203
|
-
"GoogleShoppingSearchParams",
|
|
204
|
-
"GoogleSuggestBatchParams",
|
|
205
|
-
"GoogleSuggestParams",
|
|
206
|
-
"GoogleTravelHotelsBatchParams",
|
|
207
|
-
"GoogleTravelHotelsParams",
|
|
208
|
-
"GoogleTrendsExploreBatchParams",
|
|
209
|
-
"GoogleTrendsExploreParams",
|
|
210
|
-
"InstagramGraphqlProfileBatchParams",
|
|
211
|
-
"InstagramGraphqlProfileParams",
|
|
212
|
-
"LowesSearchBatchParams",
|
|
213
|
-
"LowesSearchParams",
|
|
214
|
-
"MobileBatchParams",
|
|
215
|
-
"MobileParams",
|
|
216
|
-
"ParameterMeta",
|
|
217
|
-
"PerplexityBatchParams",
|
|
218
|
-
"PerplexityParams",
|
|
219
|
-
"RedditPostBatchParams",
|
|
220
|
-
"RedditPostParams",
|
|
221
|
-
"RedditSubredditBatchParams",
|
|
222
|
-
"RedditSubredditParams",
|
|
223
|
-
"RedditUserBatchParams",
|
|
224
|
-
"RedditUserParams",
|
|
225
|
-
"ScrapeRequest",
|
|
226
|
-
"TargetProductBatchParams",
|
|
227
|
-
"TargetProductParams",
|
|
228
|
-
"TargetSearchBatchParams",
|
|
229
|
-
"TargetSearchParams",
|
|
230
|
-
"TargetStoreBatchParams",
|
|
231
|
-
"TargetStoreParams",
|
|
232
|
-
"TiktokBatchParams",
|
|
233
|
-
"TiktokParams",
|
|
234
|
-
"TiktokPostBatchParams",
|
|
235
|
-
"TiktokPostParams",
|
|
236
|
-
"TiktokShopProductBatchParams",
|
|
237
|
-
"TiktokShopProductParams",
|
|
238
|
-
"TiktokShopSearchBatchParams",
|
|
239
|
-
"TiktokShopSearchParams",
|
|
240
|
-
"UniversalBatchParams",
|
|
241
|
-
"UniversalEcommerceBatchParams",
|
|
242
|
-
"UniversalEcommerceParams",
|
|
243
|
-
"UniversalParams",
|
|
244
|
-
"WalmartBatchParams",
|
|
245
|
-
"WalmartParams",
|
|
246
|
-
"WalmartProductBatchParams",
|
|
247
|
-
"WalmartProductParams",
|
|
248
|
-
"WalmartSearchBatchParams",
|
|
249
|
-
"WalmartSearchParams",
|
|
250
|
-
"YoutubeChannelBatchParams",
|
|
251
|
-
"YoutubeChannelParams",
|
|
252
|
-
"YoutubeMetadataBatchParams",
|
|
253
|
-
"YoutubeMetadataParams",
|
|
254
|
-
"YoutubeSearchBatchParams",
|
|
255
|
-
"YoutubeSearchMaxBatchParams",
|
|
256
|
-
"YoutubeSearchMaxParams",
|
|
257
|
-
"YoutubeSearchParams",
|
|
258
|
-
"YoutubeSubtitlesBatchParams",
|
|
259
|
-
"YoutubeSubtitlesParams",
|
|
260
|
-
"YoutubeTranscriptBatchParams",
|
|
261
|
-
"YoutubeTranscriptParams",
|
|
262
|
-
"YoutubeVideoBatchParams",
|
|
263
|
-
"YoutubeVideoParams",
|
|
264
|
-
"parameter_meta",
|
|
265
|
-
"target_meta",
|
|
266
|
-
]
|
|
267
|
-
)
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
def __getattr__(name: str) -> object:
|
|
271
|
-
if name in _CODEGEN_NAMES:
|
|
272
|
-
raise ImportError(
|
|
273
|
-
f"'{name}' requires generated types. "
|
|
274
|
-
"Editable install: run python -m decodo.codegen.codegen, then use 'from decodo import ...'. "
|
|
275
|
-
"Pip install: run python -m decodo.codegen.codegen --out-dir ./decodo_generated, "
|
|
276
|
-
"then use 'from decodo_generated.targets import ...'."
|
|
277
|
-
)
|
|
278
|
-
raise AttributeError(f"module 'decodo' has no attribute {name!r}")
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
__all__ = [
|
|
282
|
-
"DecodoClient",
|
|
283
|
-
"DecodoConfig",
|
|
284
|
-
"WebScrapingApiConfig",
|
|
285
|
-
"WebScrapingApi",
|
|
286
|
-
"WebScrapingApiRoutes",
|
|
287
|
-
"BundledSchema",
|
|
288
|
-
"RemoteSchema",
|
|
289
|
-
"DecodoSchema",
|
|
290
|
-
"RemoteSchemaLoadOptions",
|
|
291
|
-
"Target",
|
|
292
|
-
"targets",
|
|
293
|
-
"SyncResponse",
|
|
294
|
-
"AsyncTaskResponse",
|
|
295
|
-
"BatchResponse",
|
|
296
|
-
"TaskMetadata",
|
|
297
|
-
"TaskResultsResponse",
|
|
298
|
-
"TaskStatus",
|
|
299
|
-
"ResultEntry",
|
|
300
|
-
"SearchRequest",
|
|
301
|
-
"SearchResponse",
|
|
302
|
-
"MapRequest",
|
|
303
|
-
"MapResponse",
|
|
304
|
-
"CrawlRequest",
|
|
305
|
-
"CrawlResponse",
|
|
306
|
-
"CrawlStatusResponse",
|
|
307
|
-
"CrawlStatus",
|
|
308
|
-
"CrawlPage",
|
|
309
|
-
"CrawlPagesResponse",
|
|
310
|
-
"DecodoError",
|
|
311
|
-
"AuthenticationError",
|
|
312
|
-
"RateLimitError",
|
|
313
|
-
"ValidationError",
|
|
314
|
-
"TimeoutError",
|
|
315
|
-
"CrawlError",
|
|
316
|
-
"CrawlInterruptedError",
|
|
317
|
-
"CrawlTimeoutError",
|
|
318
|
-
]
|
|
319
|
-
|
|
320
|
-
if _codegen_available:
|
|
321
|
-
__all__ += list(_CODEGEN_NAMES)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{decodo_sdk-2.4.0 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/generate_parameters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|