#$ironpythonanalyzer #$NAME Image Counter #$AUTHOR Iron Web Analyzer #$CONTACT hamed.ji@gmail.com #$URL http://IronWebAnalzyer.SourceForge.net/Analyzers/Image_Counter.html #$DESCRIPTION Warn for html page with more than 20 images #$CONTENTTYPE text/html #$TESTPATH http://www.coolbit-int.com/products.html if content.AsHtml != None: Tags = content.AsHtml.GetElementByTag("img") List = [] for t in Tags: if not t in List: List.append(t) if len(List) > 20: content.AddMessage("There are " + str(len(List)) + " diffrent images in this page. Try to keep images less than 20 in a page.", "w")
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)