flaresolverr 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/LICENSE +21 -0
  4. data/lib/flaresolverr.rb +6 -5
  5. metadata +5 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 805eaa37e21156739353ec23d214423de94840dcf60d26f457bef2e8c88cc03e
4
- data.tar.gz: a95a8e5619094708ff96e25feccb9990317a6e494cc3f5965c0dbdb2c31a7a86
3
+ metadata.gz: 3d4a7a1ffd013026d53954f5694d528097d6ec7439b7cb0d82a02b06caef5bc5
4
+ data.tar.gz: b81cd9894fbf577183ba00d17c899c6c08a3c6bce3fbe76add8ac75cca3505de
5
5
  SHA512:
6
- metadata.gz: b25cf1cba6e5b12d52f309d05d85aea263e41d2d49fcc0c4b33d18ed3c3521932d7d84336505c3a0ccd3e33a8d4940cba48aeceb7a67d37eefcac8ffe2359b6b
7
- data.tar.gz: ad339aa6a7b034e34b91467fbfa17c5613106a12e4e81bdcd162dac2371a04d835f74e4937d61f19c920ead9e46edd1c64b250d0167f9fe0bd581e14f50e533a
6
+ metadata.gz: a8630e33d08e1c302a7b8235d1efa945970d5e07456d283f5f04fc4132fefb14ef01bb3a4ec6b0391058c36155359e0e1d316838060943cde5d0f0d81b47a0c8
7
+ data.tar.gz: c223530ae4b843079bfdf40c92916029246d70dd4564e5504eb9e7fb2755cad4c570314caa7563f924a06195ff80c837bf76383098f099a4ec3532aa34d9f34f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2023-01-07
4
+
5
+ - Return entire FlareSolver API response, not just the `solution`
6
+
3
7
  ## [0.1.0] - 2023-01-07
4
8
 
5
9
  - Initial release
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2023 Eddie Lebow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/lib/flaresolverr.rb CHANGED
@@ -5,7 +5,7 @@ require "json"
5
5
  require "net/http"
6
6
 
7
7
  module FlareSolverr
8
- VERSION = "0.1.0"
8
+ VERSION = "0.2.0"
9
9
 
10
10
  def self.request(url, method: :get, cookies: nil)
11
11
  args = {
@@ -16,11 +16,12 @@ module FlareSolverr
16
16
  postData: ("todo" if method == :post) # TODO
17
17
  }.compact
18
18
 
19
- puts args
19
+ response_json = Net::HTTP.post(URI("http://localhost:8191/v1"),
20
+ args.to_json,
21
+ { "Content-Type" => "application/json" })
22
+ .body
20
23
 
21
- Net::HTTP.post(URI("http://localhost:8191/v1"),
22
- args.to_json,
23
- { "Content-Type" => "application/json" })
24
+ JSON.parse(response_json, symbolize_names: true)
24
25
  end
25
26
 
26
27
  def self.create_image
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flaresolverr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eddie Lebow
@@ -35,11 +35,13 @@ files:
35
35
  - CHANGELOG.md
36
36
  - Gemfile
37
37
  - Gemfile.lock
38
+ - LICENSE
38
39
  - README.md
39
40
  - lib/flaresolverr.rb
40
41
  - sig/flaresolverr.rbs
41
42
  homepage: https://github.com/elebow/ruby-flaresolverr
42
- licenses: []
43
+ licenses:
44
+ - MIT
43
45
  metadata:
44
46
  rubygems_mfa_required: 'true'
45
47
  homepage_uri: https://github.com/elebow/ruby-flaresolverr
@@ -63,5 +65,5 @@ requirements: []
63
65
  rubygems_version: 3.4.1
64
66
  signing_key:
65
67
  specification_version: 4
66
- summary: Ruby API for Flaresolverr proxy.
68
+ summary: Ruby API for FlareSolverr proxy.
67
69
  test_files: []