yayimdbs 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/yay_imdbs.rb +2 -1
  2. metadata +3 -3
data/lib/yay_imdbs.rb CHANGED
@@ -221,8 +221,9 @@ class YayImdbs
221
221
 
222
222
  def get_title_and_year_from_meta(doc)
223
223
  title_text = doc.at_css("meta[name='title']").try(:[], 'content')
224
+ title_text = title_text.sub(/^IMDb - /, '')
224
225
  # Matches 'Movie Name (2010)' or 'Movie Name (2010/I)' or 'Lost (TV Series 2004–2010)'
225
- if title_text && title_text =~ /(.*) \([^\)0-9]*(\d{4})((\/\w*)|(.\d{4}))?\)/
226
+ if title_text && title_text =~ /(.*) \([^\)0-9]*(\d{4})((\/\w*)|(.\d{4})|(.\s))?\)/
226
227
  movie_title = clean_title($1)
227
228
  movie_year = $2.to_i
228
229
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 4
9
- version: 0.2.4
8
+ - 5
9
+ version: 0.2.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Cavenagh
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-02 00:00:00 +10:00
17
+ date: 2011-08-29 00:00:00 +10:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency