Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scrapebadger"
version = "0.18.0"
version = "0.19.0"
description = "Official Python SDK for ScrapeBadger - Async web scraping APIs for Twitter and more"
readme = "README.md"
license = { text = "MIT" }
Expand Down
37 changes: 36 additions & 1 deletion src/scrapebadger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,31 @@ async def main():
SearchResult as AmazonSearchResult,
)
from scrapebadger.client import ScrapeBadger
from scrapebadger.depop.client import DepopClient
from scrapebadger.depop.models import (
DepopCard,
)
from scrapebadger.depop.models import (
Market as DepopMarket,
)
from scrapebadger.depop.models import (
MarketsResponse as DepopMarketsResponse,
)
from scrapebadger.depop.models import (
ProductDetail as DepopProductDetail,
)
from scrapebadger.depop.models import (
SearchMeta as DepopSearchMeta,
)
from scrapebadger.depop.models import (
SearchResponse as DepopSearchResponse,
)
from scrapebadger.depop.models import (
ShopProfile as DepopShopProfile,
)
from scrapebadger.depop.models import (
UserProductsResponse as DepopUserProductsResponse,
)
from scrapebadger.ebay.client import EbayClient
from scrapebadger.ebay.models import (
AutocompleteResponse as EbayAutocompleteResponse,
Expand Down Expand Up @@ -810,7 +835,7 @@ async def main():
ZestimateHistoryPoint as ZillowZestimateHistoryPoint,
)

__version__ = "0.18.0"
__version__ = "0.19.0"

__all__ = [
# TikTok core models
Expand All @@ -837,6 +862,16 @@ async def main():
"ColorsResponse",
"Deal",
"DealsResponse",
# Depop
"DepopCard",
"DepopClient",
"DepopMarket",
"DepopMarketsResponse",
"DepopProductDetail",
"DepopSearchMeta",
"DepopSearchResponse",
"DepopShopProfile",
"DepopUserProductsResponse",
# Web scraping
"DetectResult",
# eBay response envelopes / models
Expand Down
2 changes: 1 addition & 1 deletion src/scrapebadger/_internal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
T = TypeVar("T")

# User agent for SDK requests
SDK_VERSION = "0.18.0"
SDK_VERSION = "0.19.0"
USER_AGENT = f"scrapebadger-python/{SDK_VERSION}"


Expand Down
25 changes: 25 additions & 0 deletions src/scrapebadger/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from scrapebadger._internal.client import BaseClient
from scrapebadger._internal.config import ClientConfig
from scrapebadger.amazon.client import AmazonClient
from scrapebadger.depop.client import DepopClient
from scrapebadger.ebay.client import EbayClient
from scrapebadger.google.client import GoogleClient
from scrapebadger.immobiliare.client import ImmobiliareClient
Expand Down Expand Up @@ -127,6 +128,7 @@ def __init__(
self._google: GoogleClient | None = None
self._reddit: RedditClient | None = None
self._redfin: RedfinClient | None = None
self._depop: DepopClient | None = None
self._amazon: AmazonClient | None = None
self._ebay: EbayClient | None = None
self._youtube: YoutubeClient | None = None
Expand Down Expand Up @@ -238,6 +240,29 @@ def redfin(self) -> RedfinClient:
self._redfin = RedfinClient(self._base_client)
return self._redfin

@property
def depop(self) -> DepopClient:
"""Access Depop Scraper API operations.

Returns:
DepopClient providing access to all Depop endpoints (search,
product detail, shop profile, user products, markets). Depop is a
second-hand fashion marketplace: one global host (depop.com)
localised by market (us, gb [alias uk], au, ie, it, fr, de, es, nl,
nz) → country/currency.

Example:
```python
results = await client.depop.search("nike vintage")
detail = await client.depop.get_product("some-product-slug")
shop = await client.depop.get_user("someseller")
markets = await client.depop.list_markets()
```
"""
if self._depop is None:
self._depop = DepopClient(self._base_client)
return self._depop

@property
def google(self) -> GoogleClient:
"""Access Google Scraper API operations.
Expand Down
55 changes: 55 additions & 0 deletions src/scrapebadger/depop/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
"""Depop API module for ScrapeBadger SDK.

This module provides an async client for scraping Depop second-hand fashion
marketplace data through the ScrapeBadger API. All methods are async and return
strongly-typed Pydantic models.

Example:
```python
from scrapebadger import ScrapeBadger

async with ScrapeBadger(api_key="your-key") as client:
# Search products
results = await client.depop.search("nike vintage")
for card in results.products:
print(f"{card.slug} — {card.price}")

# Get product detail
detail = await client.depop.get_product("some-product-slug")
print(detail.title)

# Get a shop profile
shop = await client.depop.get_user("someseller")
print(shop.name)
```
"""

from scrapebadger.depop.client import DepopClient
from scrapebadger.depop.models import (
DepopCard,
Market,
MarketsResponse,
ProductDetail,
SearchMeta,
SearchResponse,
ShopProfile,
UserProductsResponse,
)

__all__ = [
# Cards
"DepopCard",
# Client
"DepopClient",
# Markets
"Market",
"MarketsResponse",
# Product detail
"ProductDetail",
# Search / user-products
"SearchMeta",
"SearchResponse",
# Shop profile
"ShopProfile",
"UserProductsResponse",
]
Loading
Loading