isefire icon

WebAssignRip

isefire | PRO | 02/02/15 10:10:07 PM UTC | 0 ⭐ | 391 👁️ | Never ⏰ | []
Python |

800 B

|

None

|

0 👍

/

0 👎

# -*- coding: utf-8 -*-
"""
Created on Mon Feb  2 16:23:08 2015
Rips files from Essential Calculus: 2nd Edition by James Stewart on webassign
To get cookies.txt download cookies from browser while logged into webassign
 
@author: Daniel L.
"""
import subprocess
 
def rip():
    ## addrss = "https://webassign.net/ebooks/sesscalc2/data/swf/stewart_essential_rects/"
    ## format = "0000.swf"
    ## goes to page 840
    
    
    for i in xrange(1, 840):
        num = str(i)
        while len(num) < 4:
            #convert to format
            num = "0"+num
        subprocess.call(["wget", 
        "https://webassign.net/ebooks/sesscalc2/"+
        "data/swf/stewart_essential/"+num+".swf",
        "--load-cookies=cookies.txt", 
        "-O",
        "swfpages/"+str(i)+".swf"])
    
rip()

Comments