library(rvest)
library(robotstxt)
Question 5
films <- "https://en.wikipedia.org/wiki/2026_in_film"
paths_allowed(films)
## Warning: package 'future' was built under R version 4.5.2
## en.wikipedia.org
## [1] TRUE
Question 6
films_html <- read_html(films)
films_table <- html_table(films_html)
top10_films <- films_table[[3]]
top10_films
## # A tibble: 10 × 4
## Rank Title Distributor `Worldwide gross`
## <int> <chr> <chr> <chr>
## 1 1 Spider-Man: Brand New Day † Sony $2,523,147,515
## 2 2 The Odyssey Universal $1,804,356,298
## 3 3 Toy Story 5 Disney $1,149,474,196
## 4 4 Michael Lionsgate / Universal $1,028,703,388
## 5 5 The Super Mario Galaxy Movie Universal $1,013,278,851
## 6 6 The Devil Wears Prada 2 20th Century $693,492,689
## 7 7 Project Hail Mary Amazon MGM / Sony $685,040,805
## 8 8 Pegasus 3 Maoyan $656,459,523
## 9 9 Minions & Monsters Universal $530,319,698
## 10 10 Obsession Focus / Universal $524,535,537