def original_image_extender(pipeline_index,<EOL>finder_image_urls,<EOL>extender_image_urls=[],<EOL>*args, **kwargs):
now_extender_image_urls = []<EOL>search_re = re.compile(r'<STR_LIT>', re.IGNORECASE)<EOL>for image_url in finder_image_urls:<EOL><INDENT>if '<STR_LIT>' in image_url.lower():<EOL><INDENT>if search_re.search(image_url):<EOL><INDENT>extender_image_url = search_re.sub('<STR_LIT>', image_url, count=<NUM_LIT:1>)<EOL>now_extender_image_urls.append(extender_image_url)<EOL><DEDENT><DEDENT><DEDENT>output = {}<EOL>output['<STR_LIT>'] = extender_image_urls + now_extender_image_urls<EOL>return output<EOL>
Example:
http://media-cache-ec0.pinimg.com/70x/50/9b/bd/509bbd5c6543d473bc2b49befe75f4c6.jpg
http://media-cache-ec0.pinimg.com/236x/50/9b/bd/509bbd5c6543d473bc2b49befe75f4c6.jpg
http://media-cache-ec0.pinimg.com/736x/50/9b/bd/509bbd5c6543d473bc2b49befe75f4c6.jpg
to
http://media-cache-ec0.pinimg.com/originals/50/9b/bd/509bbd5c6543d473bc2b49befe75f4c6.jpg