Python selenium get redirected url with Phantomjs -


here problem: i'm trying use selenium access webpage , special page is auto redirecting page (you open page , after few seconds, automatically redirect page). when use driver = webdriver.firefox(), idm catched link after few seconds.

enter image description here

and because don't want browser come use phantomjs instead, ut not working. application can loading page url (bitdl-1336...) not redirected link. please help!

this code:

link = 'http://torrent.ajee.sh/hash.php?hash=' + self.global_hash_code driver = webdriver.phantomjs('phantomjs.exe') driver.get(str(link)) element = driver.find_element_by_link_text('download zip') element.click() time.sleep(10) msg = qmessagebox.information(self, qstring('thành công'),qstring(driver.current_url)) 

and result:

enter image description here

please help!

sorry english

not answer phantomjs-specific question, workaround problem.

and because don't want browser come use phantomjs instead

you can continue using firefox, start in virtual display, see more information at:

you may need let browser automatically save archive in specified directory, see:


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -