Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create Python Program: Open four websites of your choice Print the title of each website Open the web page https://commons.wikipedia.org/wiki/Main_Page Search for all the links

Create Python Program:

Open four websites of your choice

Print the title of each website

Open the web page https://commons.wikipedia.org/wiki/Main_Page

Search for all the links that contain the word Category.

As you find each link, open the link and print the first 10 links on that page

Write all links to a text file

On the website http://www.gutenberg.org/files/ is a list of ebooks. The text of each book can be found by using the full address (with book number 2000 as an example): http://www.gutenberg.org/files/2000/2000.txt.

The user is asked to enter a certain number of books for search for. Since the user does not know the number of all the books (such as the 2000 used above), that number should be a random number selected from the numbers 2000 to 8000.

When a valid number is found, print the first 300 characters of the book text.

If there is no matching number to the random number generated, give a message that says the book with that number cannot be found. Also, do not include that unsuccessful try in the total number of books being searched for. If the user entered five books to search for, the first 300 characters of five books should be printed.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Domain Transfer Learning With 3q Data Processing

Authors: Ahmed Atif Hussain

1st Edition

B0CQS1NSHF, 979-8869061805

More Books

Students also viewed these Databases questions