imdb_movies 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/NOTES.md +33 -0
- data/README.md +25 -0
- data/Rakefile +6 -0
- data/bin/console +15 -0
- data/bin/imdb_movies +5 -0
- data/bin/setup +6 -0
- data/imdb_movies.gemspec +28 -0
- data/lib/imdb_movies/cli.rb +74 -0
- data/lib/imdb_movies/display.rb +35 -0
- data/lib/imdb_movies/imdb_scraper.rb +52 -0
- data/lib/imdb_movies/movie.rb +75 -0
- data/lib/imdb_movies/movie_links_scraper.rb +46 -0
- data/lib/imdb_movies/version.rb +3 -0
- data/lib/imdb_movies.rb +10 -0
- metadata +134 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3c2f8839a8061d81c2f0d7807ae1ce58151c8912
|
4
|
+
data.tar.gz: 17a952c02e8ec397a70ff52df0657c6c967d95cb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cd8a83f14958b092817214a31b44be3631cb5c05e4e81f56392965db8ca5b766d69ad63265897a45833b7587ac2b8144e96abd09833ca45a5c23654b45e47189
|
7
|
+
data.tar.gz: ef1589fdfff6b313a5e89300587fbbd9ee7b9e6b55aac64a0f7395fab4ec066bafa3043b938a082d169e333329467dddf63cff6329ee78c192c146f51a065319
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 azheng249
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/NOTES.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
Starting project Saturday, January 16, 2016
|
2
|
+
|
3
|
+
Project name: imdb_movies
|
4
|
+
Description:
|
5
|
+
__________________________________________
|
6
|
+
|
7
|
+
- User types 'imdb_movies'
|
8
|
+
- Should open up CLI greeting the user and shows them some movies based on category:
|
9
|
+
Now Playing, Opening This Week and Coming Soon
|
10
|
+
- Each category should show the first 3 movies in the categories
|
11
|
+
- User can get more information by navigating and choosing specific movie from a list of movies
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
What is a movie?
|
16
|
+
_________________
|
17
|
+
|
18
|
+
Movie should show:
|
19
|
+
|
20
|
+
1- Movie name
|
21
|
+
2- Release date
|
22
|
+
3- Movie rating (PG, PG-13, R, etc.)
|
23
|
+
4- Movie length
|
24
|
+
5- Genre
|
25
|
+
6- Director(s)
|
26
|
+
7- Writer(s)
|
27
|
+
8- Cast
|
28
|
+
9- IMDB Rating (for movies already released)
|
29
|
+
10- Youtube link to trailer (can enter input to open trailer)
|
30
|
+
|
31
|
+
|
32
|
+
##################
|
33
|
+
Ready to publish on Monday, January, 18, 2016
|
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# IMDB Movies
|
2
|
+
|
3
|
+
Welcome to IMDB Movies. This is a Ruby gem that works through CLI. It pulls the info for top current and upcoming films on IMDB's website. Use the CLI to navigate and display information about films you are curious about. Want to see the trailer? We can show it to you.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
When loaded, the movies will display in 3 categories: Opening This Week, Now Playing, and Coming Soon. The CLI works through text input and is not case sensitive.
|
8
|
+
|
9
|
+
The program only displays the first 5 movies in each category if available. To see more movies, enter '1' or 'opening this week', '2' or 'now playing' and '3' or 'coming soon'. I personally recommend '1/2/3'.
|
10
|
+
|
11
|
+
To display information about a movie that you are interested in, enter the movie name. It can be a section of the full movie name.
|
12
|
+
Example: 'Star Wars: The Force Awakens' can be listed with 'star wars'.
|
13
|
+
|
14
|
+
After the movie's info is displayed you have the option of watching the Youtube trailer if you are interested. Just enter 'y' or 'yes' when asked.
|
15
|
+
|
16
|
+
When you are done, simple type 'exit' or 'quit' to leave the application.
|
17
|
+
|
18
|
+
## Contributing
|
19
|
+
|
20
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/azheng249/imdb_movies. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
21
|
+
|
22
|
+
## License
|
23
|
+
|
24
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
25
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "imdb_movies"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
15
|
+
imdb_movies
|
data/bin/imdb_movies
ADDED
data/bin/setup
ADDED
data/imdb_movies.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'imdb_movies/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "imdb_movies"
|
8
|
+
spec.version = ImdbMovies::VERSION
|
9
|
+
spec.authors = ["azheng249"]
|
10
|
+
spec.email = ["andy.zheng249@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Look at current/upcoming movies via. IMDB's website}
|
13
|
+
spec.description = %q{Navigate the CLI menu. View info and play trailers for upcomng films.}
|
14
|
+
spec.homepage = "https://github.com/azheng249/imdb_movies"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "bin"
|
19
|
+
spec.executables = ["imdb_movies"]
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "nokogiri"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
spec.add_development_dependency "pry"
|
28
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# CLI Controller
|
2
|
+
class ImdbMovies::CLI
|
3
|
+
|
4
|
+
attr_accessor :imdb_page, :nav_links, :movie_links
|
5
|
+
|
6
|
+
SKIP_MENU_DISPLAY = ["1", "2", "3", "opening this week", "now playing", "coming soon", "exit", "quit", ""]
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@nav_links, @movie_links = [], []
|
10
|
+
@imdb_page = ImdbScraper.new.scrape
|
11
|
+
|
12
|
+
@imdb_page.each{|cat| @nav_links << cat[0][1] }
|
13
|
+
@imdb_page.each{|cat| cat[1].movie_links.each{|movie| @movie_links << movie}}
|
14
|
+
end
|
15
|
+
|
16
|
+
# Main CLI
|
17
|
+
def call
|
18
|
+
puts "\nWelcome to IMDB Movies. Here are some current movies: \n\n"
|
19
|
+
|
20
|
+
user_input = nil
|
21
|
+
|
22
|
+
main_menu
|
23
|
+
|
24
|
+
until user_input == "exit" || user_input == "quit"
|
25
|
+
puts "\nYou can enter 1-3, a specific movie name, 'menu' or 'exit/quit'."
|
26
|
+
print "Input : "
|
27
|
+
|
28
|
+
user_input = gets.strip.downcase
|
29
|
+
input(user_input, movie_links)
|
30
|
+
|
31
|
+
# Only displays the menu again if they entered a movie name or 'menu'
|
32
|
+
main_menu if !SKIP_MENU_DISPLAY.include?(user_input)
|
33
|
+
end
|
34
|
+
|
35
|
+
puts "\n\nThank You for using IMDB Movies."
|
36
|
+
end
|
37
|
+
|
38
|
+
# Displays categories (opening this week, now playing, coming soon)
|
39
|
+
def main_menu
|
40
|
+
|
41
|
+
# Displays categories
|
42
|
+
@imdb_page.each.with_index(1){|section, index|
|
43
|
+
puts "\n#{index} - #{section[0][0].gsub(/\(\w+\)/, '')}"
|
44
|
+
section[1].movie_links[0...5].each{|movie|
|
45
|
+
puts "\t\t#{movie[0]}"
|
46
|
+
}
|
47
|
+
puts "\tEnter '#{index}' to see more."
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Gets user's input and calls a different navigation methood based on input
|
52
|
+
def input(user_input, movie_links)
|
53
|
+
|
54
|
+
case user_input
|
55
|
+
when "", "menu", "exit", "quit"
|
56
|
+
when "1", "opening this week"
|
57
|
+
Display.new(@imdb_page[0][1]).opening
|
58
|
+
when "2", "now playing"
|
59
|
+
Display.new(@imdb_page[1][1]).now_playing
|
60
|
+
when "3", "coming soon"
|
61
|
+
Display.new(@imdb_page[2][1]).coming_soon
|
62
|
+
|
63
|
+
# When movie is entered it calls Display.movie
|
64
|
+
# Otherwise it outputs a message.
|
65
|
+
else
|
66
|
+
# Nil if movie was not found
|
67
|
+
movie_link = movie_links.detect { |m|
|
68
|
+
m[0].downcase.include?(user_input) }
|
69
|
+
|
70
|
+
movie_link ? (Display.new().movie(movie_link[1])) : (puts "\nI'm sorry I don't know what you mean.")
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class Display
|
2
|
+
|
3
|
+
attr_accessor :links
|
4
|
+
|
5
|
+
def initialize(links = nil)
|
6
|
+
@links = links
|
7
|
+
end
|
8
|
+
|
9
|
+
def opening
|
10
|
+
puts @links.opening_week + "\n\n"
|
11
|
+
@links.movie_links.each{|m| puts "\t\t#{m[0]}"}
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
def now_playing
|
16
|
+
puts "Now Playing\n\n"
|
17
|
+
@links.movie_links.each{|m| puts "\t\t#{m[0]}"}
|
18
|
+
end
|
19
|
+
|
20
|
+
def coming_soon
|
21
|
+
puts "Coming Soon - \t" + @links.opening_week + "\n\n"
|
22
|
+
@links.movie_links.each{|m| puts "\t\t#{m[0]}"}
|
23
|
+
end
|
24
|
+
|
25
|
+
def movie(movie_url)
|
26
|
+
movie = Movie.new(movie_url)
|
27
|
+
movie.display_info
|
28
|
+
|
29
|
+
print "\nDo you want to see the trailer for this movie (Y/N):\t"
|
30
|
+
user_input = gets.strip.downcase
|
31
|
+
|
32
|
+
movie.open_trailer if user_input == "y" || user_input == "yes"
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Scrapes IMDB's main page for movie titles and links on right sidebar
|
2
|
+
class ImdbScraper
|
3
|
+
|
4
|
+
IMDB = "http://www.imdb.com"
|
5
|
+
|
6
|
+
attr_accessor :category_info
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@category_info = []
|
10
|
+
end
|
11
|
+
|
12
|
+
def scrape
|
13
|
+
doc = Nokogiri::HTML(open(IMDB))
|
14
|
+
sections = doc.css("#sidebar div.aux-content-widget-2")
|
15
|
+
|
16
|
+
categories = []
|
17
|
+
|
18
|
+
sections.each{|s|
|
19
|
+
category = s.css(".widget_header .oneline h3").text
|
20
|
+
begin
|
21
|
+
category_link = IMDB + s.css(".seemore a").attr("href").value if category != ""
|
22
|
+
rescue NoMethodError
|
23
|
+
end
|
24
|
+
|
25
|
+
begin
|
26
|
+
category_movies = MovieLinksScraper.new(category_link)
|
27
|
+
case category
|
28
|
+
when "Opening This Week"
|
29
|
+
category_movies.opening
|
30
|
+
when "Now Playing (Box Office)"
|
31
|
+
category_movies.now_playing
|
32
|
+
when "Coming Soon"
|
33
|
+
category_movies.coming_soon
|
34
|
+
end
|
35
|
+
movie_links = category_movies
|
36
|
+
rescue NoMethodError
|
37
|
+
end
|
38
|
+
|
39
|
+
# Only save parts with movies
|
40
|
+
# IMDB's site uses the same classes for every sidebar div
|
41
|
+
# No ids to differentiate movies from tv shows and social media
|
42
|
+
case category
|
43
|
+
when "Opening This Week", "Now Playing (Box Office)", "Coming Soon"
|
44
|
+
categories.push([[category, category_link], movie_links])
|
45
|
+
end
|
46
|
+
}
|
47
|
+
|
48
|
+
categories
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# Accepts a url from IMDB on initialization and scrapes info for that movie
|
2
|
+
class Movie
|
3
|
+
attr_accessor :url, :name, :movie_rating, :length, :genres, :release_date, :imdb_rating, :description, :directors, :writers, :cast, :trailer_link
|
4
|
+
|
5
|
+
def initialize(url)
|
6
|
+
@url = url
|
7
|
+
|
8
|
+
scrape_info
|
9
|
+
end
|
10
|
+
|
11
|
+
# Scrape and store info
|
12
|
+
def scrape_info
|
13
|
+
info = Nokogiri::HTML(open(@url)).css(".article.title-overview")
|
14
|
+
|
15
|
+
@name = info.css("tbody h1.header span[itemprop = 'name']").text.strip
|
16
|
+
|
17
|
+
begin
|
18
|
+
@movie_rating = info.css(".infobar meta[itemprop = 'contentRating']").attr("content").value.strip
|
19
|
+
rescue NoMethodError
|
20
|
+
end
|
21
|
+
|
22
|
+
@length = info.css(".infobar time[itemprop = 'duration']").text.strip
|
23
|
+
@release_date = info.css("a[title = 'See all release dates']").text.strip.gsub(/\s+/, " ")
|
24
|
+
@imdb_rating = info.css(".titlePageSprite.star-box-giga-star").text.strip
|
25
|
+
@description = info.css("p[itemprop = 'description']").text.strip
|
26
|
+
|
27
|
+
genres = info.css("span[itemprop = 'genre']")
|
28
|
+
@genres = []
|
29
|
+
genres.each{|g| @genres << g.text }
|
30
|
+
@genres = @genres.join(", ")
|
31
|
+
|
32
|
+
directors = info.css("div[itemprop = 'director'] span[itemprop = 'name']")
|
33
|
+
@directors = []
|
34
|
+
directors.each{|d| @directors << d.text}
|
35
|
+
|
36
|
+
writers = info.css("div[itemprop = 'creator'] span[itemprop = 'name']")
|
37
|
+
@writers = []
|
38
|
+
writers.each{|w| @writers << w.text}
|
39
|
+
|
40
|
+
cast = info.css("div[itemprop = 'actors'] span[itemprop = 'name']")
|
41
|
+
@cast = []
|
42
|
+
cast.each{|c| @cast << c.text}
|
43
|
+
|
44
|
+
@trailer_link = trailer
|
45
|
+
end
|
46
|
+
|
47
|
+
# Scrapes Youtube search results for first video link
|
48
|
+
# searches movie name + ' trailer'
|
49
|
+
def trailer
|
50
|
+
name = @name.downcase.split(/\W+/).join("+")
|
51
|
+
youtube_search = "https://www.youtube.com/results?search_query="
|
52
|
+
youtube_search_query = Nokogiri::HTML(open(youtube_search + name + "+trailer", ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE))
|
53
|
+
|
54
|
+
trailer_link = "https://youtube.com" + youtube_search_query.css("#results ol.section-list li ol.item-section li div.yt-lockup-dismissable div.yt-lockup-content h3.yt-lockup-title a").attr("href").value
|
55
|
+
end
|
56
|
+
|
57
|
+
def display_info
|
58
|
+
puts "\n#{@name}\n\n"
|
59
|
+
puts "Movie Rating: \t#{@movie_rating}"
|
60
|
+
puts "Length: \t#{@length}"
|
61
|
+
puts "Genre: \t\t#{@genres}"
|
62
|
+
puts "Release Date: \t#{@release_date}"
|
63
|
+
@imdb_rating != "" ? (puts "IMDB Rating: \t#{@imdb_rating}/10.0") : (puts "IMDB Rating: \tNo Ratings Yet")
|
64
|
+
puts "Description: \t#{@description}"
|
65
|
+
puts "Director(s): \t#{@directors.join(", ")}"
|
66
|
+
puts "Writer(s): \t#{@writers.join(", ")}"
|
67
|
+
puts "Cast: \t\t#{@cast.join(", ")}"
|
68
|
+
puts "\nTrailer: \t#{@trailer_link}"
|
69
|
+
end
|
70
|
+
|
71
|
+
def open_trailer
|
72
|
+
exec("open #{@trailer_link}")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class MovieLinksScraper
|
2
|
+
attr_accessor :movie_links, :url, :opening_week
|
3
|
+
|
4
|
+
IMDB = "http://www.imdb.com"
|
5
|
+
|
6
|
+
def initialize(url)
|
7
|
+
# Array of arrays, each with movie name and link
|
8
|
+
@movie_links = []
|
9
|
+
|
10
|
+
@url = url
|
11
|
+
end
|
12
|
+
|
13
|
+
def opening
|
14
|
+
doc = Nokogiri::HTML(open(@url))
|
15
|
+
movie_links = doc.css(".article .list")[1].css(".list_item h4[itemprop = 'name'] a")
|
16
|
+
begin
|
17
|
+
movie_links.each{|m_link| @movie_links.push( [ m_link.text.gsub(/\(\w+\)/, ""), (IMDB + m_link.attr("href")) ] )}
|
18
|
+
rescue NoMethodError
|
19
|
+
end
|
20
|
+
|
21
|
+
@opening_week = doc.css(".article .list h3").first.text
|
22
|
+
@movie_links
|
23
|
+
end
|
24
|
+
|
25
|
+
def now_playing
|
26
|
+
doc = Nokogiri::HTML(open(@url))
|
27
|
+
movie_links = doc.css("tbody tr td.titleColumn a")
|
28
|
+
begin
|
29
|
+
movie_links.each{|m_link| @movie_links.push( [ m_link.text.gsub(/\(\w+\)/, ""), (IMDB + m_link.attr("href")) ] )}
|
30
|
+
rescue NoMethodError
|
31
|
+
end
|
32
|
+
@movie_links
|
33
|
+
end
|
34
|
+
|
35
|
+
def coming_soon
|
36
|
+
doc = Nokogiri::HTML(open(@url))
|
37
|
+
movie_links = doc.css(".list.detail .list_item h4[itemprop = 'name'] a")
|
38
|
+
begin
|
39
|
+
movie_links.each{|m_link| @movie_links.push( [ m_link.text.gsub(/\(\w+\)/, ""), (IMDB + m_link.attr("href")) ] )}
|
40
|
+
rescue NoMethodError
|
41
|
+
end
|
42
|
+
|
43
|
+
@opening_week = doc.css(".list.detail h4.li_group a").first.text
|
44
|
+
@movie_links
|
45
|
+
end
|
46
|
+
end
|
data/lib/imdb_movies.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require_relative "./imdb_movies/version"
|
2
|
+
require_relative "./imdb_movies/cli"
|
3
|
+
require_relative "./imdb_movies/display"
|
4
|
+
require_relative "./imdb_movies/imdb_scraper"
|
5
|
+
require_relative "./imdb_movies/movie.rb"
|
6
|
+
require_relative "./imdb_movies/movie_links_scraper"
|
7
|
+
|
8
|
+
require 'open-uri'
|
9
|
+
require 'openssl'
|
10
|
+
require 'nokogiri'
|
metadata
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: imdb_movies
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- azheng249
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Navigate the CLI menu. View info and play trailers for upcomng films.
|
84
|
+
email:
|
85
|
+
- andy.zheng249@gmail.com
|
86
|
+
executables:
|
87
|
+
- imdb_movies
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- ".travis.yml"
|
93
|
+
- CODE_OF_CONDUCT.md
|
94
|
+
- Gemfile
|
95
|
+
- LICENSE.txt
|
96
|
+
- NOTES.md
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- bin/console
|
100
|
+
- bin/imdb_movies
|
101
|
+
- bin/setup
|
102
|
+
- imdb_movies.gemspec
|
103
|
+
- lib/imdb_movies.rb
|
104
|
+
- lib/imdb_movies/cli.rb
|
105
|
+
- lib/imdb_movies/display.rb
|
106
|
+
- lib/imdb_movies/imdb_scraper.rb
|
107
|
+
- lib/imdb_movies/movie.rb
|
108
|
+
- lib/imdb_movies/movie_links_scraper.rb
|
109
|
+
- lib/imdb_movies/version.rb
|
110
|
+
homepage: https://github.com/azheng249/imdb_movies
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata: {}
|
114
|
+
post_install_message:
|
115
|
+
rdoc_options: []
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
requirements: []
|
129
|
+
rubyforge_project:
|
130
|
+
rubygems_version: 2.5.1
|
131
|
+
signing_key:
|
132
|
+
specification_version: 4
|
133
|
+
summary: Look at current/upcoming movies via. IMDB's website
|
134
|
+
test_files: []
|