imdb_title 0.0.13 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/helper.rb +1 -2
- data/lib/imdb_title.rb +7 -12
- data/lib/non_interactive.rb +1 -1
- data/lib/titles/episode.rb +2 -2
- data/lib/titles/movie.rb +2 -2
- data/lib/titles/tv_show.rb +2 -2
- data/lib/titles/video_game.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f2c5057bf1d6d56223c7f768fcaa79f47c32331fce90f649f908cf4fef55cfd
|
4
|
+
data.tar.gz: ed469eb78e72a1ef66ecaf5e0a7ce361318fdc8af74180380924c7c6f57fa37f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 954fbe4623ccb5895bcaed968c8ca5c41dc9411b0a85b4bf4b4f20002f081827166598ae2337a6627551d41ff701dc52f5b77b4d49b81496819348eca1128740
|
7
|
+
data.tar.gz: 6376626339749d8fb376fd0bbb691f448b3a7e2d6ff1f97335eeb596376b3185b7cbe4a2fc78689fc022f74a9202e0f4c46225c05014c809a3824529620f987c
|
data/lib/helper.rb
CHANGED
data/lib/imdb_title.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# load all dependencies
|
4
4
|
require_relative "helper"
|
5
5
|
|
6
|
-
###### ---------------- List of features/data
|
6
|
+
###### ---------------- List of features/data available to extract -----------------------
|
7
7
|
### 1. Cast
|
8
8
|
### 2. Director
|
9
9
|
### 3. Genres
|
@@ -12,7 +12,7 @@ require_relative "helper"
|
|
12
12
|
### 6. Ratings
|
13
13
|
### 7. Title
|
14
14
|
### 8. Tagline
|
15
|
-
### 9.
|
15
|
+
### 9. Production Companies
|
16
16
|
### 10. Release Date
|
17
17
|
|
18
18
|
module IMDb
|
@@ -31,23 +31,18 @@ module IMDb
|
|
31
31
|
|
32
32
|
# lists all top cast (Array)
|
33
33
|
def casts
|
34
|
-
|
35
|
-
return if html.empty?
|
36
|
-
|
37
|
-
html.map(&:text)
|
34
|
+
document.css("a[data-testid=title-cast-item__actor]").map(&:text) || []
|
38
35
|
end
|
39
36
|
|
40
37
|
# list of directors (Array)
|
41
38
|
def directors
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
html.css("div li").map(&:text)
|
39
|
+
element = document.css("li[data-testid=title-pc-principal-credit]").first
|
40
|
+
element&.text&.match?(/Director|Creator/) ? element.css("div li").map(&:text) : []
|
46
41
|
end
|
47
42
|
|
48
43
|
# list of genres (Array)
|
49
44
|
def genres
|
50
|
-
document.css("div[data-testid=
|
45
|
+
document.css("div[data-testid=interests] div a").map(&:text) || []
|
51
46
|
end
|
52
47
|
|
53
48
|
# ID that differentiates each media type on imdb.com (String)
|
@@ -62,7 +57,7 @@ module IMDb
|
|
62
57
|
|
63
58
|
# list of production companies (Array)
|
64
59
|
def production_companies
|
65
|
-
document.css("li[data-testid=title-details-companies] li").map(&:text)
|
60
|
+
document.css("li[data-testid=title-details-companies] li").map(&:text) || []
|
66
61
|
end
|
67
62
|
|
68
63
|
# average ratings (String)
|
data/lib/non_interactive.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
##
|
5
5
|
##
|
6
|
-
###### ---------------- List of features/data
|
6
|
+
###### ---------------- List of features/data available to extract -----------------------
|
7
7
|
### All features are available from Title class
|
8
8
|
|
9
9
|
## 1. duration
|
data/lib/titles/episode.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
##
|
5
5
|
##
|
6
|
-
###### ---------------- List of features/data
|
6
|
+
###### ---------------- List of features/data available to extract -----------------------
|
7
7
|
### All features are available from Title class
|
8
8
|
##
|
9
9
|
##
|
@@ -11,5 +11,5 @@
|
|
11
11
|
|
12
12
|
# features exclusive to Episode media type
|
13
13
|
module Episode
|
14
|
-
|
14
|
+
include NonInteractive
|
15
15
|
end
|
data/lib/titles/movie.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
##
|
5
5
|
##
|
6
|
-
###### ---------------- List of features/data
|
6
|
+
###### ---------------- List of features/data available to extract -----------------------
|
7
7
|
### All features are available from Title class
|
8
8
|
#### ------- BOX OFFICE ---------
|
9
9
|
### 12. Budget
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
# features exclusive to Movie media type
|
16
16
|
module Movie
|
17
|
-
|
17
|
+
include NonInteractive
|
18
18
|
|
19
19
|
# budget (String)
|
20
20
|
def budget
|
data/lib/titles/tv_show.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
##
|
4
4
|
##
|
5
5
|
##
|
6
|
-
###### ---------------- List of features/data
|
6
|
+
###### ---------------- List of features/data available to extract -----------------------
|
7
7
|
### All features are available from Title class
|
8
8
|
##
|
9
9
|
##
|
@@ -11,5 +11,5 @@
|
|
11
11
|
|
12
12
|
# features exclusive to Tv-Show media type
|
13
13
|
module TvShow
|
14
|
-
|
14
|
+
include NonInteractive
|
15
15
|
end
|
data/lib/titles/video_game.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imdb_title
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juzer Shakir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -65,8 +65,9 @@ licenses:
|
|
65
65
|
- MIT
|
66
66
|
metadata:
|
67
67
|
source_code_uri: https://github.com/JuzerShakir/imdb
|
68
|
-
changelog_uri: https://github.com/JuzerShakir/imdb/CHANGELOG.md
|
69
|
-
bug_tracker_uri: https://github.com/JuzerShakir/imdb/
|
68
|
+
changelog_uri: https://github.com/JuzerShakir/imdb/blob/master/CHANGELOG.md
|
69
|
+
bug_tracker_uri: https://github.com/JuzerShakir/imdb/issues
|
70
|
+
rubygems_mfa_required: 'true'
|
70
71
|
post_install_message:
|
71
72
|
rdoc_options: []
|
72
73
|
require_paths:
|
@@ -75,14 +76,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
76
|
requirements:
|
76
77
|
- - ">="
|
77
78
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
79
|
+
version: '3.1'
|
79
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
81
|
requirements:
|
81
82
|
- - ">="
|
82
83
|
- !ruby/object:Gem::Version
|
83
84
|
version: '0'
|
84
85
|
requirements: []
|
85
|
-
rubygems_version: 3.
|
86
|
+
rubygems_version: 3.5.23
|
86
87
|
signing_key:
|
87
88
|
specification_version: 4
|
88
89
|
summary: Access info of any Movie, Tv Show, Episode or Game from imdb.com
|