Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scrape java script web site
#4
Hi,
Thanks for the reply.
I just want to download csv/excel file from url https://www.mcxindia.com/market-data/bhavcopy .
[Image: excel.png]
I have write a code but got error and browser not getting close.

from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
path_to_chromedriver = 'D:\ChromeDriver\chromedriver.exe'
browser = webdriver.Chrome(executable_path=path_to_chromedriver, options=chrome_options)
url = 'https://www.mcxindia.com/market-data/bhavcopy'
browser.get(url)
f = open(browser.find_element_by_id('cph_InnerContainerRight_C001_lnkExpToCSV').click(), 'wb')
browser.quit()
getting error :
Error:
TypeError: expected str, bytes or os.PathLike object, not NoneType
Reply


Messages In This Thread
Scrape java script web site - by PythonHunger - Oct-24-2018, 05:01 AM
RE: Scrape java script web site - by Larz60+ - Oct-24-2018, 06:24 AM
RE: Scrape java script web site - by preethishetty - Oct-24-2018, 08:37 AM
RE: Scrape java script web site - by PythonHunger - Oct-24-2018, 09:11 AM
RE: Scrape java script web site - by Larz60+ - Oct-24-2018, 03:48 PM
RE: Scrape java script web site - by metulburr - Oct-24-2018, 07:57 PM
RE: Scrape java script web site - by PythonHunger - Oct-25-2018, 05:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can we automate Java based Webservices PythonBeginner_2020 5 2,520 Mar-25-2020, 12:09 PM
Last Post: PythonBeginner_2020
  scrape data 1 go to next page scrape data 2 and so on alkaline3 6 5,313 Mar-13-2020, 07:59 PM
Last Post: alkaline3
  Scrape script when deployed on heroku not giving expected outcomes alok001 1 3,282 Oct-19-2019, 12:39 PM
Last Post: alok001
  Web scraping and java script yoz69100 2 1,926 Oct-14-2019, 07:41 PM
Last Post: yoz69100

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020