Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that gets the root document (/) from www.champlain.edu (Links to an external site.)Links to an external site. and extracts every line that

Write a program that gets the root document ("/") from www.champlain.edu (Links to an external site.)Links to an external site. and extracts every line that has an anchor tag, indicating that it's a hyperlink to another page. The anchor tag will start with

Create a Sqlite database sending in the following query at the beginning of your program if the database doesn't exist (use the os module to check to see if a file exists).

CREATE TABLE storage(curtime TEXT, line TEXT)

You can use the following query to insert values into the database:

INSERT INTO storage (curtime, line) values ('', line);

With appropriate values for your values. You will need to create a string by concatenating your values before you pass the INSERT statement into the execute method. There are a number of ways to do this, so be sure to look up examples online.. You should be getting the current time each time you enter a value into the database and pass that in for the value of curtime. The following will get you the current time with high precision.

import datetime

current_time = datetime.datetime.now().time()

Use all the same documentation requirements you have been using and submit your program here.

Currently using Python 3.5.3. having trouble with the part below:

CREATE TABLE storage(curtime TEXT, line TEXT)

You can use the following query to insert values into the database:

INSERT INTO storage (curtime, line) values ('', line);

With appropriate values for your values. You will need to create a string by concatenating your values before you pass the INSERT statement into the execute method. There are a number of ways to do this, so be sure to look up examples online.. You should be getting the current time each time you enter a value into the database and pass that in for the value of curtime. The following will get you the current time with high precision.

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

What Is A Database And How Do I Use It

Authors: Matt Anniss

1st Edition

1622750799, 978-1622750795

More Books

Students also viewed these Databases questions

Question

2 The role of economic theory in economics.

Answered: 1 week ago