File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 19
19
i.register(imageresolver.WebpageResolver(load_images=True, parser='lxml',blacklist='easylist.txt'))
20
20
url = sys.argv[1]
21
21
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")
25
25
26
26
Differences From the Javascript Version
27
27
---------------------------------------
@@ -116,6 +116,10 @@ Use the name "ImageResolver" to configure a logger. Skipped exceptions will be l
116
116
EXCEPTIONS
117
117
----------
118
118
119
+ **ImageResolverError **
120
+
121
+ Base exception for other exceptions below.
122
+
119
123
**ImageInfoException **
120
124
121
125
Raised 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
145
149
COPYRIGHT / ACKNOWLEDGEMENTS
146
150
----------------------------
147
151
148
- Copyright (c) 2014 Constituent Voice, LLC.
152
+ Copyright (c) 2020 Constituent Voice, LLC.
149
153
150
154
Original idea and basic setup came from Maurice Svay https://github.com/mauricesvay/ImageResolver
151
155
You can’t perform that action at this time.
0 commit comments