title: scrape multiple page and put result in one CSV
body: <p>i am a newbie in coding programs, and i start with python. i use it for scraping data from website, online shops to be specific. i want to scrape every page of the result page (with pagination) and put the result url in one csv</p>
  
  <p>this is what i've been trying</p>
  
  <pre><code>import selenium
  import bs4
  from selenium import webdriver
  from urllib.request import urlopen as uReq
  from bs4 import BeautifulSoup as soup
  
  myurl = 'https://www.tokopedia.com/p/rumah-tangga/alat-pertukangan/obeng?keyword=obeng&amp;page='
  chrome_path = '/home/yoga/Downloads/chromedriver'
  driver = webdriver.Chrome(chrome_path)
  
  #opening webpage
  for number in range(10):
      buka = driver.get(myurl + str(number))
  
  page_source = driver.page_source
  soup_this = soup(page_source, "html.parser")
  product_links = soup_this.findAll("div",{"class":"product-summary"})
  
  for number2 in range(10):
      filename = "tokopedia" + str(number2) + ".csv"
  f = open(filename, "w")
  headers = "Link" + "\n"
  f.write(headers)
  
  for product in product_links:
      barang = product.a["ng-href"]
      print(barang + "\n")
      f.write(barang + "\n")
  
  f.close()
  driver.close()
  </code></pre>
  
  <p>the result that i got in the csv is only for one page. can you guys help me?</p>