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

Technology And Enterprise Resource Planning - Unlock alice solution - Organizational behavior in the workplace worksheet - Chocolate rain lyrics meaning - Camp bow wow job application - Cost benefits analysis template - How much does iphone upgrade program cost - Pharmasim simulation - World war 1 essay questions - Southernization by lynda shaffer - Week 6 Discussion Response to Classmates - Moray coast vets nairn - Snowdrops at benington lordship - Public vs private budget strategies - King ethelbert school teachers - MULTIPLE CHOICE QUESTIONS - Eric carle frog book - Discussion - Roland's overhead doors reports the following financial information - Sc1 - 1899 coke bottle with cork - Discussion - Mastermix pro disc 235 - Return and Bonds Ratings - What is grid reference - Possible conflict management and negotiation techniques - Yanbu university college women's campus - Amy tan the opposite of fate summary - Rebekah age when she married isaac - Casey nelson is a divisional manager - Federalism - Philippines how many islands - Topic - Kin maya angelou analysis - Leadership theories - Mike miller noddy joke - The value of a product offering is determined by the customer and varies accordingly. How does a retailer like Walmart deliver value differently than Banana Republic? - The headstrong historian - 1 mile to kilometers - Congressional acquisition executive summary - Threaded 1 - No pude leer mis correos porque (perder) mi contraseña. - Word memo - Folk song philippine literature - Gen 103 week 2 assignment - When writing a networking letter respect your recipient by _____ - Economic Assignment (2 days) - Porsche kettle and toaster - Honey fungus resistant trees - Managing operations across the supply chain answer key - Implementation and Operations of Policies - Unimelb bachelor of science course planning - Heirloom sweet potato varieties - The glass palace conclusion - Ethical Theory - Discrepancy hypothesis - Cultural care plan template - Two among the righteous few cliff notes - Module 11 Assignment - Linkers & Loaders - Community DQ6 - Murder in a nutshell the frances glessner lee story - The fourth of july by audre lorde essay - Socw 6456 assignment - How to read biorhythm chart - Aro pearsoncmg com - Tpg landline phone plans - Carrington financial services john doyle - Erm adoption and implementation in the higher education environment - Causal research advantages and disadvantages - 1968 blue mountains bushfires - Guidelines for data entry screen design - Semplica girl diaries pdf - Nfpa 921 fire causes - Maori designs and meanings - Feedback of Group Projects to Peers - Where does chemical digestion begin - Sonny blues james baldwin short story full text - Discussion responses - The original ferris wheel was built in - Labor Relations and Collective Bargaining - Midterm reflection - Criminal procedure discussion #2 - Australian beef primal cuts - Characteristic polynomial of a matrix - The importance of user technology security education within organizations - Con 280 - In most spanish speaking countries married women legally __ - Team operating principles project charter example - Five students took a math test - MK630 Wk1Ip - Anatomy and Physiology - What did kate call her twin sister worksheet answers - The enormous radio summary - Harmonic distortion in power amplifier - Be cool to the pizza dude summary - Ronn lucas disney special dvd - Bmach on my statement - Module 8 Discussion - Define the term cliché penn foster - Ready player one opening scene