title: selenium: Get the URL of the page you are on while flipping pages
body: <p>I'm wrtting script to get the URL of the page while fillipng pages.
  I wrote script but nothing happend.
  Dose anybody know why?</p>
  <p>E.G) starts below page
  <a href="https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/" rel="nofollow noreferrer">https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/</a></p>
  <p>URL I want to get as below 4pages)
  1.https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/
  2.https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/?multiarea=26&amp;dateunspecified=1&amp;page=2
  3.https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/?multiarea=26&amp;dateunspecified=1&amp;page=3
  4.https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/?multiarea=26&amp;dateunspecified=1&amp;page=4</p>
  <p>Script(Google colab)</p>
  <pre><code>!pip install selenium
  import requests
  !apt-get update
  !apt install chromium-chromedriver
  !cp /usr/lib/chromium-browser/chromedriver /usr/bin
  from selenium import webdriver
  options = webdriver.ChromeOptions()
  options.add_argument('--headless')
  options.add_argument('--no-sandbox')
  options.add_argument('--disable-dev-shm-usage')
  browser = webdriver.Chrome('chromedriver',options=options)
  from time import sleep
  
  pageURL = 'https://www.jtb.co.jp/kokunai-hotel/list/kyoto/feature/couple_yado/'
  browser.get(pageURL)
  sleep(3)
  
  while True:
    try:
      currentpage = browser.current_url
      print(currentpage)
      next = browser.find_element_by_css_selector(&quot;.f-list-paging__arrow .f-list-paging__next a&quot;)
      next.click()
    except:
      break
  </code></pre>