scrapeunblocker 0.3.0 → 0.5.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 +12 -0
- data/README.md +26 -0
- data/lib/scrapeunblocker/client.rb +17 -0
- data/lib/scrapeunblocker/southwest.rb +27 -0
- data/lib/scrapeunblocker/version.rb +1 -1
- data/lib/scrapeunblocker.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2668bf966d35f46fd8c65d4d78cdc0d93d989a54b9d3f257f57e7924cc4ad6f6
|
|
4
|
+
data.tar.gz: 7ec5e5166b99712828dd771597ba0db89a09f398a1c5c0988af3256f077139f1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98330917b1ddce4f2d24f3938a97ce719ef84e31a712a3e774ac5d5821b1df164d8defd3984d4732d736f374f357701b59bae7b3a3154539b06543b92b8ecc5a
|
|
7
|
+
data.tar.gz: 0fb21ac2f6c04e979bb21415a9d393fd2853bdb1eb793e6ddf1d52cd9a38ab976d9ab403352f15bbe3b24ae64972c60df972942e231d85ff5e2ac805bf76bc34
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-09-17)
|
|
4
|
+
|
|
5
|
+
- Added `google_images(q, ...)` for the new Google Images plugin (`POST /images/google-search`). Given a keyword `q` it returns Google Images results as a Hash - each with the full-size `imageUrl` and its `sourceDomain`, plus the source page URL, title, source name, thumbnail URL, pixel dimensions and file size. Optional `gl` (ISO-2 lowercase market), `max_results` (1-100) and `proxy_country` (ISO-2) refine the search.
|
|
6
|
+
|
|
7
|
+
No breaking changes.
|
|
8
|
+
|
|
9
|
+
## 0.4.0 (2026-09-16)
|
|
10
|
+
|
|
11
|
+
- Added `southwest.flights(origin:, dest:, depart_date:, ...)` for the new Southwest Airlines plugin (`POST /flights/southwest-quotes`), reached through the new `su.southwest` namespace and mirroring `su.skyscanner`. `origin` and `dest` are IATA airport codes; `depart_date` and the optional `return_date` are `YYYY-MM-DD` (omit `return_date` for a one-way search). Optional `adults` (1-8, default 1), `fare_type` (`"dollars"` default or `"points"`), `proxy_country` (default `"US"`) and `max_attempts` (1-5, default 3). Returns the raw booking / shopping JSON as a Hash.
|
|
12
|
+
|
|
13
|
+
No breaking changes.
|
|
14
|
+
|
|
3
15
|
## 0.3.0 (2026-09-08)
|
|
4
16
|
|
|
5
17
|
- Added `tiktok_profile`, `tiktok_video`, `tiktok_hashtag`, `tiktok_search` and `tiktok_comments` for the new TikTok plugin: a creator's exact follower / like / video counts with their newest videos (up to 200), any video or photo post with exact plays, likes, comments, shares, saves and reposts, hashtags, music, play / download URLs, subtitle tracks and an optional transcript, a hashtag's total views and videos with its videos, keyword search in TikTok's own ranking, and the comments of any post. No login.
|
data/README.md
CHANGED
|
@@ -128,6 +128,13 @@ local = su.google_local("coffee shops in chicago", proxy_country: "US", gl: "us"
|
|
|
128
128
|
local["results"].each { |biz| puts "#{biz['name']} #{biz['rating']} #{biz['address']}" }
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
## Google Images
|
|
132
|
+
|
|
133
|
+
```ruby
|
|
134
|
+
images = su.google_images("golden retriever puppy", proxy_country: "US", gl: "us")
|
|
135
|
+
images["results"].each { |img| puts "#{img['imageUrl']} #{img['sourceDomain']} #{img['title']}" }
|
|
136
|
+
```
|
|
137
|
+
|
|
131
138
|
## Meta Ad Library
|
|
132
139
|
|
|
133
140
|
```ruby
|
|
@@ -223,6 +230,25 @@ hotels = su.skyscanner.hotels(destination: "Madrid", checkin: "2026-09-01", chec
|
|
|
223
230
|
cars = su.skyscanner.carhire(pickup: "Madrid", pickup_datetime: "2026-09-01T10:00", dropoff_datetime: "2026-09-03T10:00")
|
|
224
231
|
```
|
|
225
232
|
|
|
233
|
+
## Southwest plugin
|
|
234
|
+
|
|
235
|
+
Southwest Airlines flight quotes as JSON. `origin` and `dest` are IATA airport codes; omit `return_date` for a one-way search.
|
|
236
|
+
|
|
237
|
+
```ruby
|
|
238
|
+
flights = su.southwest.flights(
|
|
239
|
+
origin: "DAL", dest: "HOU",
|
|
240
|
+
depart_date: "2026-10-20", return_date: "2026-10-27"
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
# One-way, priced in Rapid Rewards points
|
|
244
|
+
oneway = su.southwest.flights(
|
|
245
|
+
origin: "DAL", dest: "HOU",
|
|
246
|
+
depart_date: "2026-10-20", adults: 2, fare_type: "points"
|
|
247
|
+
)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
`adults` is 1-8 (default 1), `fare_type` is `"dollars"` (default) or `"points"`, `proxy_country` defaults to `"US"` and `max_attempts` is 1-5 (default 3). The call returns the raw booking / shopping JSON.
|
|
251
|
+
|
|
226
252
|
## Error handling
|
|
227
253
|
|
|
228
254
|
Non-2xx responses raise typed errors, all subclasses of `ScrapeUnblocker::Error`.
|
|
@@ -7,6 +7,7 @@ require "json"
|
|
|
7
7
|
require_relative "errors"
|
|
8
8
|
require_relative "parsed_page"
|
|
9
9
|
require_relative "skyscanner"
|
|
10
|
+
require_relative "southwest"
|
|
10
11
|
require_relative "version"
|
|
11
12
|
|
|
12
13
|
module ScrapeUnblocker
|
|
@@ -22,6 +23,9 @@ module ScrapeUnblocker
|
|
|
22
23
|
# @return [Skyscanner] the Skyscanner plugin endpoints
|
|
23
24
|
attr_reader :skyscanner
|
|
24
25
|
|
|
26
|
+
# @return [Southwest] the Southwest Airlines plugin endpoints
|
|
27
|
+
attr_reader :southwest
|
|
28
|
+
|
|
25
29
|
def initialize(api_key: nil, base_url: DEFAULT_BASE_URL, timeout: 180, max_retries: 2, transport: nil)
|
|
26
30
|
@api_key = api_key || ENV["SCRAPEUNBLOCKER_KEY"]
|
|
27
31
|
if @api_key.nil? || @api_key.empty?
|
|
@@ -34,6 +38,7 @@ module ScrapeUnblocker
|
|
|
34
38
|
@max_retries = max_retries
|
|
35
39
|
@transport = transport || method(:net_http_transport)
|
|
36
40
|
@skyscanner = Skyscanner.new(self)
|
|
41
|
+
@southwest = Southwest.new(self)
|
|
37
42
|
end
|
|
38
43
|
|
|
39
44
|
# Fetch a URL and return the fully rendered HTML.
|
|
@@ -101,6 +106,18 @@ module ScrapeUnblocker
|
|
|
101
106
|
keyword: keyword, proxy_country: proxy_country, hl: hl, gl: gl)
|
|
102
107
|
end
|
|
103
108
|
|
|
109
|
+
# Search Google Images and return the image results as a Hash.
|
|
110
|
+
#
|
|
111
|
+
# Returns image results, each with the full-size +imageUrl+ and its
|
|
112
|
+
# +sourceDomain+, plus the source page URL, title, source name, thumbnail
|
|
113
|
+
# URL, pixel dimensions and file size. +q+ is the search keyword. Set
|
|
114
|
+
# +proxy_country+ (and optionally +gl+) to target a market, and
|
|
115
|
+
# +max_results+ (1-100) to cap the count.
|
|
116
|
+
def google_images(q, proxy_country: nil, gl: nil, max_results: nil)
|
|
117
|
+
post_json("/images/google-search",
|
|
118
|
+
q: q, gl: gl, max_results: max_results, proxy_country: proxy_country)
|
|
119
|
+
end
|
|
120
|
+
|
|
104
121
|
# Fetch an advertiser's Meta (Facebook) Ad Library ads and return them as a Hash.
|
|
105
122
|
#
|
|
106
123
|
# +advertiser+ is the advertiser name or page to look up. Optional filters:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ScrapeUnblocker
|
|
4
|
+
# Southwest Airlines plugin endpoints (flights).
|
|
5
|
+
class Southwest
|
|
6
|
+
# @api private
|
|
7
|
+
def initialize(client)
|
|
8
|
+
@client = client
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Fetch Southwest Airlines flight quotes and return the raw booking JSON.
|
|
12
|
+
#
|
|
13
|
+
# +origin+ and +dest+ are IATA airport codes (e.g. "DAL", "HOU").
|
|
14
|
+
# +depart_date+ (and the optional +return_date+) are "YYYY-MM-DD"; omit
|
|
15
|
+
# +return_date+ for a one-way search. +adults+ is 1-8. +fare_type+ is
|
|
16
|
+
# "dollars" (default) or "points". +proxy_country+ pins the exit (default
|
|
17
|
+
# "US"). +max_attempts+ is 1-5.
|
|
18
|
+
def flights(origin:, dest:, depart_date:, return_date: nil, adults: 1,
|
|
19
|
+
fare_type: "dollars", proxy_country: "US", max_attempts: 3)
|
|
20
|
+
@client.post_json("/flights/southwest-quotes",
|
|
21
|
+
origin: origin, dest: dest, depart_date: depart_date,
|
|
22
|
+
return_date: return_date, adults: adults,
|
|
23
|
+
fare_type: fare_type, proxy_country: proxy_country,
|
|
24
|
+
max_attempts: max_attempts)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/scrapeunblocker.rb
CHANGED
|
@@ -4,6 +4,7 @@ require_relative "scrapeunblocker/version"
|
|
|
4
4
|
require_relative "scrapeunblocker/errors"
|
|
5
5
|
require_relative "scrapeunblocker/parsed_page"
|
|
6
6
|
require_relative "scrapeunblocker/skyscanner"
|
|
7
|
+
require_relative "scrapeunblocker/southwest"
|
|
7
8
|
require_relative "scrapeunblocker/client"
|
|
8
9
|
|
|
9
10
|
# Official Ruby client for the ScrapeUnblocker web scraping API.
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scrapeunblocker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ScrapeUnblocker
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: JS-rendered pages that bypass Cloudflare, DataDome, PerimeterX and Akamai,
|
|
14
14
|
plus Google SERP and Skyscanner flights/hotels/car-hire scraping as JSON.
|
|
@@ -26,6 +26,7 @@ files:
|
|
|
26
26
|
- lib/scrapeunblocker/errors.rb
|
|
27
27
|
- lib/scrapeunblocker/parsed_page.rb
|
|
28
28
|
- lib/scrapeunblocker/skyscanner.rb
|
|
29
|
+
- lib/scrapeunblocker/southwest.rb
|
|
29
30
|
- lib/scrapeunblocker/version.rb
|
|
30
31
|
homepage: https://scrapeunblocker.com?utm_source=rubygems&utm_medium=integration&utm_campaign=ruby-sdk
|
|
31
32
|
licenses:
|