palewire / first-web-scraper

A step-by-step guide to writing a web scraper with Python
https://palewi.re/docs/first-web-scraper/
GNU General Public License v3.0
203 stars 165 forks source link

errors in web scraping #15

Open abhilashpython opened 6 years ago

abhilashpython commented 6 years ago

c:\programData\Anaconda3\lib\site-packages\bs4__init__.py:181:userwarning:No parser was explicitly specified so i am using the best avaliable Html parser for this system("lxml").This usally isn't a problem,but if you run this code on another system or in a different virtual environment,it may use a different parser and behave differently

Hyperx837 commented 3 years ago

pip install lxml `from bs4 import BeautifulSoup import requests

resp = requests.get('https://github.com/') soup = BeautifulSoup(res.text, 'lxml')`

you just have to specify lxml as an argument while creating the soup object