Question: Write a python program that prompts the user for a web address (full url, html page) and then uses the BeautifulSoup and urllib to read
Write a python program that prompts the user for a web address (full url, html page) and then uses the BeautifulSoup and urllib to read its data.
You can use the any html page you'd like:
The program should output the following:
- The page title (hint: read the content from the metatag "title")
- The total number of words on the page
- The total number of unique words on the page
- The total number of each heading used on the page (hint: count the number of "H1"-"H6" header tags used on the page)
- The total number of paragraphs on the page (hint: use the
tag to count)
- The total number of links on the page
- After outputting, the program should ask the users if they would like to parse another web address or quit.
- Use at least 3 web addresses to check your program. List their urls as comments in the beginning of your program.
Remember:
- Only use the material covered in this module -- do not use more advanced functions not covered yet in the course
- Make sure to include comments that explain all your steps (starts with #). Also use a comment to sign your name at the beginning of the program!
- Work individually and only submit original work
- Run the program a few times to make sure it executes and meets all the requirements
- Submit a .py file!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
