김태희

add 주간보고서 1121

Showing 105 changed files with 39 additions and 0 deletions
No preview for this file type
1 +[1117/231736.075:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
2 +[1117/231736.171:ERROR:exception_snapshot_win.cc(99)] thread ID 114892 not found in process
3 +[1117/231736.400:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
4 +[1117/231736.402:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
5 +[1117/231736.402:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
6 +[1117/231736.402:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
7 +[1117/231736.402:ERROR:process_reader_win.cc(151)] SuspendThread: Access is denied. (0x5)
8 +[1117/231736.402:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
9 +[1117/231736.403:ERROR:exception_snapshot_win.cc(99)] thread ID 114896 not found in process
1 +from selenium import webdriver
2 +from bs4 import BeautifulSoup as soups
3 +
4 +def search_selenium(search_name, search_path, search_limit) :
5 + search_url = "https://www.google.com/search?q=" + str(search_name) + "&hl=ko&tbm=isch"
6 +
7 + browser = webdriver.Chrome("./chromedriver")
8 + browser.get(search_url)
9 +
10 + image_count = len(browser.find_elements_by_tag_name("img"))
11 +
12 + print("로드된 이미지 개수 : ", image_count)
13 +
14 + browser.implicitly_wait(2)
15 +
16 + for i in range( search_limit ) :
17 + image = browser.find_elements_by_tag_name("img")[i]
18 + screenshot_name="./result01/" + str(i) + ".png"
19 + image.screenshot(screenshot_name)
20 + browser.save_screenshot(screenshot_name)
21 +
22 + browser.close()
23 +
24 +if __name__ == "__main__" :
25 +
26 + search_name = input("검색하고 싶은 키워드 : ")
27 + search_limit = int(input("원하는 이미지 수집 개수 : "))
28 + search_path = "Your Path"
29 + # search_maybe(search_name, search_limit, search_path)
30 + search_selenium(search_name, search_path, search_limit)