Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a simple python program to crawl 10 pages from the web and store the text content in the pages into csv file. You code,

Write a simple python program to crawl 10 pages from the web and store the text content in the pages into csv file. You code, the 10 html pages, and the csv file which store the content in the pages should be submitted.

Tips: you can write your own program by referencing this tutorial: https://codeburst.io/scraper-b82146396249

Tips2:

(1) If you use python2 on your computer, you can use the following code to get web pages:

import urllib2

page = urllib2.urlopen('https://www.pythonforbeginners.com/')

print page.info() print page.read()

(2) If you use python3 on your computer, you can use the following code to get web pages:

import urllib.request page = urllib.request.urlopen('https://www.pythonforbeginners.com/')

print (page.info()) print (page.read())

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

a. What are S, F, and P?

Answered: 1 week ago

Question

General Purpose of Your Speech Analyzing Your Audience

Answered: 1 week ago

Question

Ethical Speaking: Taking Responsibility for Your Speech?

Answered: 1 week ago