Skip to content

Latest commit

 

History

History

0x14-javascript-web_scraping

Project Name

0x14. JavaScript - Web scraping

Author's Details

Name: Wendy Munyasi.

Email: wendymunyasi@gmail.com

Tel: +254707240068.

Requirements

JavaScript Scripts

  • Allowed editors: vi, vim, emacs.
  • All your files will be interpreted on Ubuntu 20.04 LTS using node (version 14.x).
  • All your files should end with a new line.
  • The main.js files are used to test your functions, but you don’t have to push them to your repo.
  • The first line of all your files should be exactly #!/usr/bin/node.
  • Your code should be semistandard compliant (version 16.x.x).
  • All your files must be executable.
  • The length of your files will be tested using wc.
  • You are not allowed to use var.

Project Description

Learn how to manipulate JSON data. How to use request and fetch API. How to read and write a file using fs module.

More Info

Install Node 14

$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt-get install -y nodejs

Install semi-standard

Documentation

$ sudo npm install semistandard --global

Install request module and use it

Documentation

$ sudo npm install request --global
$ export NODE_PATH=/usr/lib/node_modules
  • 0. Readme - Write a script that reads and prints the content of a file.. - 0-readme.js.
  • 1. Write me - Write a script that writes a string to a file. - 1-writeme.js.
  • 2. Status code - Write a script that display the status code of a GET request. - 2-statuscode.js.
  • 3. Star wars movie title - Write a script that prints the title of a Star Wars movie where the episode number matches a given integer. - 3-starwars_title.js.
  • 4. Star wars Wedge Antilles - Write a script that prints the number of movies where the character “Wedge Antilles” is present. - 4-starwars_count.js.
  • 5. Loripsum - Write a script that gets the contents of a webpage and stores it in a file. - 5-request_store.js.
  • 6. How many completed? - Write a script that computes the number of tasks completed by user id. - 6-completed_tasks.js.
  • 7. Who was playing in this movie? - Write a script that prints all characters of a Star Wars movie. - 100-starwars_characters.js.
  • 8. Right order - Write a script that prints all characters of a Star Wars movie. - 101-starwars_characters.js.

Collaborate

To collaborate, reach me through my email address wendymunyasi@gmail.com.