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 +4 -4
- data/lib/followers_number/request.rb +11 -7
- data/lib/followers_number/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 360b76607ee36bff2d9c2aaab08692441dd5189cbcfa22c3e605216e5ddfee51
|
4
|
+
data.tar.gz: 1007d13609d788d4fb3acd37e1b82d31b1013665a7b9bf17e9ef797511c94ce9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|