Hi,
I've started experimenting with selenium & headless firefox. The code I am using is similar to what @snippsat shared on a different thread. The relevant portion of the code can be seen below. I've chained the functions but that cannot be an issue as it was slow before chaining.
Is this normal behavior? Is there anything I can do to make it faster?
I've also experimented with headless chrome. That's slow too.
Version information: python 3.4.3, selenium 3.8.1, geckodriver 0.19.1-win32, chromedriver 2.35-win32, firefox 57.0.4, chrome 63.0.3239.132
I appreciate the cooperation of forum members.
I've started experimenting with selenium & headless firefox. The code I am using is similar to what @snippsat shared on a different thread. The relevant portion of the code can be seen below. I've chained the functions but that cannot be an issue as it was slow before chaining.
options = Options() options.add_argument("--headless") browser = webdriver.Firefox(firefox_options=options) browser.get('https://www.myntra.com/watches/fossil/fossil-women-rose-gold-toned-dial-watch-es3352i/759168/buy') print(html.fromstring(browser.page_source).xpath('//*[contains(concat( " ", @class, " " ), concat( " ", "pdp-price", " " ))]')[0].text)I also tried removing dependency on lxml by using find_elements_by_xpath, but that did not make any difference. It takes around 30 seconds to print the output in both cases.
Is this normal behavior? Is there anything I can do to make it faster?
I've also experimented with headless chrome. That's slow too.
Version information: python 3.4.3, selenium 3.8.1, geckodriver 0.19.1-win32, chromedriver 2.35-win32, firefox 57.0.4, chrome 63.0.3239.132
I appreciate the cooperation of forum members.