KiprisAPI/test_web.py

21 lines
621 B
Python

from web_scraper import WebScraper
def test_scraper():
scraper = WebScraper()
scraper.setup_browser()
try:
scraper.navigate_to_page("http://kdtj.kipris.or.kr/kdtj/searchLogina.do?method=loginTM#page1")
keyword = "스키에이트"
results = scraper.search_for_term(keyword)
if results:
print("Search Results:")
for key, value in results.items():
print(f"{key}: {value}")
else:
print("No results found or an error occurred.")
finally:
scraper.close_browser()
if __name__ == "__main__":
test_scraper()