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

Turn in Reader Response Essay - Why do ionic compounds have a high melting point - Athlean x perfect workout series - Ikea harvard case study analysis - Autocad lt visual styles - 2.3. Discussion: Borland Case Casting Light and Shadows - Is c6h12o6 an organic compound - ZEEKTHEGEEK Organization - Uniqlo - Artifact speech topics - LITERATURE - Specialized Services: Medical Billing and Chiropractic Support - Criteria cognitive aptitude test answers - Sustained shared thinking activities - Entertainment speech examples pdf - INTERVIEW VS. INTERROGATION - Grand strategy matrix for starbucks - PowerPoint (APA 7th edition) - Oxidation reduction reactions lab answers - Pacific oil company case analysis - Series circuits 14.1 worksheet answers - OB8 - Class One: Part Two - Blank running record sheet - PPT - Brad's bicycle shop sells speed bicycles - Apple case analysis recommendations - Implications of product life cycle stages - Internal factors affecting seed germination - Harvard global supply chain management simulation v2 answers - Fourier series - New Works 09/14 - Discussion Board Questions - Norsted manor farm caravan storage - Html and css tutorial 7 case 1 - Conquest marketing concepts greenville sc - 32/62 wellington street st kilda - Dorothea orem contributions to nursing - Leadership Foundation/Critical Thinking - 2303 vardon lane sanctuary cove - Melting point determination apparatus - This week’s journal articles focus on empowering leadership and effective collaboration in geographically dispersed teams - Similarity between mole and dozen - IT-project management WK2 REGISTRY - Essay questions on socialization - Swot analysis of coca cola 2017 - Compex ex01 04 course - 2 dollar movie theater in bartlett - Titus linear bar grille - Statistical methods - Introduction to mathematical economics pdf - Alvin the production manager at the paragon company - Use goal seek to perform a break even analysis - Root cause analysis steps ihi - A low penetration price discourages competitors from entering the market - The lean pocket handbook for kaizen events - Ch3i polar or nonpolar - Introduction to polygons ppt - History Analytical essay - Charles murray are too many people going to college - 7 forms of energy worksheet - Ordinary language in literature - Cert iv training and assessment cheat sheet - Big gems public health - Alistair macrae uniting church - Demand supply elasticity of coca cola - If i ran the circus activities - (Discussion Questions) - Personality Assessments/ Tests of Knowledge and Skill - Basic objective of monetary policy - Creativity innovation and design rmit - Help 10 pages excluding citations - Reflection and Discussion Forum Week 7 - Qin shi huang education - Week 5 project - Which of the following statements regarding gantt charts is true - Aws pci dss compliance - 7 reasons why phones should be allowed in school - Aha rhythm recognition course answers - Kotter 8 steps to change - The restocking level increases as the service level falls - How to answer sociology essay questions - What does iap mean in spss - Essay 。 - Developmentally and culturally appropriate practice - 6. list three reasons for seeing humanity as the pinnacle of god’s creation. - Baloney detection kit shermer - Case study The Problems of Multitasking - Back titration caco3 hcl naoh - Chemical equilibrium and le chatelier's principle lab answers - Week 4 disscusion econ - Sociology - Cisco lms 4.2 eol - Need 5+ pages with no plagiarism and 2+ scholarly references in Apa format. - Financial statement analysis involves all of the following except - Healthcare Administration Issues - Black hills state university bookstore - Erin brockovich case summary - List of testable questions - What are the capacity implications of the marketing campaign - Persimmon spring flower print women's carmel sneakers topanga collection - In mrs tilscher's class