Beispiel #1
0
    def wechat(self):
        '''
        生成微信二维码
        '''
        str_addr = 'https://open.weixin.qq.com/connect/confirm?uuid='
        url = "https://music.163.com/api/sns/authorize"
        netease = Netease()
        str_qrcd = netease.wechat_request(url)

        qr_text = str_addr + str_qrcd

        qr = QR(10)
        print(qr.showqr(qr_text))
Beispiel #2
0
    def wechat(self):

        #str_addr = 'https://open.weixin.qq.com/connect/confirm?uuid='
        url = "https://music.163.com/api/sns/authorize?snsType=10&clientType=web2&callbackType=Login&forcelogin=true"
        str = Netease.qr_request(url)

        qr_text = str_addr + str
        #return qr_text

        QR.showqr(qr_text)
Beispiel #3
0
import os
import time
import threading
import datetime

from mellplayer.utils.mpv import MPV
from mellplayer.api import Netease
from mellplayer.directory import BASE_DIRECTORY
from mellplayer.event.ui_event import UIEvent
from mellplayer.deco import show_changing_text, show_song_info_text, update_title_text
from mellplayer.mell_logger import mell_logger

PLAYLIST_MAX = 50
DEFAULT_VOLUME = 100
# PLAYLIST_FILE = os.path.join(BASE_DIRECTORY, 'playlist.m3u')
NeteaseApi = Netease()
UiEvent = UIEvent()


class Player(MPV):
    def __init__(self,
                 *extra_mpv_flags,
                 log_handler=None,
                 start_event_thread=True,
                 **extra_mpv_opts):
        super(Player, self).__init__(*extra_mpv_flags,
                                     log_handler=log_handler,
                                     start_event_thread=start_event_thread,
                                     **extra_mpv_opts)
        self.category = None
        self.category_playlist_ids = None