To get information that Naver API doesn't provide, I'm crawling directly on the Naver map site.
But after doing it, NAVER map is loaded in double?This
I think it's working.
After loading the basic frame, And then, I think it's like filling up the contents with search words.
So I think I need to crawl when all the documents are loaded
I would like to know if there is a function in ruby that shows when such loading is complete.
Or I would like to know if there is another way to solve the above problem.
ruby crawling
After the page loads in the browser, you need to receive the result of the script working on the client to get the result you want. To do that, you need to run a real browser and use tools like selenium to get results.
If you refer to the code below, run a browser and map.Read naver.com and save the results to the doc. Now, you can use the function of Nokogiri to read the value you want.
require 'selenium-webdriver'
require 'nokogiri'
driver = Selenium::WebDriver.for :safari
driver.get "http://map.naver.com"
doc = Nokogiri::HTML(driver.page_source)
I used Safari browser. When Selenium::WebDriver.for:firefox
, run Firefox to read the results.
926 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
621 GDB gets version error when attempting to debug with the Presense SDK (IDE)
577 Who developed the "avformat-59.dll" that comes with FFmpeg?
575 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.