import requests
from bs4 import BeautifulSoup
url = 'http://jolse.com/category/tonermist/43/'
result = requests.get('url')
bs_obj = BeautifulSoup(result.content, 'html.parser')
print(bs_obj)
This is a beginner following the example of crawling a particular site. In the book, crawl on the above overseas shopping mall site is normal, but when I tried it, an error appeared. I don't know if it's because the module isn't installed normally in my environment ㅠ<
-Error contents-
Traceback (most recent call last): File "/Users/haegbonjwa/Library/Preferences/PyCharmCE2018.3/scratches/Crawling traning/4_Jolse_Parsing.py", line 5, in result = requests.get('url') File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/sessions.py", line 519, in request prep = self.prepare_request(req) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/sessions.py", line 462, in prepare_request hooks=merge_hooks(request.hooks, self.hooks), File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 313, in prepare self.prepare_url(url, params) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests/models.py", line 387, in prepare_url raise MissingSchema(error) requests.exceptions.MissingSchema: Invalid URL 'url': No schema supplied. Perhaps you meant http://url?
I would appreciate it if you could tell me the reason why the red letters are blocking from the first gate."T" I don't think it's a module problem because the crawling of Naver's real-time search keyword has followed without a problem.
python
result = requests.get(url)
You're gonna have to do this. If you look closely, it's probably written like that in the book.
554 Who developed the "avformat-59.dll" that comes with FFmpeg?
767 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
554 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
553 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.