Retrieve all CSS stylesheets including embedded for a given URL.
Optional setting of User-Agent used for retrieval possible
to handle browser sniffing servers.
|
__init__(self,
ua=None,
log=None,
defaultloglevel=20)
initialize a new Capture object |
source code
|
|
|
|
|
_createStyleSheet(self,
href=None,
media=None,
parentStyleSheet=None,
title=u'
' ,
cssText=None,
encoding=None)
returns CSSStyleSheet read from href or if cssText is given use that |
source code
|
|
|
_doImports(self,
parentStyleSheet,
baseurl=None)
handle all @import CSS stylesheet recursively
found CSS stylesheets are appended to stylesheetlist |
source code
|
|
|
|
|
capture(self,
url,
ua=None)
Capture stylesheets for the given url, any HTTPError is raised to
caller. |
source code
|
|
|
saveto(self,
dir,
saveraw=False,
minified=False)
saves css in "dir" in the same layout as on the server
internal stylesheets are saved as "dir/__INLINE_STYLE__.html.css" |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|