nilamo [b' Wrote: [/b]347' dateline='1521228699']
(Mar-16-2018, 06:13 PM)tjnichols Wrote: bsOb = BeautifulSoup(html.read())
print(bsObj.h1)
You define a variable namedbsOb
, but try to use one namedbsObj
. Those are not the same thing. I don't understand why these aren't the same - is it simply because I typed it wrong? Or are they two separate things that do two separate things?
(Mar-16-2018, 06:13 PM)tjnichols Wrote: BeautifulSoup(YOUR_MARKUP, "html.parser")The message is very literal.
#snip
bsOb = BeautifulSoup(html.read, html.parser)html.parser
isn't a thing that exists anywhere, but instead the string"html.parser"
is a string that always exists.Is this something I should always use? If so, why? What does it do for me?
I truly appreciate your time and patience with me and your ability to break things down so I can understand them! Thank you!
(Mar-16-2018, 07:38 PM)metulburr Wrote: you should also use the requests module to get the htmlCan you tell me how using the requests module helps me the html? I appreciate your help!