python - Using chrome headlessly with phantomjs or anything else -


i trying video url webpage, video appears in flash while opening firefox, using chrome + selenium able fetch video url.

now want deploy code on azure server, chrome windows not appears. tried http://phantomjs.org/ . phantomjs not able scrap chrome+selenium.

#driver = webdriver.chrome() works driver = webdriver.phantomjs('/usr/local/bin/phantomjs') #this not scrap  def getvideotrend(self, item):     driver.get('https://in.news.yahoo.com/video/-184010283.html')     element = webdriverwait(driver, 20).until(lambda driver: driver.find_elements_by_class_name('yvp-main'))     self.yahoo_video_trend = []     s in driver.find_elements_by_class_name('yvp-main'):         print "processing link  - ", item['link']         trend = item         print item['description']         trend['video_link'] = s.find_element_by_tag_name('video').get_attribute('src')         print          print s.find_element_by_tag_name('video').get_attribute('src')         self.yahoo_video_trend.append(trend) 


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -