scrapebadger-cli 0.22.0__tar.gz → 0.23.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.22.0 → scrapebadger_cli-0.23.0}/PKG-INFO +11 -1
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/README.md +10 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/pyproject.toml +1 -1
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/ebay.py +10 -1
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/google.py +2 -3
- scrapebadger_cli-0.23.0/tests/test_google_light_search.py +22 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/.gitignore +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/__init__.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/client.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/__init__.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/airbnb.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/aliexpress.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/amazon.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/apartments.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/app_store.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/asos.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/auth.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/baidu.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/bestbuy.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/bing.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/booking.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/chatgpt.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/depop.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/duckduckgo.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/etsy.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/facebook.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/gemini.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/google_play.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/gumtree.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/idealista.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/immobiliare.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/instagram.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/leboncoin.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/linkedin.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/loopnet.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/naver.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/perplexity.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/realtor.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/reddit.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/redfin.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/stream.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/target.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/tiktok.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/twitter.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/vinted.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/wallapop.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/walmart.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/web.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/yahoo.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/yandex.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/youtube.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/zillow.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/config.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/main.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/output.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/tests/test_naver.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/tests/test_tiktok_pagination.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/tests/test_vinted_image_search.py +0 -0
- {scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: scrapebadger-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.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
|
|
@@ -22,6 +22,16 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
|
|
23
23
|
# ScrapeBadger CLI
|
|
24
24
|
|
|
25
|
+
Google Light Search uses the dedicated `/v1/google/light/search` endpoint:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
scrapebadger google light-search "vinted api" --gl us --hl en
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Light returns organic results and related searches for 10 credits per successful
|
|
32
|
+
uncached request. Regular `scrapebadger google search` costs 20 credits and
|
|
33
|
+
returns the full SERP. Cache hits and failed requests are free.
|
|
34
|
+
|
|
25
35
|
Command-line access to ScrapeBadger APIs, including Etsy, AliExpress, Target, ASOS, Best Buy, search engines, social media and general web scraping.
|
|
26
36
|
|
|
27
37
|
## Install
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# ScrapeBadger CLI
|
|
2
2
|
|
|
3
|
+
Google Light Search uses the dedicated `/v1/google/light/search` endpoint:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
scrapebadger google light-search "vinted api" --gl us --hl en
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Light returns organic results and related searches for 10 credits per successful
|
|
10
|
+
uncached request. Regular `scrapebadger google search` costs 20 credits and
|
|
11
|
+
returns the full SERP. Cache hits and failed requests are free.
|
|
12
|
+
|
|
3
13
|
Command-line access to ScrapeBadger APIs, including Etsy, AliExpress, Target, ASOS, Best Buy, search engines, social media and general web scraping.
|
|
4
14
|
|
|
5
15
|
## Install
|
|
@@ -69,7 +69,10 @@ def search(
|
|
|
69
69
|
|
|
70
70
|
@app.command()
|
|
71
71
|
def completed(
|
|
72
|
-
query: str = typer.Argument(
|
|
72
|
+
query: str | None = typer.Argument(None, help="Search text (optional with --seller)"),
|
|
73
|
+
seller: str | None = typer.Option(
|
|
74
|
+
None, "--seller", help="Only this seller's sold listings (eBay username)"
|
|
75
|
+
),
|
|
73
76
|
domain: str = DOMAIN,
|
|
74
77
|
category_id: str | None = typer.Option(None, "--category-id", help="Restrict to a category"),
|
|
75
78
|
page: int = typer.Option(1, "--page", "-p"),
|
|
@@ -98,11 +101,17 @@ def completed(
|
|
|
98
101
|
--language english drops the Japanese and Chinese prints that a national
|
|
99
102
|
price series should not average in. It is a separate axis from --location:
|
|
100
103
|
a UK-located seller still ships Japanese cards.
|
|
104
|
+
|
|
105
|
+
--seller USERNAME limits it to one seller; with no search text it pages
|
|
106
|
+
through everything that seller sold.
|
|
101
107
|
"""
|
|
108
|
+
if not (query or seller):
|
|
109
|
+
raise typer.BadParameter("Pass query, --seller, or both.")
|
|
102
110
|
data = api_get(
|
|
103
111
|
"/v1/ebay/completed",
|
|
104
112
|
{
|
|
105
113
|
"query": query,
|
|
114
|
+
"seller": seller,
|
|
106
115
|
"domain": domain,
|
|
107
116
|
"category_id": category_id,
|
|
108
117
|
"page": page,
|
|
@@ -82,9 +82,9 @@ def light_search(
|
|
|
82
82
|
fmt: str = FMT,
|
|
83
83
|
fields: str | None = FIELDS,
|
|
84
84
|
) -> None:
|
|
85
|
-
"""Google Light Search — organic + related searches
|
|
85
|
+
"""Google Light Search — organic + related searches, 10 credits (regular Search: 20)."""
|
|
86
86
|
data = api_get(
|
|
87
|
-
"/v1/google/search",
|
|
87
|
+
"/v1/google/light/search",
|
|
88
88
|
{
|
|
89
89
|
"q": q,
|
|
90
90
|
"gl": gl,
|
|
@@ -94,7 +94,6 @@ def light_search(
|
|
|
94
94
|
"domain": domain,
|
|
95
95
|
"location": location,
|
|
96
96
|
"safe": safe,
|
|
97
|
-
"mode": "fast",
|
|
98
97
|
},
|
|
99
98
|
)
|
|
100
99
|
render(data, fmt, fields)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from unittest.mock import Mock
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
CliRunner = pytest.importorskip("typer.testing").CliRunner
|
|
6
|
+
google = pytest.importorskip(
|
|
7
|
+
"scrapebadger_cli.commands.google", reason="CLI is tested with its own installed package"
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_light_search_uses_dedicated_route(monkeypatch):
|
|
12
|
+
call = Mock(return_value={"organic_results": []})
|
|
13
|
+
monkeypatch.setattr(google, "api_get", call)
|
|
14
|
+
monkeypatch.setattr(google, "render", Mock())
|
|
15
|
+
result = CliRunner().invoke(
|
|
16
|
+
google.app, ["light-search", "vinted api", "--gl", "us", "--start", "10"]
|
|
17
|
+
)
|
|
18
|
+
assert result.exit_code == 0, result.output
|
|
19
|
+
path, params = call.call_args.args
|
|
20
|
+
assert path == "/v1/google/light/search"
|
|
21
|
+
assert params["q"] == "vinted api" and params["start"] == 10
|
|
22
|
+
assert "mode" not in params
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/aliexpress.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/apartments.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/app_store.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/bestbuy.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/booking.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/chatgpt.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/duckduckgo.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/facebook.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/google_play.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/gumtree.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/idealista.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/immobiliare.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/instagram.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/leboncoin.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/linkedin.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/loopnet.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/perplexity.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.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
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/twitter.py
RENAMED
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/wallapop.py
RENAMED
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.0}/src/scrapebadger_cli/commands/walmart.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{scrapebadger_cli-0.22.0 → scrapebadger_cli-0.23.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
|