def from_url_163(m163, url, verbose=True):
    """ parse the input string (163 url), and do download""" 

    LOG.debug('processing 163 url: "%s"'% url)
    msg = u''
    if '/song?id=' in url:
        song =netease.NeteaseSong(m163,url=url)
        total_songs.append(song)
        msg = fmt_parsing % (m163_url_abbr(url),msgTxt.song,  song.song_name)

    elif '/album?id=' in url:
        album = netease.NeteaseAlbum(m163, url)
        total_songs.extend(album.songs)
        msgs = [fmt_parsing % (m163_url_abbr(url),msgTxt.album,  album.artist_name+u' => '+album.album_name)]
        if verbose:
            for s in album.songs:
                msgs.append(fmt_single_song %s.song_name)
            msg = u'\n    |-> '.join(msgs)
        else:
            msgs.append(fmt_has_song_nm % len(album.songs))
            msg= u' => '.join(msgs)

    elif '/playlist?id=' in url:
        playlist = netease.NeteasePlayList(m163, url)
        total_songs.extend(playlist.songs)
        msgs = [ fmt_parsing % (m163_url_abbr(url), msgTxt.playlist, playlist.playlist_name)]
        if verbose:
            for s in playlist.songs:
                msgs.append( fmt_single_song % s.song_name)
            msg = u'\n    |-> '.join(msgs)
        else:
            msgs.append(fmt_has_song_nm % len(playlist.songs))
            msg= u' => '.join(msgs)

    elif '/artist?id=' in url:
        topsong= netease.NeteaseTopSong(m163, url)
        total_songs.extend(topsong.songs)
        msgs = [fmt_parsing % (m163_url_abbr(url), msgTxt.artistTop ,topsong.artist_name)]
        if verbose:
            for s in topsong.songs:
                msgs.append(fmt_single_song %s.song_name)
            msg = u'\n    |-> '.join(msgs)
        else:
            msgs.append( fmt_has_song_nm % len(topsong.songs))
            msg = u' => '.join(msgs)


    global total, done
    done +=1
    pre = ('[%d/%d] ' % (done, total)) if not verbose else ''
    if not msg:
        #unknown url
        LOG.error(msgTxt.fmt_163_unknow_url% (pre,url))
    else:
        LOG.info(u'%s%s'% (pre,msg))
dataset/ETHPy150Open sk1418/zhuaxia/zhuaxia/commander.py/from_url_163/original