Page 1 of 1

Prompt Use the FirstParser.py starter code and read in the HTML of any webpage of your choice! (Pick something safe and

Posted: Sat May 14, 2022 2:53 pm
by answerhappygod
Prompt Use The Firstparser Py Starter Code And Read In The Html Of Any Webpage Of Your Choice Pick Something Safe And 1
Prompt Use The Firstparser Py Starter Code And Read In The Html Of Any Webpage Of Your Choice Pick Something Safe And 1 (52.91 KiB) Viewed 49 times
Prompt Use The Firstparser Py Starter Code And Read In The Html Of Any Webpage Of Your Choice Pick Something Safe And 2
Prompt Use The Firstparser Py Starter Code And Read In The Html Of Any Webpage Of Your Choice Pick Something Safe And 2 (40.46 KiB) Viewed 49 times
Prompt Use the FirstParser.py starter code and read in the HTML of any webpage of your choice! (Pick something safe and school appropriate) Find a pattern on the page (such as headers, or lists, or images) and add them to a list. For example, add all of the lines that have images in them into a list. Or all h1 or h4 tags are added to a list. This will be unique to your code. I'm just looking that you were able to read in an HTML file and do something with it. Nothing fancy!

= import urllib.request, urllib.parse, urllib.error import re import ssl # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url = input('Enter - ') html = urllib.request.urlopen(url, context=ctx).read() = - #convert object into string, then split into list fullpage = str(html).split("\\n")