Exemplo n.º 1
0
def get_latest(mediaType):
    '''
    Deprecated. Using Shahid.Net API to fetch the latest media items by different media types
    '''
    url = URL_LATEST.format(operation=LATEST_MAP[mediaType], offset='0', maxLimit=MAX_LIMIT)
    response = html(url)
    return response
def get_most_watched(programType):
    url = URL_MOST_WATCHED.format(operation=MOST_WATCHED_MAP[programType],
                                  offset='0',
                                  maxLimit=MAX_LIMIT)
    html_response = html(url)

    items = html_response.find('ul').findAll('a', {'class': 'tip_anchor'})
    return [_get_item(clip, programType) for clip in items]
def get_latest(mediaType):
    '''
    Deprecated. Using Shahid.Net API to fetch the latest media items by different media types
    '''
    url = URL_LATEST.format(operation=LATEST_MAP[mediaType],
                            offset='0',
                            maxLimit=MAX_LIMIT)
    response = html(url)
    return response
Exemplo n.º 4
0
def get_most_watched(programType):
    url = URL_MOST_WATCHED.format(operation=MOST_WATCHED_MAP[programType], offset='0', maxLimit=MAX_LIMIT)
    html_response = html(url)

    items = html_response.find('ul').findAll('a', {'class': 'tip_anchor'})
    return [_get_item(clip, programType) for clip in items]