Homework 13 - connicov1/saltedge_courses_2019 GitHub Wiki
Homework lesson 13
Gems needed for work:
require 'watir'
require 'nokogiri'
Your task is to write a script that contains class Kinopoisk
that does all the following:
-
Go to the
kinopoisk.ru
and search your favorite three movies using gemwatir
-
Parse HTML of the movie's main page(pic. A) using gem
nokogiri
Example code:
page = Nokogiri::HTML.parse(browser.html)
-
Return an array of hashes with the following components:
Name, Year, Genre, Country, Director, 5 main actors
Example output:
[
{
"Меч короля Артура":{
"year": "2017",
"genre": "фэнтези",
"country": "США",
"director": "Гай Ричи",
"5 main actors": [
"Чарли Ханнэм",
"Астрид Берже-Фрисби",
"Джуд Лоу",
"Джимон Хонсу",
"Эрик Бана"
]
}
}
]