from botornado.s3.bucket import AsyncBucket
from botornado.s3.connection import AsyncS3Connection
from botornado.s3.key import AsyncKey

from thumbor_botornado.s3_loader import S3Loader
from thumbor.loaders.http_loader import HttpLoader

def load(context, url, callback):
	p = re.compile('/^https?:/i')
	m = p.match(url)
	if m:
		HttpLoader.load(context, url, callback)
	else:
		S3Loader.load(context, url, callback)

@@ -1,145 +1,10 @@
-from botornado.s3.bucket import AsyncBucket%0Afrom botornado.s3.connection import AsyncS3Connection%0Afrom botornado.s3.key import AsyncKey%0A%0Afrom
+import
  thu
@@ -28,22 +28,18 @@
 _loader 
-import
+as
  S3Loade
@@ -44,12 +44,14 @@
 der%0A
-from
+import
  thu
@@ -75,22 +75,18 @@
 _loader 
-import
+as
  HttpLoa
@@ -88,16 +88,26 @@
 tpLoader
+%0Aimport re
 %0A%0Adef lo
@@ -139,61 +139,50 @@
 ):%0A%09
-p =
+if
  re.
-compile('/%5Ehttps?:/i')%0A%09m = p.match(url)%0A%09if m
+match('https?:', url, re.IGNORECASE)
 :%0A%09%09

Add s3-http loader which delegates based on the uri