a guest Nov 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def Crawl_Translation(request):
- driver = webdriver.PhantomJS()
- action = action_chains.ActionChains(driver)
- URL = "https://translate.google.co.kr/#en/ko/"
- driver.find_element_by_xpath('//*[@id="source"]').send_keys('I want to eat cheese hamburger')
- soupstr = driver.find_element_by_xpath('//*[@id="result_box"]')
- return HttpResponse(soupstr.text)
RAW Paste Data