import requests
from bs4 import BeautifulSoup
url = "https://upbit.com/service_center/notice"
result = requests.get(url =url)
bs_obj = BeautifulSoup(result.content, "html.parser")
print(bs_obj)
There is no error when entering the code at the top, but HTml does not come out It doesn't even crawl. I think the site itself has prevented this kind of crawling <
In this case, how do I make the crawling code? I'm a beginner. Help me.
python beautifulsoup
It's coming out right.
print(bs_obj.text)
You'll know when you try it, but you can't see the screen when you first go into Upbeat
If the questioner says "strong", please waitIf you're trying to crawl the upbeat main page after ...
Try curling using selenium.
import requests
import time
import urllib
from selenium import webdriver
from bs4 import BeautifulSoup
#Browser Settings
binary=FirefoxBinary('C:/Program Files/Mozilla Firefox/firefox.exe')
browser=webdriver.Firefox(executable_path='C:/Program Files/Mozilla Firefox/geckodriver.exe',firefox_binary=binary)
url = "https://upbit.com/service_center/notice"
browser.get(url)
time.sleep(10)
html = browser.page_source
soup=BeautifulSoup(html, 'html.parser')
print(soup.text)
© 2024 OneMinuteCode. All rights reserved.