adspower-client 1.0.16 → 1.0.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b196d617707b812d5e87b904ccd55beb1230522d8d5b2bc81c38ac390e19083
4
- data.tar.gz: a5a2da96222347a99953c923a31fa34d73f9c5b1cbff0426cd31b00c095cd9a1
3
+ metadata.gz: 0fa9af194c360323a9ddb4533f0be4df21414e2a3645fdebb03a9a13eb315183
4
+ data.tar.gz: 474d47d140310200db7919c293e260761e90f33bbeef72ad923b27cfdbb180e2
5
5
  SHA512:
6
- metadata.gz: ea9fc969ed0823856448a27a66ad1bf1b96553d85fa710772abd7035449111f3e430f2bcead285b05c3bad3ad74f716620fb1f065b04e1a2d4a81351e3553767
7
- data.tar.gz: 9b46991822d21c1ea0c2ac3f107a083fb0d77d7e776a9cfbb2a9ab79a19050cf74bf5e55078e7e16581a3df240d9265b00f83525a19a2c7950bbab88a1e561a6
6
+ metadata.gz: 3e39840a574b00918fc9365be4ee9ffde97c8d9bdbcc4017184a2b4589dd99de31c6c6cc0e7a4eb14f6506b0e8e686ffe96f256d69dd7688dd379de9bab61b0d
7
+ data.tar.gz: 93957f83998d804fe74a423337fb13afa8bff70ed1eddb74a4da0f7cd9722b857eed3870797670ce71c8387e3f7cab745752c48df7f6c5b9520e9f3d8b21c152
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'adspower-client'
3
- s.version = '1.0.16'
3
+ s.version = '1.0.17'
4
4
  s.date = '2025-07-27'
5
5
  s.summary = "Ruby library for operating AdsPower API."
6
6
  s.description = "Ruby library for operating AdsPower API."
@@ -199,6 +199,7 @@ class AdsPowerClient
199
199
  # @param proxy_config [Hash] keys: :ip, :port, :user, :password, :proxy_soft (default 'other'), :proxy_type (default 'http')
200
200
  # @param group_id [String] which AdsPower group to assign (default '0')
201
201
  # @param browser_version [String] optional Chrome version to use (must match Chromedriver). Only applies if `fingerprint` is nil, as custom fingerprints override kernel settings.
202
+ # @param os [String] target OS for Chrome binary (one of 'linux64', 'mac-x64', 'mac-arm64', 'win32', 'win64'; default 'linux64'); used to filter the known-good versions JSON so we pick a build that actually ships for that platform
202
203
  # @param fingerprint [Hash, nil] optional fingerprint configuration. If not provided, a stealth-ready default is applied with DNS-over-HTTPS, spoofed WebGL/Canvas/audio, consistent User-Agent and locale, and hardening flags to minimize detection risks from tools like BrowserScan, Cloudflare, and Arkose Labs.
203
204
  # @param platform [String] (optional) target site domain, e.g. 'linkedin.com'
204
205
  # @param tabs [Array<String>] (optional) array of URLs to open on launch
@@ -211,7 +212,8 @@ class AdsPowerClient
211
212
  proxy_config:,
212
213
  group_id: '0',
213
214
  browser_version: nil,
214
- fingerprint: nil,
215
+ os: 'linux64',# new: one of linux64, mac-x64, mac-arm64, win32, win64
216
+ fingerprint: nil,
215
217
  platform: '', # default: no platform
216
218
  tabs: [], # default: no tabs to open
217
219
  username: '', # default: no login
@@ -228,10 +230,14 @@ class AdsPowerClient
228
230
  raise "Error fetching Chrome versions: HTTP #{resp.code}"
229
231
  end
230
232
  listing = JSON.parse(resp.body)
231
- versions = listing['versions'] || []
232
- # find all entries matching the major.minor prefix
233
- matches = versions.map { |v| v['version'] }
234
- .select { |ver| ver.start_with?("#{browser_version}.") }
233
+ entries = listing['versions'] || []
234
+ # keep only those entries whose version matches prefix *and* has a download for our OS
235
+ matches = entries.
236
+ select { |e|
237
+ e['version'].start_with?("#{browser_version}.") &&
238
+ e.dig('downloads','chrome').any? { |d| d['platform'] == os }
239
+ }.
240
+ map { |e| e['version'] }
235
241
  if matches.empty?
236
242
  raise "Chrome version '#{browser_version}' not found in known-good versions list"
237
243
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adspower-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi