Posts Tagged descargar
Regalo del Blog FIIS-UNI, script en Python para descargar todas las publicaciones disponibles de la Editorial Taylor & Francis
Escrito por jozeluiz en artículo, internacional el enero 13th, 2010

Gracias a @unimauro , http://unimauro.blogspot.com
Puedes bajar libros, paper, review and journal de la editorial Taylor & Francis claro todos los que estén disponibles hasta el 31 de Enero . Funciona en tu Linux.… Hay libros y editoriales de mas de 50 años … así que va a demorar un poco la descarga
En tu línea de comandos:
# python script_de_unimauro.py
y a esperar …
PD Quién ya haya bajado todo, por fa avisa para compartir …
Aquí el código:
(puedes descargarlo también de aquí: descargar)
*******************************************************************************************
import string
import urllib2
import os
import sys
import subprocess
def coma(cad):
try:
retcode = subprocess.call(cad, shell=True)
print retcode
if retcode < 0:
print »sys.stderr, “Proceso Hijo Fallo”, –retcode
else:
print »sys.stderr, “Proceso Hijo enviado”, retcode
except OSError, e:
print »sys.stderr, “Ejecucion Fallida:”, e
s0=“http://www.tandf.co.uk/journals/JanMathMadness/“
ur1=“http://www.informaworld.com/smpp/“
jur=“JanMathMadness“
coma(“mkdir “+jur+” && cd “+jur+”/”)
r0=urllib2.urlopen(s0)
h0=r0.read()
for i in range(1,len(h0.split(“<p class=\“crop\”><a href=\””))):
d=h0.split(“<p class=\“crop\”><a href=\””)[i].split(“\”><img”)[0].split(“\” title=\””)[0][-4:]
n=h0.split(“<p class=\“crop\”><a href=\””)[i].split(“\”><img”)[0].split(“\” title=\””)[1]
s1=h0.split(“<p class=\“crop\”><a href=\””)[i].split(“\”><img”)[0].split(“\” title=\””)[0]
coma(“mkdir “+jur+”/”+d+” && cd “+jur+”/”+d+”/”)
coma(“echo “+n+” > “+jur+”/”+d+”/Journal.txt”)
r1=urllib2.urlopen(s1)
h1=r1.read()
for j in range(1,len(h1.split(“<td nowrap=\“nowrap\” style=\“text-indent: 5px;\”>”))):
s2=ur1+h1.split(“<td nowrap=\“nowrap\” style=\“text-indent: 5px;\”>”)[j][12:43]
coma(“mkdir “+jur+”/”+d+”/”+str(j)+” && cd “+jur+”/”+d+”/”+str(j)+”/”)
r2=urllib2.urlopen(s2)
h2=r2.read()
p=len(h2.split(“title=\“Click to view the PDF fulltext\”>Full Text PDF</a> | <a href=\”./”))-1
for k in range(0,p):
print ur1+h2.split(“title=\“Click to view the PDF fulltext\”>Full Text PDF</a> | <a href=\”./”)[k][-58:-2]
coma(“wget “+ur1+h2.split(“title=\“Click to view the PDF fulltext\”>Full Text PDF</a> | <a href=\”./”)[k][-58:-2])
coma(“mv *.pdf “+jur+”/”+d+”/”+str(j)+”/”)
coma(“cd .. ”)
coma (“cd .. ”)
coma(“ cd ..”)
*******************************************************************************************

Al centro a la derecha .







Comentarios recientes: