flaresolverr 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -0
  3. data/lib/flaresolverr.rb +6 -5
  4. 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: 737be641297661d7fb8fba399f9adc227cb9e40edccbd44db4d53526a0de4009
4
+ data.tar.gz: fea89ff91a29ccd25f6e08fe104b2bc1a78ffdc2bb6362a3fbfcacfad7608687
5
5
  SHA512:
6
- metadata.gz: b25cf1cba6e5b12d52f309d05d85aea263e41d2d49fcc0c4b33d18ed3c3521932d7d84336505c3a0ccd3e33a8d4940cba48aeceb7a67d37eefcac8ffe2359b6b
7
- data.tar.gz: ad339aa6a7b034e34b91467fbfa17c5613106a12e4e81bdcd162dac2371a04d835f74e4937d61f19c920ead9e46edd1c64b250d0167f9fe0bd581e14f50e533a
6
+ metadata.gz: aa36c2147ed700eafe3fecdd84e047e99aa73df86b2514be3f12dc4ee8128f572f9a63fdd4d28767188f430fa09aecf02366294b069cbbaa6a38a437f2bc53f1
7
+ data.tar.gz: 7ca8c23c74603317788b1934af033249e5dd4b817122c50668e54de708344f077e1c51b4175d2731d0ba2ea1f262610c00c67c63f4b3bdbcfff7a48a4a46b466
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.1.1"
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)[:solution]
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.1.1
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: []