Beispiel #1
0
def scrape_description(url, shortmem=None):
    try:
        details = shortmem['base_etree'].xpath(
            "//span[@id='video-description']")[0]
        return util.clean_description_html(util.lxml_inner_html(details))
    except IndexError:
        raise errors.FieldNotFound('Could not find the description field')
Beispiel #2
0
def scrape_description(url, shortmem=None):
    try:
        details = shortmem['base_etree'].xpath(
            "//span[@id='video-description']")[0]
        return util.clean_description_html(util.lxml_inner_html(details))
    except IndexError:
        raise errors.FieldNotFound('Could not find the description field')
Beispiel #3
0
def scrape_description(url, shortmem={}):
    try:
        description = shortmem['oembed'][
            'title']  # No desc provided in oembed. Use title.
    except KeyError:
        description = ''
    return util.clean_description_html(description)
Beispiel #4
0
def scrape_description(url, shortmem={}):
    if 'summary' in shortmem['feed_item']:
        description = shortmem['feed_item'].summary
    else:
        description = _fp_get(shortmem, 'puredescription')

    if description:
        return util.clean_description_html(description)
    else:
        return u''
Beispiel #5
0
def scrape_description(url, shortmem={}):
    if 'summary' in shortmem['feed_item']:
        description = shortmem['feed_item'].summary
    else:
        description = _fp_get(shortmem, 'puredescription')

    if description:
        return util.clean_description_html(description)
    else:
        return u''
Beispiel #6
0
def scrape_description(url, shortmem={}):
    try:
        description = shortmem["api_data"]["description"]
    except KeyError:
        description = ""
    return util.clean_description_html(description)
Beispiel #7
0
def scrape_description(url, shortmem={}):
    return util.clean_description_html(shortmem['api_data']['description'])
Beispiel #8
0
def scrape_description(url, shortmem={}):
    try:
        description = shortmem['api_data']['description']
    except KeyError:
        description = ''
    return util.clean_description_html(description)
Beispiel #9
0
def scrape_description(url, shortmem={}):
    try:
        description = shortmem['api_data']['description']
    except KeyError:
        description = ''
    return util.clean_description_html(description)
Beispiel #10
0
def scrape_description(url, shortmem=None):
    return util.clean_description_html(shortmem['api_data']['description'])