Open tahakorkmaz14 opened 6 years ago
Can confirm this on python 3.6 and windows 7 and lxml 4.1.1, which is different to the one in the requirements and the current bitbucket site.
As lot's has changes since this code was written, I suggest you try a different code to start of from all together, or use a different scraper, say beautiful soup.
Hello i'm getting this error on ubuntu. I'm new to scrapping so can u help me to understand what's the error here. I'm using the exact code with username and password
Traceback (most recent call last): File "/home/taha/PycharmProjects/login_scraper_example/login_scraper_example.py", line 39, in
main()
File "/home/taha/PycharmProjects/login_scraper_example/login_scraper_example.py", line 32, in main
tree = html.fromstring(result.content)
File "/home/taha/.local/lib/python2.7/site-packages/lxml/html/init.py", line 726, in fromstring
doc = document_fromstring(html, parser=parser, base_url=base_url, kw)
File "/home/taha/.local/lib/python2.7/site-packages/lxml/html/init.py", line 614, in document_fromstring
value = etree.fromstring(html, parser, kw)
File "lxml.etree.pyx", line 3103, in lxml.etree.fromstring (src/lxml/lxml.etree.c:70569)
File "parser.pxi", line 1828, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:106403)
File "parser.pxi", line 1716, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:105194)
File "parser.pxi", line 1086, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:99876)
File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94350)
File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:95786)
File "parser.pxi", line 629, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:95015)
lxml.etree.XMLSyntaxError: line 324: Tag footer invalid