Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Scraping numbers from html using beautifulsoup

13/11/2020 Client: arwaabdullah Deadline: 3 days

Scraping Numbers from HTML using BeautifulSoup In this assignment you will write a Python program similar to http://www.py4e.com/code3/urllink2.py. The program will use urllib to read the HTML from the data files below, and parse the data, extracting numbers and compute the sum of the numbers in the file.

We provide two files for this assignment. One is a sample file where we give you the sum for your testing and the other is the actual data you need to process for the assignment.

Sample data: http://py4e-data.dr-chuck.net/comments_42.html (Sum=2553)
Actual data: http://py4e-data.dr-chuck.net/comments_689313.html (Sum ends with 25)

You do not need to save these files to your folder since your program will read the data directly from the URL. Note: Each student will have a distinct data url for the assignment - so only use your own data url for analysis.

Data Format

The file is a table of names and comment counts. You can ignore most of the data in the file except for lines like the following:

Modu90

Kenzie88

Hubert87

You are to find all the tags in the file and pull out the numbers from the tag and sum the numbers.

Look at the sample code provided. It shows how to find all of a certain kind of tag, loop through the tags and extract the various aspects of the tags.

...

# Retrieve all of the anchor tags

tags = soup('a')

for tag in tags:

# Look at the parts of a tag

print 'TAG:',tag

print 'URL:',tag.get('href', None)

print 'Contents:',tag.contents[0]

print 'Attrs:',tag.attrs

You need to adjust this code to look for span tags and pull out the text content of the span tag, convert them to integers and add them up to complete the assignment.

Sample Execution

$ python3 solution.py

Enter - http://py4e-data.dr-chuck.net/comments_42.html

Count 50

Sum 2...

Turning in the Assignment

Enter the sum from the actual data and your Python code below:
Sum: (ends with 25)
Python code:

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Buy Coursework Help
Quality Homework Helper
Writer Writer Name Offer Chat
Buy Coursework Help

ONLINE

Buy Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$62 Chat With Writer
Quality Homework Helper

ONLINE

Quality Homework Helper

Hi dear, I am ready to do your homework in a reasonable price.

$62 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Customer interviews - Lab report - Apn professional development plan sample - Hotel vertu case solution - Anton drexler cause of death - The contemporary reader gary goshgarian pdf - Lack of education in animal farm - Go all in one computer concepts and applications answers - Tookool chef taco lasagna recipe - Case Study - How to make elephant toothpaste bigger - Williams machine and tool - BA 4010 MOD 1 Questions - City district government karachi - Mcdonald's lawsuit french fries - Amp simple super pds - Domestic violence informative speech outline - Of mice and men part 2 - Ubertour Project - CRM 1 - Week 04 - Umuc writing 101 - Carnival cruise lines case study - Types of feedback in communication process - Internal shear force and bending moment - Bill nye atoms worksheet - Determination of ka for a weak acid lab report - Module 1_DisasterRecovery - Four oaks medical centre - I need help solving - A raisin in the sun pdf - Blue ring octopus facts - Employment law advice nsw - Apply: SWOT Analysis - Reality check - US Elections - A container is supported by three cables - The root douglass carried was thought to have supernatural powers - Phd progress report template - Responses to answer [60 words each] - Colonial first state upload documents - Cisco finesse 3rd party gadget - The reconciliation of the cash register tape - Epidemiology - the basic science of Public Health - Day of mourning in 1938 - Manufacturing accounts example questions and answers - Arts and crafts of zambales - Atar bonus points disadvantaged - Functional behavior assessment behavior intervention plan example - Intrusion detection system - One implication of today's flatter corporate structures is that: - Discussion due 8/22 5pm - NEED IN 7 HOURS or LESS (NO EXCEPTIONS) - Business law 17th edition pdf - Disadvantages of break even analysis - Kristen swanson nursing theory - What is a family genogram - Understanding arguments 9th edition exercise answers - Secondary data consists of information _______. - Tornado in a bottle experiment explanation - Sewing machine safety poster - 20 cm hg of vacuum to atm absolute - Islam empire of faith part 3 the ottomans summary - Tittle's control balance theory - Buntot mo hila mo meaning - Penguin chick syllable patterns v cv vc v answers - Case Study5 - Businesspeople who compose messages for mobile devices should - Boy at the window poem analysis - Swatch annual report 2015 - The language of film analysis - Greenhouse gases bbc bitesize - Comperative animal behavior - Why did the pilgrims owe squanto gratitude - Object oriented programming monash - Vulnerabilities, threats, intruders, and attacks - A student plotted the data from a sleep study - Ethics and moral reasoning ashford university - Natural order elizabethan era - Solutions chapter 12 review - English extension 1 related texts - Design strategist cover letter - Assignment #073 - Like matryoshka dolls crossword puzzle clue - Crestron idoc pad2 dsc - History - Book Response - Mechanical heat pump experiment lab report - Statement of work template - Assignment part 2 - Human impacts on the rainforest past and present bio 220 - Fasb codification cross reference guide - Human resources at hewlett packard case analysis - Write a 500 word essay - Information about companies that have been harmed or bankrupted by a disaster. - Pp - Quiero comprarles unos guantes a mis sobrinos. - What is a social aggregate in sociology - Which statement is true concerning custom filters in ftk - Portfolio Project