scrapeunblocker 0.11.1 → 0.12.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +7 -0
- data/lib/scrapeunblocker/client.rb +9 -3
- data/lib/scrapeunblocker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9349609e20a6b8949d1cc3d77b919cf6c916b4b1917d181bb2d18ec441f46777
|
|
4
|
+
data.tar.gz: 55bf0f292146e6e166a502ecb43a33d15b2629261f808ed8754f4ca7a33d96fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22da248af5842639758605b333930c888534405b796cd199f9c8a2c8bced4104e6dace474c62fbaa2aa878d321878aef3118121fb0563efc4f25a1d2c00451b6
|
|
7
|
+
data.tar.gz: 3fea75e8eb0602eb156978c019fea92fe7cfca41aab0714f9049412d26207e707899750ad8547b0caf57d3da368d347d2f2ead34e82d74ee2d4764de5f90afb9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0 (2026-10-15)
|
|
4
|
+
|
|
5
|
+
- `google_images` takes `time_range:` (`"hour"`, `"day"`, `"week"`, `"month"` or `"year"`) to return only the images Google found in that recent period, so a query scanned on a schedule returns only what is new. For a fixed window pass `date_from:` and/or `date_to:` (`"YYYY-MM-DD"`) instead; the API answers 400 when `time_range` is combined with either.
|
|
6
|
+
|
|
7
|
+
No breaking changes.
|
|
8
|
+
|
|
3
9
|
## 0.11.1 (2026-10-15)
|
|
4
10
|
|
|
5
11
|
- `get_image` docs: the API now returns the image's original bytes and format (JPEG, PNG, WebP, AVIF, GIF, SVG, ...) instead of a PNG re-encode. The method still returns a binary `String`.
|
data/README.md
CHANGED
|
@@ -174,8 +174,15 @@ local["results"].each { |biz| puts "#{biz['name']} #{biz['rating']} #{biz['addre
|
|
|
174
174
|
```ruby
|
|
175
175
|
images = su.google_images("golden retriever puppy", proxy_country: "US", pages: 3)
|
|
176
176
|
images["results"].each { |img| puts "#{img['imageUrl']} #{img['sourceDomain']} #{img['title']}" }
|
|
177
|
+
|
|
178
|
+
# Only images Google found in the last day (for a daily scan of the same query)
|
|
179
|
+
new_images = su.google_images("eiffel tower", proxy_country: "US", time_range: "day")
|
|
180
|
+
# Or a fixed window: date_from / date_to (YYYY-MM-DD), each one optional
|
|
181
|
+
october = su.google_images("eiffel tower", date_from: "2026-10-01", date_to: "2026-10-07")
|
|
177
182
|
```
|
|
178
183
|
|
|
184
|
+
`time_range` takes `hour`, `day`, `week`, `month` or `year` and cannot be combined with `date_from` / `date_to`.
|
|
185
|
+
|
|
179
186
|
## Meta Ad Library
|
|
180
187
|
|
|
181
188
|
```ruby
|
|
@@ -126,10 +126,16 @@ module ScrapeUnblocker
|
|
|
126
126
|
# +proxy_country+ to target a market (the Google market follows it; +gl+
|
|
127
127
|
# is an optional override), +pages+ (1-5, ~100 results each; each page
|
|
128
128
|
# fetched is billed as one request, see +pagesFetched+) and +max_results+
|
|
129
|
-
# (1-500) to cap the count.
|
|
130
|
-
|
|
129
|
+
# (1-500) to cap the count. +time_range+ ("hour", "day", "week", "month",
|
|
130
|
+
# "year") keeps only the images Google found in that recent period, e.g.
|
|
131
|
+
# the new ones since the last scheduled scan; +date_from+ / +date_to+
|
|
132
|
+
# ("YYYY-MM-DD", each optional) set a fixed window instead. The two forms
|
|
133
|
+
# cannot be combined.
|
|
134
|
+
def google_images(q, proxy_country: nil, pages: nil, gl: nil, max_results: nil,
|
|
135
|
+
time_range: nil, date_from: nil, date_to: nil)
|
|
131
136
|
post_json("/images/google-search",
|
|
132
|
-
q: q, pages: pages, gl: gl, max_results: max_results, proxy_country: proxy_country
|
|
137
|
+
q: q, pages: pages, gl: gl, max_results: max_results, proxy_country: proxy_country,
|
|
138
|
+
time_range: time_range, date_from: date_from, date_to: date_to)
|
|
133
139
|
end
|
|
134
140
|
|
|
135
141
|
# Fetch an advertiser's Meta (Facebook) Ad Library ads and return them as a Hash.
|