Example #1
0
def scrape_image(response, _=None):
    opengraph_url = opengraph.find_image(response)
    if opengraph_url:
        return opengraph_url

    for image_url in response.xpath(
            '//div[@id="tve_editor"]//img/@src').extract():
        if image_url.endswith('.jpg'):
            return image_url
    return None
def scrape_image(response, _=None):
    opengraph_url = opengraph.find_image(response)
    if opengraph_url:
        return opengraph_url
    return None
def scrape_image(response, _=None):
    return opengraph.find_image(response)