|
|
@ -16,6 +16,8 @@ while True:
|
|
|
|
# URL iterates through the sequence number
|
|
|
|
# URL iterates through the sequence number
|
|
|
|
url = ("https://www.jstor.org/stable/23267102?Search=yes&resultItemClick=true&searchText=tea&searchUri=%2Faction%2FdoBasicSearch%3FQuery%3Dtea%26amp%3Bacc%3Don%26amp%3Bfc%3Doff%26amp%3Bwc%3Don%26amp%3Bgroup%3Dnone&ab_segments=0%2Fl2b-basic-1%2Frelevance_config_with_tbsub_l2b&refreqid=search%3A9fd0deff8d3258de87d3b54d6dfad664&" + "seq=%i#metadata_info_tab_contents"%i)
|
|
|
|
url = ("https://www.jstor.org/stable/23267102?Search=yes&resultItemClick=true&searchText=tea&searchUri=%2Faction%2FdoBasicSearch%3FQuery%3Dtea%26amp%3Bacc%3Don%26amp%3Bfc%3Doff%26amp%3Bwc%3Don%26amp%3Bgroup%3Dnone&ab_segments=0%2Fl2b-basic-1%2Frelevance_config_with_tbsub_l2b&refreqid=search%3A9fd0deff8d3258de87d3b54d6dfad664&" + "seq=%i#metadata_info_tab_contents"%i)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
name = (input("How do you want to call you files? "))
|
|
|
|
|
|
|
|
|
|
|
|
# Tell Selenium to open a new Firefox session
|
|
|
|
# Tell Selenium to open a new Firefox session
|
|
|
|
# and specify the path to the driver
|
|
|
|
# and specify the path to the driver
|
|
|
|
driver = webdriver.Firefox(executable_path=os.path.dirname(os.path.realpath(__file__)) + '/geckodriver')
|
|
|
|
driver = webdriver.Firefox(executable_path=os.path.dirname(os.path.realpath(__file__)) + '/geckodriver')
|
|
|
@ -38,7 +40,7 @@ while True:
|
|
|
|
imgdata = base64.b64decode(base64String)
|
|
|
|
imgdata = base64.b64decode(base64String)
|
|
|
|
|
|
|
|
|
|
|
|
# save the image
|
|
|
|
# save the image
|
|
|
|
filename = ('page%i.gif'%i)
|
|
|
|
filename = (name + '%i.gif'%i)
|
|
|
|
with open(filename, 'wb') as f:
|
|
|
|
with open(filename, 'wb') as f:
|
|
|
|
f.write(imgdata)
|
|
|
|
f.write(imgdata)
|
|
|
|
|
|
|
|
|
|
|
|