followers_number 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b245a9fe94280efa09b8247bea217416d42b920f15e623601314f277f0f35a8
4
- data.tar.gz: 16288ef59f639f89e2cbe93a77e1a8d8bddbcba042b4d1bfdc918ec9efcf1c9c
3
+ metadata.gz: 360b76607ee36bff2d9c2aaab08692441dd5189cbcfa22c3e605216e5ddfee51
4
+ data.tar.gz: 1007d13609d788d4fb3acd37e1b82d31b1013665a7b9bf17e9ef797511c94ce9
5
5
  SHA512:
6
- metadata.gz: 08a74883b21741cb5fb7797a63c9ed4d24a5bf73fdb8d4f1713bab08e27b8a175455824913ccbd766941b813b447889b983be35bdd1c4e0be3bf5db9a463752c
7
- data.tar.gz: 329230437d1c176ea00af24ce0adb5ae1bd282a0a3512deb52384133ec07bbf80a32ad9a8fc23d074517cc0104357563f97abb505ea8bffbd2acb4820138b90b
6
+ metadata.gz: 62328452af7b066988dfb1c56e10a3d4a88efac04c2884e3aece2458ad91e52fa758751e0f43574cf18e7732767b43a5b2b1e0ddd111bbc2d1d696e9d538fa4f
7
+ data.tar.gz: b5a386b103b45284cd59bf522fd5aa9265a8ad863c5139105e571ff1202ffcb2f7a45663d5b76bea91627ff818cfdf86c767983667fef9ca90de5e2be176092f
@@ -1,13 +1,17 @@
1
1
  module FollowersNumber
2
2
  class Request
3
3
  def self.get(profile_url)
4
- headers = {
5
- "Content-Language" => "en-US",
6
- "Accept-Language" => "en-US",
7
- "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36",
8
- "Cookie" => ""
9
- }
10
-
4
+ headers = unless profile_url.match(/youtube\.com/)
5
+ {
6
+ "Content-Language" => "en-US",
7
+ "Accept-Language" => "en-US",
8
+ "user-agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36",
9
+ "Cookie" => ""
10
+ }
11
+ else
12
+ {}
13
+ end
14
+
11
15
  ::RestClient::Request.execute(method: :get, url: profile_url, headers: headers)
12
16
  end
13
17
  end
@@ -6,7 +6,7 @@ module FollowersNumber
6
6
  #
7
7
  # @return [String]
8
8
  def to_s
9
- "0.0.5"
9
+ "0.0.6"
10
10
  end
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: followers_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paweł Dąbrowski