Recent Posts
None | 1 sec ago
PHP | 25 sec ago
None | 34 sec ago
PHP | 44 sec ago
C++ | 50 sec ago
None | 1 min ago
ActionScript 3 | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Carlos Crdenas Fernnde on the 11th of Jan 2010 06:38:52 PM Download | Raw | Embed | Report
  1. import string
  2. import urllib2
  3. import os
  4. import sys
  5. import subprocess
  6.  
  7. def coma(cad):
  8.         try:
  9.             retcode = subprocess.call(cad, shell=True)
  10.             print retcode
  11.             if retcode < 0:
  12.                 print >>sys.stderr, "Proceso Hijo Fallo", -retcode
  13.             else:
  14.                 print >>sys.stderr, "Proceso Hijo enviado", retcode
  15.         except OSError, e:
  16.             print >>sys.stderr, "Ejecucion Fallida:", e
  17.  
  18. s0="http://www.tandf.co.uk/journals/JanMathMadness/"
  19. ur1="http://www.informaworld.com/smpp/"
  20. jur="JanMathMadness"
  21. coma("mkdir "+jur+" && cd "+jur+"/")
  22.  
  23. r0=urllib2.urlopen(s0)
  24. h0=r0.read()
  25.  
  26. for i in range(1,len(h0.split("<p class=\"crop\"><a href=\""))):
  27.         d=h0.split("<p class=\"crop\"><a href=\"")[i].split("\"><img")[0].split("\" title=\"")[0][-4:]
  28.         n=h0.split("<p class=\"crop\"><a href=\"")[i].split("\"><img")[0].split("\" title=\"")[1]
  29.         s1=h0.split("<p class=\"crop\"><a href=\"")[i].split("\"><img")[0].split("\" title=\"")[0]
  30.         coma("mkdir "+jur+"/"+d+" && cd "+jur+"/"+d+"/")       
  31.         coma("echo "+n+" > "+jur+"/"+d+"/Journal.txt")
  32.         r1=urllib2.urlopen(s1)
  33.         h1=r1.read()
  34.  
  35.         for j in range(1,len(h1.split("<td nowrap=\"nowrap\" style=\"text-indent: 5px;\">"))):
  36.                 s2=ur1+h1.split("<td nowrap=\"nowrap\" style=\"text-indent: 5px;\">")[j][12:43]
  37.                 coma("mkdir "+jur+"/"+d+"/"+str(j)+" && cd "+jur+"/"+d+"/"+str(j)+"/")         
  38.                 r2=urllib2.urlopen(s2)
  39.                 h2=r2.read()
  40.  
  41.                 p=len(h2.split("title=\"Click to view the PDF fulltext\">Full Text PDF</a> | <a href=\"./"))-1
  42.  
  43.                 for k in range(0,p):
  44.  
  45.                         print ur1+h2.split("title=\"Click to view the PDF fulltext\">Full Text PDF</a> | <a href=\"./")[k][-58:-2]
  46.                         coma("wget "+ur1+h2.split("title=\"Click to view the PDF fulltext\">Full Text PDF</a> | <a href=\"./")[k][-58:-2])
  47.                         coma("mv *.pdf "+jur+"/"+d+"/"+str(j)+"/")                     
  48.  
  49.                 coma("cd .. ")
  50.  
  51.         coma ("cd .. ")
  52.  
  53. coma(" cd ..")
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: