Skip to content

Latest commit

 

History

History

0x14-javascript-web_scraping

0x14. Javascript - Web scraping

0x14. JavaScript - Web scraping Mandatory Tasks 📃 0. Readme Write a script that reads and prints the content of a file.

Requirements: The first argument is the file path The content of the file must be read in utf-8 If an error occurred during the reading, print the error object

  1. Write me Write a script that writes a string to a file.

Requirements: The first argument is the file path The second argument is the string to write The content of the file must be written in utf-8 If an error occurred during while writing, print the error object

  1. Status code Write a script that display the status code of a GET request.

Requirements: The first argument is the URL to request (GET) The status code must be printed like this: code: You must use the module request

  1. Star wars movie title Write a script that prints the title of a Star Wars movie where the episode number matches a given integer.

Requirements The first argument is the movie ID You must use the Star wars API with the endpoint https://swapi-api.alx-tools.com/api/films/:id You must use the module request

  1. Star wars Wedge Antilles Write a script that prints the number of movies where the character “Wedge Antilles” is present.

Requirements The first argument is the API URL of the Star wars API: https://swapi-api.alx-tools.com/api/films/ Wedge Antilles is character ID 18 - your script must use this ID for filtering the result of the API You must use the module request

  1. Loripsum Write a script that gets the contents of a webpage and stores it in a file.

Requirements The first argument is the URL to request The second argument the file path to store the body response The file must be UTF-8 encoded You must use the module request

  1. How many completed? Write a script that computes the number of tasks completed by user id.

Requirements The first argument is the API URL: https://jsonplaceholder.typicode.com/todos Only print users with completed task You must use the module request

Advanced Tasks 📃 7. Who was playing in this movie? Write a script that prints all characters of a Star Wars movie

Requirements The first argument is the Movie ID - example: 3 = “Return of the Jedi” Display one character name by line You must use the Star wars API You must use the module request

  1. Right order Write a script that prints all characters of a Star Wars movie

Requirements The first argument is the Movie ID - example: 3 = “Return of the Jedi” Display one character name by line in the same order of the list “characters” in the /films/ response You must use the Star wars API You must use the module request

Author Prince Solomon https://github.com/princexz