kinopoisk_parser 2.2.0 → 2.2.1

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
  SHA1:
3
- metadata.gz: e56c2aead71c161dcf774ec7922462ce05eaf013
4
- data.tar.gz: 5cf48abed4e93df9f0f3e1be871714235bd86555
3
+ metadata.gz: 5362c575a908d7e48722055681bd58d2dbd4d53d
4
+ data.tar.gz: 87254d6cb52e163036fff7619cdecb0f280c766e
5
5
  SHA512:
6
- metadata.gz: e9d094cf5c798f8b361ecdf60e65d3001d0913da828685075a3cb91f6033dff8b0426437cf6f5786fa6d9615313e9d68e719ef21f674d084ba84f169502e5ea0
7
- data.tar.gz: 7a633600b10a91bc67637e69d01f3b1139945d5bdcfda9230d49491707cf65a8f89008faba1002966849bd8303b591b06b0c5915cb0ef6889dcc47af438cabbb
6
+ metadata.gz: db484e4c196c268c9ec45b03ec0b301cf323f018305a971f5b51709f60ff65ac064451e30163a7829ff3f83817cc0a3ad1dd8a1fec6c6b03637717f08d6aafb6
7
+ data.tar.gz: c697317dabc6acaa7b365697c374f0e9017e0b5e68e7a9e102617ea86dd03468e3f9126715b8cfaa0fdc48d02f2a8320000d89c40459ceeae3a8648edb7d630e
data/.travis.yml CHANGED
@@ -1,2 +1,2 @@
1
1
  rvm:
2
- - 1.9.3
2
+ - 2.3.0
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'kinopoisk_parser'
3
- gem.version = '2.2.0'
3
+ gem.version = '2.2.1'
4
4
  gem.authors = ['RavWar']
5
5
  gem.email = ['rav_war@mail.ru']
6
6
  gem.homepage = 'https://github.com/RavWar/kinopoisk_parser'
@@ -182,10 +182,10 @@ module Kinopoisk
182
182
  url = SEARCH_URL + "#{URI.escape(title)}&first=yes"
183
183
  location = Kinopoisk.fetch(url).headers['Location'].to_s
184
184
 
185
- if location.include?('error.kinopoisk.ru')
185
+ if location =~ /error\.kinopoisk\.ru|showcaptcha/
186
186
  raise Denied, 'Request denied'
187
187
  else
188
- location.match(/\/(\d*)\/$/)[1]
188
+ id_match[1] if id_match = location.match(/\/(\d*)\/$/)
189
189
  end
190
190
  end
191
191
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kinopoisk_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RavWar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-04 00:00:00.000000000 Z
11
+ date: 2016-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.6.4
140
+ rubygems_version: 2.6.7
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Easily search and access information on kinopoisk.ru