View Single Post
Old 01-14-2019, 07:06 AM   #2
qikstart
Junior Member
qikstart began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2019
Device: kindle paperwhite
Arrow Updated Script

Thanks for sharing your script. I updated it somewhat to work with the current version of the site. I have not looked into a Calibre extension, but it's a good idea if it is possible.

Code:
#!/usr/bin/python

import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

def getnext():
	driver.find_element_by_link_text("Next page").click()
	driver.find_element_by_id("mlcbAll").click()
	return


url='https://search.proquest.com/publication.pubfull:searchmostrecentissue?t:ac=publications_10482'

# https://search.proquest.com/publication/54814/
driver = webdriver.Firefox()
driver.get(url)
time.sleep(3)
driver.get(url)
##Introduce wait here
time.sleep(5)
print("hello")
el = driver.find_element_by_name("itemsPerPage")

for option in el.find_elements_by_tag_name('option'):
	if option.text == '100':
		option.click()

driver.find_element_by_id("mlcbAll").click()
errorcode=0

while errorcode ==0:
	try:
		getnext()
	except:
		errorcode=1

driver.find_element_by_id("tsMore").click()
driver.find_element_by_id("saveExportLink_1").click()


driver.find_elements_by_xpath("//*[contains(@id, 'submitButton')]")[0].click()
qikstart is offline   Reply With Quote