isefire

WebAssignRip

Feb 2nd, 2015
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.80 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Mon Feb  2 16:23:08 2015
  4. Rips files from Essential Calculus: 2nd Edition by James Stewart on webassign
  5. To get cookies.txt download cookies from browser while logged into webassign
  6.  
  7. @author: Daniel L.
  8. """
  9. import subprocess
  10.  
  11. def rip():
  12.     ## addrss = "https://webassign.net/ebooks/sesscalc2/data/swf/stewart_essential_rects/"
  13.     ## format = "0000.swf"
  14.     ## goes to page 840
  15.    
  16.    
  17.     for i in xrange(1, 840):
  18.         num = str(i)
  19.         while len(num) < 4:
  20.             #convert to format
  21.             num = "0"+num
  22.         subprocess.call(["wget",
  23.         "https://webassign.net/ebooks/sesscalc2/"+
  24.         "data/swf/stewart_essential/"+num+".swf",
  25.         "--load-cookies=cookies.txt",
  26.         "-O",
  27.         "swfpages/"+str(i)+".swf"])
  28.    
  29. rip()
Advertisement
Add Comment
Please, Sign In to add comment