Question: Complete the Python program below to extract and display all the header tags from the URL below. Note: HTML headers are ' h 1 '

Complete the Python program below to extract and display all the header tags from the URL below. Note: HTML headers are 'h1','h2','h3','h4','h5','h6' from urllib.request import urlopen from bs 4 import BeautifulSoup html = urlopen ('https://blogs.baruch.cuny.edu/abuk/') bs = #TO DO Complete the Code titles = #TO DO Complete the Code print('List all the header tags :',*titles, sep='^'')**OUTPUT TEXT : ** List all the header tags : < h1 class=" site-title" < a href="https://blogs.baruch.cuny.edu/abuk/" rel="home" > my Teaching Info Dr. Abu Kamruzzaman, PhD < h5> Assistant Professor (Adj.)< br /> Paul H. Chook Department of Information Systems and Statistics Zicklin School of Business Baruch College / CUNY Box B11-220; One Bernard Baruch Way, New York, NY 10010 Dept. URL : University Teaching - I < em > nauguration f< em > all 2001< em > semester < h2 style="text-align: left" > Course Listing < h4 style="text-align: left" >(< em Course Materials in Blackboard Undergraduate Courses -< strong Baruch College YoRK College Undergraduate Courses -< strong > LAGUARDIA Community Colleg h 4 strong CAPS Courses / strong strong style = "font-size: 19 px "- strong Baruch College / strong / strong strong :/ s COURSEs Teaching - by Semesters : < h3> Baruch College/CUNY ( Fall 2006< a href="https://cis.baruch. cuny.edu/"> Computer Information Systems Dept Program URL: University Teaching -I< em > nauguration fall 2001< em > semester Course Listing (< strong < em Course Materials in Blackboard Graduate Courses < strong style=" font-size: 19 px "> Undergraduate Courses -< strong > Baruch College< strong style=" font-size: 19 px "> Undergraduate Courses -< strong > YoRK CollegeUndergraduate Courses -< strong > LAGUARDIA Community Colleg h 4> strong CAPS Courses COURSEs Teaching - by Semesters: / h 4 Baruch College/ CUNY ( Fall 2006 Computer Information Systems Dept (< em > Course Materials in Blackboard )Complete the Python program below to list all language names and number of related articles in the order they appear in the URL below from urllib.request import urlopen from bs 4 import BeautifulSoup html= urlopen ( https://www.wikipedia.org/') bs= BeautifulSoup ( html,"html.parser") namelist = #TO DO Complete the Code for name in nameList: print (name.get_text ()) English 6245000+ articles 1252000+ Deutsch 2534000+ Artikel Espaol 1659000+ artculos 1697000+Franais 2296000+ articles Italiano 1672000+ voci 1175000+ Polski 1454000+ hasel Portugus 1055000+ artigos Polski 1424000+ hasel

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!