<s> from django . views . generic import FormView <EOL> from linkfloyd . experimental . forms import GetImagesForm <EOL> from linkfloyd . utils import CustomHTMLParser <EOL> class GetImages ( FormView ) : <EOL> template_name = '<STR_LIT>' <EOL> form_class = GetImagesForm <EOL> def form_valid ( self , form ) : <EOL> url = form . cleaned_data . get ( '<STR_LIT:url>' ) <EOL> min_size = form . cleaned_data . get ( '<STR_LIT>' ) <EOL> p = CustomHTMLParser ( url , min_size ) <EOL> images = list ( p . get_images ( ) ) <EOL> context = self . get_context_data ( form = form ) <EOL> context . update ( { <EOL> '<STR_LIT>' : images <EOL> } ) <EOL> return self . render_to_response ( context ) </s>
