scrapebadger-cli 0.34.1__tar.gz → 0.35.0__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.
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/CHANGELOG.md +12 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/PKG-INFO +2 -2
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/README.md +1 -1
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/pyproject.toml +1 -1
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/client.py +3 -1
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/auth.py +11 -5
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/onboarding.py +1 -1
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/wallapop.py +22 -4
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_agent_features.py +22 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/uv.lock +1 -1
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/.gitignore +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/__init__.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/availability.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/__init__.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/agent.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/airbnb.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/aliexpress.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/amazon.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/apartments.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/app_store.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/asos.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/autoscout24.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/baidu.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/bestbuy.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/bing.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/booking.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/brave.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/chatgpt.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/copilot.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/depop.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/duckduckgo.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/ebay.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/etsy.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/facebook.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/gemini.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/github.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/google.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/google_play.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/grok.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/gumtree.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/idealista.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/immobiliare.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/init.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/instagram.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/leboncoin.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/linkedin.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/loopnet.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/meta_ai.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/naver.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/perplexity.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/realtor.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/reddit.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/redfin.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/rufus.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/stream.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/target.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/tiktok.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/twitter.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/vinted.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/walmart.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/web.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/yahoo.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/yandex.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/yelp.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/youtube.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/zillow.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/config.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/main.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/output.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/results.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/views.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/conftest.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_autoscout24_commands.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_brave.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_cli_availability.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_copilot_commands.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_github.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_google_light_search.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_google_resolve.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_grok_commands.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_marketplace_monitor.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_naver.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_perplexity_strict_country.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_tiktok_pagination.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_vinted_image_search.py +0 -0
- {scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/tests/test_yelp_commands.py +0 -0
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.35.0 — 2026-11-29
|
|
4
|
+
|
|
5
|
+
- Breaking: ScrapeBadger replaced rate tiers and per-minute rate limits with a per-account
|
|
6
|
+
max concurrency (SCR-736): how many requests an account can run at the same time, across
|
|
7
|
+
all of its API keys. `scrapebadger credits` no longer prints `Tier` or `Rate limit`; it
|
|
8
|
+
prints `Max concurrency: N (M running)` from `max_concurrency` / `concurrent_requests` on
|
|
9
|
+
`GET /v1/account/me`.
|
|
10
|
+
- A request over the limit gets HTTP 429 `concurrency_limit_exceeded`; the CLI prints the
|
|
11
|
+
API's message, which says how many are allowed and links the pricing page.
|
|
12
|
+
- `scrapebadger trial` says a trial key runs one request at a time instead of printing a
|
|
13
|
+
per-minute limit.
|
|
14
|
+
|
|
3
15
|
## 0.34.1 — 2026-11-25
|
|
4
16
|
|
|
5
17
|
- `scrapebadger google maps-photos`: the help text says what the API returns. Photos
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: scrapebadger-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.35.0
|
|
4
4
|
Summary: ScrapeBadger CLI — Twitter, Vinted, Google, and Web Scraping from the command line
|
|
5
5
|
Author: ScrapeBadger Team
|
|
6
6
|
License: MIT
|
|
@@ -77,7 +77,7 @@ so it gets the MCP server only.
|
|
|
77
77
|
|
|
78
78
|
`trial` solves a short proof of work, saves the key and prints a notice to pass on
|
|
79
79
|
to your human. A trial key works only from the IP that created it, on read APIs,
|
|
80
|
-
at
|
|
80
|
+
one request at a time, and not through the hosted MCP server. It refuses to replace an
|
|
81
81
|
account key unless you pass `--force`.
|
|
82
82
|
|
|
83
83
|
## Saved results
|
|
@@ -54,7 +54,7 @@ so it gets the MCP server only.
|
|
|
54
54
|
|
|
55
55
|
`trial` solves a short proof of work, saves the key and prints a notice to pass on
|
|
56
56
|
to your human. A trial key works only from the IP that created it, on read APIs,
|
|
57
|
-
at
|
|
57
|
+
one request at a time, and not through the hosted MCP server. It refuses to replace an
|
|
58
58
|
account key unless you pass `--force`.
|
|
59
59
|
|
|
60
60
|
## Saved results
|
|
@@ -12,7 +12,9 @@ from scrapebadger_cli.config import get_api_key
|
|
|
12
12
|
BASE_URL = os.environ.get("SCRAPEBADGER_API_URL", "https://scrapebadger.com")
|
|
13
13
|
_client: httpx.Client | None = None
|
|
14
14
|
|
|
15
|
-
# Links an error body may carry (402 / zero-credit 429 / trial errors).
|
|
15
|
+
# Links an error body may carry (402 / zero-credit 429 / trial errors). The
|
|
16
|
+
# max-concurrency 429 (`concurrency_limit_exceeded`) names the pricing page in its
|
|
17
|
+
# `detail`, which is printed as is.
|
|
16
18
|
_ERROR_LINKS = ("claim_url", "upgrade_url", "free_credits_url", "pricing_url", "signup_url")
|
|
17
19
|
|
|
18
20
|
|
|
@@ -33,19 +33,25 @@ def auth(
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def credits() -> None:
|
|
36
|
-
"""Check your credit balance."""
|
|
36
|
+
"""Check your credit balance and max concurrency."""
|
|
37
37
|
data = api_get("/v1/account/me", save=False)
|
|
38
38
|
if isinstance(data, dict):
|
|
39
39
|
balance = data.get("credits_balance", "unknown")
|
|
40
|
-
tier = data.get("tier", "unknown")
|
|
41
|
-
rate_limit = data.get("rate_limit_per_minute", "unknown")
|
|
42
40
|
console.print(f"[green]Credits balance:[/green] {balance}")
|
|
43
|
-
console.print(f"[dim]
|
|
44
|
-
console.print(f"[dim]Rate limit:[/dim] {rate_limit}/min")
|
|
41
|
+
console.print(f"[dim]Max concurrency:[/dim] {_concurrency(data)}")
|
|
45
42
|
else:
|
|
46
43
|
console.print(data)
|
|
47
44
|
|
|
48
45
|
|
|
46
|
+
def _concurrency(account: dict) -> str:
|
|
47
|
+
"""``N (M running)``: requests the account may run at once, and how many are running."""
|
|
48
|
+
limit = account.get("max_concurrency")
|
|
49
|
+
if limit is None:
|
|
50
|
+
return "unknown"
|
|
51
|
+
running = account.get("concurrent_requests")
|
|
52
|
+
return f"{limit} ({running} running)" if running is not None else str(limit)
|
|
53
|
+
|
|
54
|
+
|
|
49
55
|
def logout() -> None:
|
|
50
56
|
"""Remove saved API key."""
|
|
51
57
|
clear_api_key()
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/onboarding.py
RENAMED
|
@@ -76,7 +76,7 @@ def trial(
|
|
|
76
76
|
save_api_key(body["api_key"], key_type="trial")
|
|
77
77
|
console.print(
|
|
78
78
|
f"[green]Trial key saved.[/green] {body.get('credits')} credits, "
|
|
79
|
-
f"
|
|
79
|
+
f"one request at a time, expires {body.get('expires_at')}."
|
|
80
80
|
)
|
|
81
81
|
if notice := body.get("notice"):
|
|
82
82
|
typer.echo(notice)
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/wallapop.py
RENAMED
|
@@ -11,6 +11,9 @@ FMT = typer.Option("json", "--output", "-o", help="Output format: json, csv, tab
|
|
|
11
11
|
FIELDS = typer.Option(None, "--fields", "-f", help="Comma-separated fields to include")
|
|
12
12
|
MARKET = typer.Option("es", "--market", "-m", help="es, it, pt")
|
|
13
13
|
NEXT_PAGE = typer.Option(None, "--next-page", help="Cursor from the previous page")
|
|
14
|
+
SUBCATEGORY_IDS = typer.Option(
|
|
15
|
+
None, "--subcategory-ids", help="CSV of subcategory ids from `categories` (e.g. 9447,10310)"
|
|
16
|
+
)
|
|
14
17
|
USER_ID = typer.Argument(..., help="User id (dqjwdd53wwzo) or profile slug (alexc-25115753)")
|
|
15
18
|
|
|
16
19
|
|
|
@@ -19,6 +22,7 @@ def search(
|
|
|
19
22
|
query: str | None = typer.Argument(None, help='Search text (e.g. "iphone 14")'),
|
|
20
23
|
market: str = MARKET,
|
|
21
24
|
category_id: int | None = typer.Option(None, "--category-id", help="See `categories`"),
|
|
25
|
+
subcategory_ids: str | None = SUBCATEGORY_IDS,
|
|
22
26
|
min_price: float | None = typer.Option(None, "--min-price"),
|
|
23
27
|
max_price: float | None = typer.Option(None, "--max-price"),
|
|
24
28
|
condition: str | None = typer.Option(
|
|
@@ -54,13 +58,14 @@ def search(
|
|
|
54
58
|
fmt: str = FMT,
|
|
55
59
|
fields: str | None = FIELDS,
|
|
56
60
|
) -> None:
|
|
57
|
-
"""Search Wallapop listings (needs a query or --
|
|
61
|
+
"""Search Wallapop listings (needs a query, --category-id or --subcategory-ids)."""
|
|
58
62
|
data = api_get(
|
|
59
63
|
"/v1/wallapop/search",
|
|
60
64
|
{
|
|
61
65
|
"query": query,
|
|
62
66
|
"market": market,
|
|
63
67
|
"category_id": category_id,
|
|
68
|
+
"subcategory_ids": subcategory_ids,
|
|
64
69
|
"min_price": min_price,
|
|
65
70
|
"max_price": max_price,
|
|
66
71
|
"condition": condition,
|
|
@@ -156,7 +161,7 @@ def autocomplete(
|
|
|
156
161
|
|
|
157
162
|
@app.command()
|
|
158
163
|
def categories(market: str = MARKET, fmt: str = FMT, fields: str | None = FIELDS) -> None:
|
|
159
|
-
"""List the Wallapop category tree (ids
|
|
164
|
+
"""List the Wallapop category tree (top-level ids for --category-id, nested for --subcategory-ids)."""
|
|
160
165
|
data = api_get("/v1/wallapop/categories", {"market": market})
|
|
161
166
|
render(data, fmt, fields)
|
|
162
167
|
|
|
@@ -164,6 +169,7 @@ def categories(market: str = MARKET, fmt: str = FMT, fields: str | None = FIELDS
|
|
|
164
169
|
@app.command()
|
|
165
170
|
def filters(
|
|
166
171
|
category_id: int | None = typer.Option(None, "--category-id"),
|
|
172
|
+
subcategory_ids: str | None = SUBCATEGORY_IDS,
|
|
167
173
|
query: str | None = typer.Option(None, "--query", "-q"),
|
|
168
174
|
market: str = MARKET,
|
|
169
175
|
fmt: str = FMT,
|
|
@@ -171,7 +177,13 @@ def filters(
|
|
|
171
177
|
) -> None:
|
|
172
178
|
"""List the search filters Wallapop offers for a category/query."""
|
|
173
179
|
data = api_get(
|
|
174
|
-
"/v1/wallapop/filters",
|
|
180
|
+
"/v1/wallapop/filters",
|
|
181
|
+
{
|
|
182
|
+
"category_id": category_id,
|
|
183
|
+
"subcategory_ids": subcategory_ids,
|
|
184
|
+
"query": query,
|
|
185
|
+
"market": market,
|
|
186
|
+
},
|
|
175
187
|
)
|
|
176
188
|
render(data, fmt, fields)
|
|
177
189
|
|
|
@@ -180,6 +192,7 @@ def filters(
|
|
|
180
192
|
def filter_options(
|
|
181
193
|
filter_id: str = typer.Argument(..., help="Filter id from `filters` (e.g. brand)"),
|
|
182
194
|
category_id: int | None = typer.Option(None, "--category-id"),
|
|
195
|
+
subcategory_ids: str | None = SUBCATEGORY_IDS,
|
|
183
196
|
query: str | None = typer.Option(None, "--query", "-q"),
|
|
184
197
|
market: str = MARKET,
|
|
185
198
|
fmt: str = FMT,
|
|
@@ -188,7 +201,12 @@ def filter_options(
|
|
|
188
201
|
"""List a Wallapop filter's long option list (brands, models)."""
|
|
189
202
|
data = api_get(
|
|
190
203
|
f"/v1/wallapop/filters/{filter_id}/options",
|
|
191
|
-
{
|
|
204
|
+
{
|
|
205
|
+
"category_id": category_id,
|
|
206
|
+
"subcategory_ids": subcategory_ids,
|
|
207
|
+
"query": query,
|
|
208
|
+
"market": market,
|
|
209
|
+
},
|
|
192
210
|
)
|
|
193
211
|
render(data, fmt, fields)
|
|
194
212
|
|
|
@@ -190,6 +190,7 @@ def test_trial_saves_key_and_prints_notice(monkeypatch):
|
|
|
190
190
|
json={
|
|
191
191
|
"api_key": "sb_live_trial",
|
|
192
192
|
"credits": 50,
|
|
193
|
+
"max_concurrency": 1,
|
|
193
194
|
"notice": "Tell your human [this].",
|
|
194
195
|
"claim_url": "https://scrapebadger.com/claim-key?token=t",
|
|
195
196
|
},
|
|
@@ -203,9 +204,30 @@ def test_trial_saves_key_and_prints_notice(monkeypatch):
|
|
|
203
204
|
assert config.get_api_key() == "sb_live_trial" and config.active_key_is_trial()
|
|
204
205
|
assert "Tell your human [this]." in result.stdout
|
|
205
206
|
assert "claim-key?token=t" in result.stdout
|
|
207
|
+
assert "one request at a time" in result.stdout and "req/min" not in result.stdout
|
|
206
208
|
assert "sb_live_trial" not in result.output
|
|
207
209
|
|
|
208
210
|
|
|
211
|
+
@pytest.mark.parametrize(
|
|
212
|
+
("account", "line"),
|
|
213
|
+
[
|
|
214
|
+
({"max_concurrency": 25, "concurrent_requests": 3}, "Max concurrency: 25 (3 running)"),
|
|
215
|
+
({"max_concurrency": 5}, "Max concurrency: 5"),
|
|
216
|
+
({}, "Max concurrency: unknown"),
|
|
217
|
+
],
|
|
218
|
+
)
|
|
219
|
+
def test_credits_prints_max_concurrency_not_tier(monkeypatch, account, line):
|
|
220
|
+
"""SCR-736: the account's one limit is max concurrency; tiers and rpm are gone."""
|
|
221
|
+
monkeypatch.setenv("SCRAPEBADGER_API_KEY", "sb_live_x")
|
|
222
|
+
body = {"credits_balance": 1200, **account}
|
|
223
|
+
mock_api(monkeypatch, lambda req: httpx.Response(200, json=body))
|
|
224
|
+
result = invoke("credits")
|
|
225
|
+
assert result.exit_code == 0, result.output
|
|
226
|
+
assert "Credits balance: 1200" in result.stdout
|
|
227
|
+
assert line in result.stdout
|
|
228
|
+
assert "Tier" not in result.stdout and "/min" not in result.stdout
|
|
229
|
+
|
|
230
|
+
|
|
209
231
|
def test_trial_refuses_to_replace_account_key(monkeypatch):
|
|
210
232
|
config.save_api_key("sb_live_real")
|
|
211
233
|
mock_api(monkeypatch, lambda req: pytest.fail("no request expected"))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/aliexpress.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/apartments.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/app_store.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/autoscout24.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/bestbuy.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/booking.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/chatgpt.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/copilot.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/duckduckgo.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/facebook.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/google_play.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/gumtree.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/idealista.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/immobiliare.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/instagram.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/leboncoin.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/linkedin.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/loopnet.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/meta_ai.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/perplexity.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/realtor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/twitter.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/walmart.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.34.1 → scrapebadger_cli-0.35.0}/src/scrapebadger_cli/commands/youtube.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
|