Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the better convert headless python script
- Loading branch information
1 parent
a143288
commit 4783797
Showing
2 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from selenium import webdriver | ||
import selenium.webdriver | ||
from selenium.webdriver.common.keys import Keys | ||
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | ||
import json | ||
import sys | ||
|
||
driver_info = sys.argv[1] | ||
|
||
driver_info = json.load(open(driver_info)) | ||
print driver_info['cookies'] | ||
driver = webdriver.Firefox() | ||
#replaces phantomjs instance with firefox browser | ||
driver.get(driver_info['current_url']) | ||
for cookie in driver_info['cookies']: | ||
driver.add_cookie(cookie) | ||
driver.get(driver_info['current_url']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters