Ejemplo n.º 1
0
def get_twit_pic(**kargs):
    """Retrieve the picture from TwitPic"""
    twitpage = api_call(*urlsplit(kargs["url"])).read()
    anchor = '<img class="photo" id="photo-display" src="'
    start = twitpage.index(anchor) + len(anchor)
    end = twitpage.index('"', start)
    imgurl = twitpage[start:end]
    return api_call(*urlsplit(imgurl)).read()
Ejemplo n.º 2
0
def get_twit_pic(**kargs):
    """Retrieve the picture from TwitPic"""
    twitpage = api_call(*urlsplit(kargs['url'])).read()
    anchor = '<img class="photo" id="photo-display" src="'
    start = twitpage.index(anchor) + len(anchor)
    end = twitpage.index('"', start)
    imgurl = twitpage[start:end]
    return api_call(*urlsplit(imgurl)).read()
Ejemplo n.º 3
0
def get_tweetphoto_pic(**kargs):
    """Retrieve the picture from TweetPhoto or Plixi.com
    """
    pic_page = api_call(*urlsplit(kargs["url"])).read()
    anchor = '" alt="" id="photo"'
    end = pic_page.find(anchor)
    start = pic_page.rfind('"', 0, end) + 1
    imgurl = pic_page[start:end]
    return api_call(*urlsplit(imgurl)).read()
Ejemplo n.º 4
0
def get_tweetphoto_pic(**kargs):
    """Retrieve the picture from TweetPhoto or Plixi.com
    """
    pic_page = api_call(*urlsplit(kargs['url'])).read()
    anchor = '" alt="" id="photo"'
    end = pic_page.find(anchor)
    start = pic_page.rfind('"', 0, end) + 1
    imgurl = pic_page[start:end]
    return api_call(*urlsplit(imgurl)).read()
Ejemplo n.º 5
0
def get_twitgoo_pic(**kargs):
    """Retrieve the picture from TwitGoo
    """
    host, path, secure = urlsplit(kargs["url"])
    pic = api_call(host, path + "/img", secure).read()
    return pic
Ejemplo n.º 6
0
def get_yfrog_pic(**kargs):
    """Retrieve the picture from YFrog
    """
    host, path, secure = urlsplit(kargs["url"])
    pic = api_call(host, path + ":iphone", secure).read()
    return pic
Ejemplo n.º 7
0
def get_twitgoo_pic(**kargs):
    """Retrieve the picture from TwitGoo
    """
    host, path, secure = urlsplit(kargs['url'])
    pic = api_call(host, path + '/img', secure).read()
    return pic
Ejemplo n.º 8
0
def get_yfrog_pic(**kargs):
    """Retrieve the picture from YFrog
    """
    host, path, secure = urlsplit(kargs['url'])
    pic = api_call(host, path + ':iphone', secure).read()
    return pic