Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 5 Part 2 Python WWW API Reference: Chapter 11 of the textbook, code, lectures. As usual, we discuss the program details in class and

image text in transcribed

Program 5 Part 2 Python WWW API Reference: Chapter 11 of the textbook, code, lectures. As usual, we discuss the program details in class and lab. We give help during office and lab hours. To get credit you must use the HTMLparser class methods. Write a function getPaperInfo that takes as input a newspaper URL (current edition of USAToday.com) and prints the following information: 1) The title of the main or primary story, which is the data token right after the following tag. (3 points)

Choose one from the following 2) The titles of all secondary and terciary stories (Top Stories). Please explore the page to see which tag and attributes they are located after. 3) From the video JSON objects (save them as Python dictionaries), get the following data for each video, in order: Origin Creation date Description Include the call at the bottom of your module (file) Function Call getPaperlnfo('http://www.usatoday.com/) Output from call MAIN Story: Blizzards, tornadoes, winds and more hitting two-thirds of the nation TOP STORIES Story #0: France offers evidence Assad behind chemical attack Story #1: Cynthia Nixon wins working Families Party bid Story #2: Family felt 'forced' into settling with Tony Stewart Story #3: Police: Man shot at teen who asked for directions Program 5 Part 2 Python WWW API Reference: Chapter 11 of the textbook, code, lectures. As usual, we discuss the program details in class and lab. We give help during office and lab hours. To get credit you must use the HTMLparser class methods. Write a function getPaperInfo that takes as input a newspaper URL (current edition of USAToday.com) and prints the following information: 1) The title of the main or primary story, which is the data token right after the following tag. (3 points)

Choose one from the following 2) The titles of all secondary and terciary stories (Top Stories). Please explore the page to see which tag and attributes they are located after. 3) From the video JSON objects (save them as Python dictionaries), get the following data for each video, in order: Origin Creation date Description Include the call at the bottom of your module (file) Function Call getPaperlnfo('http://www.usatoday.com/) Output from call MAIN Story: Blizzards, tornadoes, winds and more hitting two-thirds of the nation TOP STORIES Story #0: France offers evidence Assad behind chemical attack Story #1: Cynthia Nixon wins working Families Party bid Story #2: Family felt 'forced' into settling with Tony Stewart Story #3: Police: Man shot at teen who asked for directions

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

8. Providing support during instruction.

Answered: 1 week ago