{"id":4989,"date":"2020-09-13T11:46:50","date_gmt":"2020-09-13T02:46:50","guid":{"rendered":"http:\/\/kats-eye.net\/info\/?p=4989"},"modified":"2020-09-13T11:46:51","modified_gmt":"2020-09-13T02:46:51","slug":"python-selenium","status":"publish","type":"post","link":"https:\/\/kats-eye.net\/info\/2020\/09\/13\/python-selenium\/","title":{"rendered":"PYTHON\u3067WEB\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c(Selenium)"},"content":{"rendered":"\n<h2 class=\"has-text-color\" style=\"color:#0000ff\">\u6982\u8981<\/h2>\n\n\n\n<p>\u3000SELENIUM \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u3001WEB\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c\u304c\u51fa\u6765\u308b\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br>\u3000\u5148\u56de\u306e\u6295\u7a3f\u3067\u306f\u3001python \u3068 BeautifulSoup4 \u3092\u4f7f\u3063\u3066\u3001WEB\u691c\u7d22\u3092\u8a66\u307f\u307e\u3057\u305f\u3002 \u3053\u3061\u3089\u306f\u30d6\u30e9\u30a6\u30b6\u3092\u4ecb\u3059\u308b\u3053\u3068\u306a\u304f\u53d6\u5f97\u3057\u305fHTML\u3092\u89e3\u6790\u3059\u308b\u306e\u306b\u5bfe\u3057\u3066\u3001SELENIUM \u306f\u30d6\u30e9\u30a6\u30b6\u3092\u8d77\u52d5\u30fb\u64cd\u4f5c\u3059\u308b\u69d8\u3067\u3059\u3002\uff08\u3042\u304f\u307e\u3067\u500b\u4eba\u7406\u89e3\u3067\u3059\u3002\uff09<br><br>\u3000\u30cd\u30c3\u30c8\u7b49\u3067\u691c\u7d22\u3059\u308b\u3068 Python \uff0b Selenium \u3067Google Chrome \u3092\u64cd\u4f5c\u3059\u308b\u4e8b\u4f8b\u304c\u591a\u304f\u898b\u53d7\u3051\u3089\u308c\u305f\u306e\u3067\u3001\u4eca\u56de\u306f\u305d\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u8a66\u3057\u307e\u3057\u305f\u3002\u6b21\u306e\u8868\u306b\u4eca\u56de\u306e\u958b\u767a\u74b0\u5883\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><td>OS<\/td><td>Windows10 Pro 64bit<\/td><\/tr><tr><td>\u30d6\u30e9\u30a6\u30b6<\/td><td>Google Chrome  85.0.4183.102<\/td><\/tr><tr><td>Chrome Driver<\/td><td>85.0.4183.87<\/td><\/tr><tr><td>\u958b\u767a\u8a00\u8a9e<\/td><td>Python 3.8.3<\/td><\/tr><tr><td>Selenium<\/td><td>selenium-3.141.0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u3000\u3000<\/p>\n\n\n\n<h2 class=\"has-text-color\" style=\"color:#0000ff\">Selenium  \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u3000\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u304d\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067 Selenium \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br>\u3000[   python -m pip install selenium   ]<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"851\" height=\"407\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/110.png\" alt=\"\" class=\"wp-image-4998\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/110.png 851w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/110-300x143.png 300w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/110-768x367.png 768w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><figcaption>python -m pip install selenium<br><br><\/figcaption><\/figure>\n\n\n\n<h2 class=\"has-text-color\" style=\"color:#0000ff\">Chrome Driver \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30fb\u914d\u7f6e<\/h2>\n\n\n\n<p>\u3000Chrome Driver \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30fb\u914d\u7f6e\u3057\u307e\u3059\u3002 Chrome Driver  \u306f Google Chrome \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u69d8\u3067\u3059\u3002<\/p>\n\n\n\n<h4>Google Chrome \u30d0\u30fc\u30b8\u30e7\u30f3\u78ba\u8a8d<\/h4>\n\n\n\n<p>\u3000Google Chrome \u3092\u958b\u304d\u3001\u4e0b\u56f3\u306e\u53f3\u4e0a\u30dc\u30bf\u30f3\u30af\u30ea\u30c3\u30af\u5f8c\u3001[\u8a2d\u5b9a] \u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"715\" height=\"661\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/111.png\" alt=\"\" class=\"wp-image-4999\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/111.png 715w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/111-300x277.png 300w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/figure>\n\n\n\n<p>\u3000[Chrome \u306b\u3064\u3044\u3066] \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u78ba\u8a8d\u51fa\u6765\u307e\u3059\u3002\u79c1\u306e\u5834\u5408\u300c85.0.4183.102\u300d\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"885\" height=\"567\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/112.png\" alt=\"\" class=\"wp-image-5000\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/112.png 885w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/112-300x192.png 300w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/112-768x492.png 768w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><figcaption>\u3000\u3000<\/figcaption><\/figure>\n\n\n\n<h4>Chrome Driver \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h4>\n\n\n\n<p>\u3000\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u304b\u3089\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002 <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"780\" height=\"558\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/113.png\" alt=\"\" class=\"wp-image-5002\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/113.png 780w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/113-300x215.png 300w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/113-768x549.png 768w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><figcaption>https:\/\/chromedriver.chromium.org\/<\/figcaption><\/figure>\n\n\n\n<p>   Google Chrome \u306b\u5408\u308f\u305b \u3001 ChromeDriver\u300c85.0.4183.***\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002  <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"606\" height=\"195\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/114.png\" alt=\"\" class=\"wp-image-5003\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/114.png 606w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/114-300x97.png 300w\" sizes=\"(max-width: 606px) 100vw, 606px\" \/><figcaption>https:\/\/chromedriver.chromium.org\/downloads<\/figcaption><\/figure>\n\n\n\n<p>\u3000chromedriver_win32.zip  \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"614\" height=\"215\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/115.png\" alt=\"\" class=\"wp-image-5004\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/115.png 614w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/115-300x105.png 300w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><figcaption>\u3000\u3000<\/figcaption><\/figure>\n\n\n\n<h4>Chrome Driver \u306e\u914d\u7f6e<\/h4>\n\n\n\n<p>\u3000Chrome Driver \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u4efb\u610f\u306e\u5834\u6240\u306b\u4fdd\u7ba1\u3057\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u30d1\u30b9\u3092\u6307\u5b9a\u3059\u308c\u3070\u826f\u3044\u69d8\u3067\u3059\u3002<br>\u3000\u4e0b\u8a18\u306f\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u4e0b\u306b \u2018driver\u2019 \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u3001\u89e3\u51cd\u3057\u305f \u2018chromedriver.exe\u2019 \u3092\u914d\u7f6e\u3057\u305f\u5834\u5408\u306e\u30d1\u30b9\u6307\u5b9a\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chrome = webdriver.Chrome(\".\/driver\/chromedriver.exe\")<\/code><\/pre>\n\n\n\n<p>\u3000\u3000<\/p>\n\n\n\n<h2 class=\"has-text-color\" style=\"color:#0000ff\">\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u5b9f\u884c<\/h2>\n\n\n\n<p> <a rel=\"noreferrer noopener\" href=\"http:\/\/chromedriver.chromium.org\/getting-started\" target=\"_blank\">\u3000ChromeDriver \u30aa\u30d5\u30a3\u30b7\u30e3\u30eb\u30b5\u30a4\u30c8\u306e Getting Started<\/a>\u00a0\u306b\u3042\u308b\u30c6\u30b9\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># https:\/\/chromedriver.chromium.org\/getting-started\nimport time\nfrom selenium import webdriver\n\n# Optional argument, if not specified will search path.\n# driver = webdriver.Chrome('\/path\/to\/chromedriver')\ndriver = webdriver.Chrome(\".\/driver\/chromedriver.exe\")\n\ndriver.get('http:\/\/www.google.com\/');\ntime.sleep(5) # Let the user actually see something!\nsearch_box = driver.find_element_by_name('q')\nsearch_box.send_keys('ChromeDriver')\nsearch_box.submit()\ntime.sleep(5) # Let the user actually see something!\ndriver.quit()<\/code><\/pre>\n\n\n\n<p>\u3000\u6b21\u306e\u69d8\u306b\u30d6\u30e9\u30a6\u30b6\u8d77\u52d5\u3057\u3001\u2018ChromeDriver&#8217; \u3092\u691c\u7d22\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"963\" height=\"788\" src=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/116.png\" alt=\"\" class=\"wp-image-5012\" srcset=\"https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/116.png 963w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/116-300x245.png 300w, https:\/\/kats-eye.net\/info\/wp-content\/uploads\/2020\/09\/116-768x628.png 768w\" sizes=\"(max-width: 963px) 100vw, 963px\" \/><figcaption>\u3000\u3000<br>\u3000<\/figcaption><\/figure>\n\n\n\n<h2 class=\"has-text-color\" style=\"color:#0000ff\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p> \u3000Python \uff0b Selenium \u3067\u3001Google Chrome \u3092\u64cd\u4f5c\u3059\u308b\u74b0\u5883\u306f\u51fa\u6765\u305f\u69d8\u3067\u3059\u3002 \u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u3064\u3044\u3066\u306f\u3001\u6539\u3081\u3066\u52c9\u5f37\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u3000SELENIUM \u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u3001WEB\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c\u304c\u51fa\u6765\u308b\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3000\u5148\u56de\u306e\u6295\u7a3f\u3067\u306f\u3001python \u3068 BeautifulSoup4 \u3092\u4f7f\u3063\u3066\u3001WEB\u691c\u7d22\u3092\u8a66\u307f\u307e\u3057\u305f\u3002 \u3053\u3061\u3089\u306f\u30d6 &hellip; <a href=\"https:\/\/kats-eye.net\/info\/2020\/09\/13\/python-selenium\/\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">PYTHON\u3067WEB\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c(Selenium)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":5002,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[75,98],"tags":[146,116,145],"_links":{"self":[{"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/posts\/4989"}],"collection":[{"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/comments?post=4989"}],"version-history":[{"count":17,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/posts\/4989\/revisions"}],"predecessor-version":[{"id":5014,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/posts\/4989\/revisions\/5014"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/media\/5002"}],"wp:attachment":[{"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/media?parent=4989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/categories?post=4989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kats-eye.net\/info\/wp-json\/wp\/v2\/tags?post=4989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}