File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 i.register(imageresolver.WebpageResolver(load_images=True, parser='lxml',blacklist='easylist.txt'))
2020 url = sys.argv[1]
2121
22- print i.resolve(url)
23- except:
24- print "An error occured"
22+ print( i.resolve(url) )
23+ except ImageResolverError :
24+ print( "An error occured")
2525
2626Differences From the Javascript Version
2727---------------------------------------
@@ -116,6 +116,10 @@ Use the name "ImageResolver" to configure a logger. Skipped exceptions will be l
116116EXCEPTIONS
117117----------
118118
119+ **ImageResolverError **
120+
121+ Base exception for other exceptions below.
122+
119123**ImageInfoException **
120124
121125Raised if the image could not be read or type, width or height properties return undefined.
@@ -145,7 +149,7 @@ Probably. Send us an email or a patch if you find one
145149COPYRIGHT / ACKNOWLEDGEMENTS
146150----------------------------
147151
148- Copyright (c) 2014 Constituent Voice, LLC.
152+ Copyright (c) 2020 Constituent Voice, LLC.
149153
150154Original idea and basic setup came from Maurice Svay https://github.com/mauricesvay/ImageResolver
151155
You can’t perform that action at this time.
0 commit comments