爬蟲實戰 -- QQ音樂爬取全部歌曲

2020-09-29 14:00:50

前景介紹

最近小夥伴們聽歌的興趣大漲,網抑雲綜合症已經遍佈各地。
咱們再來擡高一波QQ音樂的熱度吧。
土豪充綠鑽 和 刷永久綠鑽的除外(me🤣)


爬它!

目標:歌手列表
任務:將A到Z的歌手以及全部頁數的歌存到本地和資料庫

觀察網頁url結構

當我們進入網頁時發現此時是一個無引數的html網頁載入。
正常網頁

尋找我們想要拿到的位置尋找變化,但我們點選A開頭的網頁跳轉時,發現 url 改變了,index 引數應該是首字母,page 引數應該是頁數變化。
url改變之後的結果
這樣的話就減少一個找引數的時間啦。

找到XML

還是習慣的點開檢查按鍵,找到首字母的作者提供的XML都需要什麼引數,隨便點點A-Z發現 XML 有一個請求蹦出來,裡面返回了是個 json 資料集,都點開看看發現找到了每個作者的引數了。成功了一小半!
XML返回資料集

既然拿到了XML的網站,POST請求是一定的啦,接下來就該分析分析網站所需要的引數都是什麼了,大致猜測一下,這麼多資料中sign和data引數有點詭異,不像是正常的引數,加密引數也找到了。
所需參數

破解sign加密引數

search 找一下sign都在哪裡。因為sign應該是個變數,所以說在他後面加個=會查詢的更精確一些。找到一個sign引數的位置,這應該是個JavaScript程式碼,那就應該是這裡面了。點進去!
search查詢
在JavaScript中找到了 sign 的位置,找到了一個JavaScript呼叫的網站,我們進去看看是什麼程式碼在裡面。
找到了網站
當我們進入網站之後,程式碼有點亂我們線上格式化一下看看裡面是什麼。
找到網站
格式化程式碼後發現這個裡面含有sign引數。這個應該是sign的加密演演算法,但是其中傳了一個引數進入,我們需要了解一下他傳了什麼引數,這樣我們的sign就出來了。
格式化
回到我們呼叫JavaScript網站的檔案中,繼續往下看,我們發現 sign 傳數值就在他的下部。我們看到了傳了個data給這個sign加密函數,點斷點看看data引數是什麼。這data值看的好眼熟,這不是一開始很奇怪那個引數data麼。原來data弄出來了sign就能給出來的。
data返回值
我們繼續找剛才的sign。點選下一次跳轉我們發現我們找到另一個函數在裡面,產生了一種疑惑,這個函數是做什麼的,他為什麼會跳向這裡。
跳轉疑惑
那我們先看看我們格式化出來的JavaScript到底能不能執行吧。說不定能執行呢。
js運行
哦吼,能執行,那就好辦了,看看他返回的引數到底是啥,在開頭定義一個sign=null,將t返回給sign,再把sign列印出來。這是剛才的那個跳轉過去的方法。
返回結果
原來如此,那我們將sign呼叫一下加個(),我們就能發現sign的值就出現了。但我們重複執行發現我們無法得到他的加密值,因為這些都是一樣的。
在這裡插入圖片描述
回想我們剛才說的話,他需要加一個data引數才可以獲得加密引數,那好再改一下。
sign獲取加密
首先我們先下載一個python呼叫JavaScript的庫。pip install PyExecJS
開始寫python程式碼

import execjs

def get_sign(data):
    with open('a.js','r',encoding='utf-8') as f:
        text = f.read()
    js_data = execjs.compile(text)
    sign = js_data.call('get_sign',data)
    return sign
    
if __name__ == "__main__":
    data = '{"comm":{"ct":24,"cv":0},"singerList":{"module":"Music.SingerListServer","method":"get_singer_list","param":{"area":-100,"sex":-100,"genre":-100,"index":2,"sin":0,"cur_page":1}}}'
    sign = get_sign(data)
    print(data)
    print(sign)

這是多次呼叫程式碼的結果,發現data傳入成功了。
sign加密返回結果

獲取歌手個數以及頁數

個數其實一開始我們已經拿到了,只不過那時候沒介紹,仔細的童鞋們應該是看到了總數到底為多少個。我們點開剛才的返回json結果就能看到total已經給出來當前的個數了。
當前歌手個數
現在該分析一下data引數,盲猜一通估計page和index都在data裡面,要不然這個引數傳不上去呀。好的分析一下data到底有啥,咱拿過來看看。data裡面看到了get_singer_list這個應該是主要的東西。

# 這個是 A開頭 第一頁
#{"comm":{"ct":24,"cv":0},"singerList":{"module":"Music.SingerListServer","method":"get_singer_list","param":{"area":-100,"sex":-100,"genre":-100,"index":1,"sin":0,"cur_page":1}}}
# 這個是 B開頭 第一頁
#{"comm":{"ct":24,"cv":0},"singerList":{"module":"Music.SingerListServer","method":"get_singer_list","param":{"area":-100,"sex":-100,"genre":-100,"index":2,"sin":0,"cur_page":1}}}
# 這個是 B開頭 第二頁
#{"comm":{"ct":24,"cv":0},"singerList":{"module":"Music.SingerListServer","method":"get_singer_list","param":{"area":-100,"sex":-100,"genre":-100,"index":2,"sin":80,"cur_page":2}}}
# 這個是 B開頭 第三頁
#{"comm":{"ct":24,"cv":0},"singerList":{"module":"Music.SingerListServer","method":"get_singer_list","param":{"area":-100,"sex":-100,"genre":-100,"index":2,"sin":160,"cur_page":3}}}

大致我們能分析出來。

  • 字母的變化在 index 處,也就是A到Z以及後面的# 應該是一共27個在裡面,也就是index從1到27我們需要傳給他。
  • 頁數的變化在 sin 這裡,第一頁是0,第二頁就是80,第三頁是160,冷靜分析一下應該是從0開始以80為公差的等差數列。這個八十應該是代表每一頁都含有八十個歌手。
  • cur_page應該就是當前頁數的意思。那咱們跟著sin一起改變。

那在這我們拿到了總數,加上每一頁總共能展示多少,因為多出來的個數需要佔一頁才可以,我們使用向下取整

獲取作者名字以及id號

我們根據上述寫出來爬蟲程式碼後,就可以成功獲取 json 的返回值了,在裡面我們能看到一個歌手的引數一共有五個,其中 singer_mid 和 singer_name 是我們所需要的。拿到這兩個值後可以進入網站下載當前歌手的歌曲。
作者的參數

尋找歌手的歌曲

我們隨意點進去一個歌手,進去後尋找XML的網站,我在這裡找好了是 getSingerSong 變數。
在這裡能獲取歌手的每首歌的所能拿到的結果。
XML位置
我們看一下里面都需要什麼引數,好像和上次的差不多哦。sign已經獲取到了,data是給定的變數。單純的data有點變化,但問題不大。那說明還是能正常存取這個XML的。
data中有點變化的位置就是 singerMid ,這個引數我們在剛才已經獲取到了。直接在裡面參照一下就好了。begin的引數是一個歌手歌的頁數,num是一頁中包括多少歌曲。其實我們傳引數可以將這個引數改一下的。把num的值改到一個很大的值,我們就可以不需要改變begin的引數就能拿到所有的歌曲結果。
所需參數
我們仔細找一下 json 裡面的引數,點選音樂連結進入發現是https://y.qq.com/n/yqq/song/002MQlds19S8qy.html,我們能發現,在這個歌曲裡面的 mid 引數就是每首歌的格式化位置。
每首歌給出的結果

尋找下載歌曲的m4a連結

我們點入播放中。尋找裡面的m4a連結看看都包含什麼引數,發現存在七個連結都是。但我們仔細一看歌曲的大小我們就會發現,前幾個都是有問題的發包,一首歌怎麼可能只有幾kb呢。毫不猶豫點進去最後一個。
XML尋找
哦吼,這回引數不一樣了哦。那我們在重新分析一下下吧別懶了。
參數檢視
我們先查詢一下他給出來的一些包,看看能不能找到一個非加密引數出來。
果然,功夫不負有心人。vkey 就不是個加密引數!
vkey參數

破解引數前先學會"投機取巧"

我不知道剛才有沒有仔細看這個位置,發現這個也是個很長的字串,但是他很特殊,特殊到它和m4a的url是一樣的。
結果在這!
為了讓你們看到,我在這裡把這倆寫出來,發現到他們差了什麼。不變的字串字首。。

# C400002wiewH40saXM.m4a?guid=9232644380&vkey=A6F8B706468C0ECFE0F8B6E5E8AAD783D5F852ED0CA66692EB1033B209080BE61208609BEBC2EAF66FA86AC887C8C9F03C02A152E2EF4E24&uin=0&fromtag=66
# https://isure.stream.qqmusic.qq.com/C400002wiewH40saXM.m4a?guid=9232644380&vkey=A6F8B706468C0ECFE0F8B6E5E8AAD783D5F852ED0CA66692EB1033B209080BE61208609BEBC2EAF66FA86AC887C8C9F03C02A152E2EF4E24&uin=0&fromtag=66

那我們先看看vkey到底需要什麼引數給進去。其他引數還是都那些,還是差了一個data需要給進去的。咱們分析一下data都需要給啥吧。
vkey所需參數

# {"req":{"module":"CDN.SrfCdnDispatchServer","method":"GetCdnDispatch","param":{"guid":"9232644380","calltype":0,"userip":""}},"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey","param":{"guid":"9232644380","songmid":["002MQlds19S8qy"],"songtype":[0],"uin":"0","loginflag":1,"platform":"20"}},"comm":{"uin":0,"format":"json","ct":24,"cv":0}}

大致分析了一下

  • guid是個無用引數。
  • songmid 是歌曲的 mid,我們剛才已經獲取了
  • uin 需要加入一個qq號才可以獲取,如果未登陸預設為0
  • 其他都是定死的引數

m4a檔案是一個二進位制檔案。所以說我們寫程式碼一定要寫入二進位制檔案才可以。

程式碼優化

  1. 因為資料量過大,日常存入資料庫
  2. 因為資料下載量大,使用多程序爬取。將A-Z及#各開一個程序
  3. 防止存入資料庫在多執行緒階段同時佔用,上鎖

全部程式碼

crawl.py

#Python3.7 
#encoding = utf-8
import execjs,requests,math,os,threading
from urllib import parse
from concurrent.futures import ThreadPoolExecutor,ProcessPoolExecutor
from db import SQLsession,Song
lock = threading.Lock()
headers = {
    'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36',
    'Referer':'https://y.qq.com/portal/singer_list.html',
}
session = SQLsession()
def get_sign(data):
    with open('./QQ音樂/get_sign.js','r',encoding='utf-8') as f:
        text = f.read()
    js_data = execjs.compile(text)
    sign = js_data.call('get_sign',data)
    return sign
def myProcess():
    #把歌手按照首字母分為27類
    with ProcessPoolExecutor(max_workers = 2) as p:#建立27個程序
        for i in range(1,28):
            p.submit(get_singer_mid,i)
def get_singer_mid(index):
    #index =  1-----27
    #開啟歌手列表頁面,找出singerList,找出所有歌手的數目,除於80,構造後續頁面獲取page歌手
    #找出mid, 用於歌手詳情頁
    data = '{"comm":{"ct":24,"cv":0},"singerList":'\
        '{"module":"Music.SingerListServer","method":"get_singer_list","param":'\
        '{"area":-100,"sex":-100,"genre":-100,"index":%s,"sin":0,"cur_page":1}}}'%(str(index))
    sign = get_sign(data)
    url = 'https://u.y.qq.com/cgi-bin/musics.fcg?-=getUCGI6720748185279282&g_tk=5381'\
        '&sign={}'\
        '&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8'\
        '&notice=0&platform=yqq.json&needNewCode=0'\
        '&data={}'.format(sign,parse.quote(data)) 
    html = requests.get(url,headers = headers).json()
    total = html['singerList']['data']['total']#多少個歌手
    pages = int(math.floor(int(total)/80))#向下取整
    thread_number = pages
    Thread = ThreadPoolExecutor(max_workers = thread_number)
    sin = 0
    #分頁迭代每一個字母下的所有頁面歌手
    for page in range(1,pages+2):
        data = '{"comm":{"ct":24,"cv":0},"singerList":{"module":"Music.SingerListServer","method":"get_singer_list","param":{"area":-100,"sex":-100,"genre":-100,"index":%s,"sin":%s,"cur_page":%s}}}'%(str(index),str(sin),str(page))
        sign = get_sign(data)
        url = 'https://u.y.qq.com/cgi-bin/musics.fcg?-=getUCGI6720748185279282&g_tk=5381'\
            '&sign={}'\
            '&loginUin=0&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8'\
            '&notice=0&platform=yqq.json&needNewCode=0'\
            '&data={}'.format(sign,parse.quote(data)) 
        html = requests.get(url,headers = headers).json()
        sings = html['singerList']['data']['singerlist']
        for sing in sings:
            singer_name = sing['singer_name']   #獲取歌手名字
            mid = sing['singer_mid']            #獲取歌手mid
            Thread.submit(get_singer_data,mid = mid,
                            singer_name = singer_name,)
        sin+=80
#獲取歌手資訊
def get_singer_data(mid,singer_name):
    #獲取歌手mid,進入歌手詳情頁,也就是每一個歌手歌曲所在頁面
    #找出歌手的歌曲資訊頁
    data = '{"comm":{"ct":24,"cv":0},"singerSongList":{"method":"GetSingerSongList","param":'\
            '{"order":1,"singerMid":"%s","begin":0,"num":10}'\
            ',"module":"musichall.song_list_server"}}'%(str(mid))
    sign = get_sign(data)
    url = 'https://u.y.qq.com/cgi-bin/musics.fcg?-=getSingerSong4707786209273719'\
        '&g_tk=5381&sign={}&loginUin=0'\
        '&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0'\
        '&data={}'.format(sign,parse.quote(data))
    html = requests.get(url,headers = headers).json()
    songs_num = html['singerSongList']['data']['totalNum']
    for number in range(0,songs_num,100):
        data = '{"comm":{"ct":24,"cv":0},"singerSongList":{"method":"GetSingerSongList","param":'\
            '{"order":1,"singerMid":"%s","begin":%s,"num":%s}'\
            ',"module":"musichall.song_list_server"}}'%(str(mid),str(number),str(songs_num))
        sign = get_sign(data)
        url = 'https://u.y.qq.com/cgi-bin/musics.fcg?-=getSingerSong4707786209273719'\
            '&g_tk=5381&sign={}&loginUin=0'\
            '&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq.json&needNewCode=0'\
            '&data={}'.format(sign,parse.quote(data))
        html = requests.get(url,headers = headers).json()
        datas = html['singerSongList']['data']['songList']
        for d in datas:
            sing_name = d['songInfo']['title']
            song_mid = d['songInfo']['mid']
            try:
                lock.acquire()
                session.add(Song(song_name = sing_name,
                                song_singer = singer_name,
                                song_mid = song_mid))
                session.commit()
                lock.release()
                print('commit')
            except:                
                session.rollback()
                print('rollbeak')
            print('歌手名字:{}\t歌曲名字:{}\t歌曲ID:{}'.format(singer_name,sing_name,song_mid))
            download(song_mid,sing_name,singer_name)
def download(song_mid,sing_name,singer_name):
    qq_number = '請在這裡寫你的qq號'
    try:qq_number = str(int(qq_number))
    except:raise 'qq號未填寫'
    data = '{"req":{"module":"CDN.SrfCdnDispatchServer","method":"GetCdnDispatch"'\
        ',"param":{"guid":"4803422090","calltype":0,"userip":""}},'\
        '"req_0":{"module":"vkey.GetVkeyServer","method":"CgiGetVkey",'\
        '"param":{"guid":"4803422090","songmid":["%s"],"songtype":[0],'\
        '"uin":"%s","loginflag":1,"platform":"20"}},"comm":{"uin":%s,"format":"json","ct":24,"cv":0}}'%(str(song_mid),str(qq_number),str(qq_number))
    sign = get_sign(data)    
    url = 'https://u.y.qq.com/cgi-bin/musics.fcg?-=getplaysongvkey27494207511290925'\
        '&g_tk=1291538537&sign={}&loginUin={}'\
        '&hostUin=0&format=json&inCharset=utf8&outCharset=utf-8&notice=0'\
        '&platform=yqq.json&needNewCode=0&data={}'.format(sign,qq_number,parse.quote(data))
    html = requests.get(url,headers = headers).json()
    try:
        purl = html['req_0']['data']['midurlinfo'][0]['purl']
        url = 'http://119.147.228.27/amobile.music.tc.qq.com/{}'.format(purl)
        html = requests.get(url,headers = headers)
        html.encoding = 'utf-8'
        sing_file_name = '{} -- {}'.format(sing_name,singer_name)
        filename = './QQ音樂/歌曲'
        if not os.path.exists(filename):
            os.makedirs(filename)
        with open('./QQ音樂/歌曲/{}.m4a'.format(sing_file_name),'wb') as f:
            print('\n正在下載{}歌曲.....\n'.format(sing_file_name))
            f.write(html.content) 
    except:
        print('查詢許可權失敗,或沒有查到對應的歌曲')
if __name__ == "__main__":
    myProcess()

db.py

from sqlalchemy import Column,Integer,String,create_engine
from sqlalchemy.orm import  sessionmaker,scoped_session
from sqlalchemy.ext.declarative import declarative_base
#此處沒有使用pymysql的驅動
#請安裝pip install mysql-connector-python
#engine中的 mysqlconnector 為 mysql官網驅動
engine = create_engine('mysql+mysqlconnector://root:root@localhost:3306/test?charset=utf8',
                   max_overflow = 500,#超過連線池大小外最多可以建立的連結
                   pool_size = 100,#連線池大小
                   echo = False,#偵錯資訊展示
			)
Base = declarative_base()
class Song(Base):
    __tablename__ = 'song'
    song_id = Column(Integer,primary_key = True,autoincrement = True)
    song_name = Column(String(64))
    song_ablum = Column(String(64))
    song_mid = Column(String(50))
    song_singer = Column(String(50))
Base.metadata.create_all(engine)
DBsession = sessionmaker(bind = engine)
SQLsession = scoped_session(DBsession)

get_sign.js

this.window = this;
var sign = null;

!function(n, t) {
    "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (n = n || self).getSecuritySign = t()
} (this,
function() {
    "use strict";
    var n = function() {
        if ("undefined" != typeof self) return self;
        if ("undefined" != typeof window) return window;
        if ("undefined" != typeof global) return global;
        throw new Error("unable to locate global object")
    } ();
    n.__sign_hash_20200305 = function(n) {
        function l(n, t) {
            var o = (65535 & n) + (65535 & t);
            return (n >> 16) + (t >> 16) + (o >> 16) << 16 | 65535 & o
        }
        function r(n, t, o, e, u, p) {
            return l((i = l(l(t, n), l(e, p))) << (r = u) | i >>> 32 - r, o);
            var i, r
        }
        function g(n, t, o, e, u, p, i) {
            return r(t & o | ~t & e, n, t, u, p, i)
        }
        function a(n, t, o, e, u, p, i) {
            return r(t & e | o & ~e, n, t, u, p, i)
        }
        function s(n, t, o, e, u, p, i) {
            return r(t ^ o ^ e, n, t, u, p, i)
        }
        function v(n, t, o, e, u, p, i) {
            return r(o ^ (t | ~e), n, t, u, p, i)
        }
        function t(n) {
            return function(n) {
                var t, o = "";
                for (t = 0; t < 32 * n.length; t += 8) o += String.fromCharCode(n[t >> 5] >>> t % 32 & 255);
                return o
            } (function(n, t) {
                n[t >> 5] |= 128 << t % 32,
                n[14 + (t + 64 >>> 9 << 4)] = t;
                var o, e, u, p, i, r = 1732584193,
                f = -271733879,
                h = -1732584194,
                c = 271733878;
                for (o = 0; o < n.length; o += 16) r = g(e = r, u = f, p = h, i = c, n[o], 7, -680876936),
                c = g(c, r, f, h, n[o + 1], 12, -389564586),
                h = g(h, c, r, f, n[o + 2], 17, 606105819),
                f = g(f, h, c, r, n[o + 3], 22, -1044525330),
                r = g(r, f, h, c, n[o + 4], 7, -176418897),
                c = g(c, r, f, h, n[o + 5], 12, 1200080426),
                h = g(h, c, r, f, n[o + 6], 17, -1473231341),
                f = g(f, h, c, r, n[o + 7], 22, -45705983),
                r = g(r, f, h, c, n[o + 8], 7, 1770035416),
                c = g(c, r, f, h, n[o + 9], 12, -1958414417),
                h = g(h, c, r, f, n[o + 10], 17, -42063),
                f = g(f, h, c, r, n[o + 11], 22, -1990404162),
                r = g(r, f, h, c, n[o + 12], 7, 1804603682),
                c = g(c, r, f, h, n[o + 13], 12, -40341101),
                h = g(h, c, r, f, n[o + 14], 17, -1502002290),
                r = a(r, f = g(f, h, c, r, n[o + 15], 22, 1236535329), h, c, n[o + 1], 5, -165796510),
                c = a(c, r, f, h, n[o + 6], 9, -1069501632),
                h = a(h, c, r, f, n[o + 11], 14, 643717713),
                f = a(f, h, c, r, n[o], 20, -373897302),
                r = a(r, f, h, c, n[o + 5], 5, -701558691),
                c = a(c, r, f, h, n[o + 10], 9, 38016083),
                h = a(h, c, r, f, n[o + 15], 14, -660478335),
                f = a(f, h, c, r, n[o + 4], 20, -405537848),
                r = a(r, f, h, c, n[o + 9], 5, 568446438),
                c = a(c, r, f, h, n[o + 14], 9, -1019803690),
                h = a(h, c, r, f, n[o + 3], 14, -187363961),
                f = a(f, h, c, r, n[o + 8], 20, 1163531501),
                r = a(r, f, h, c, n[o + 13], 5, -1444681467),
                c = a(c, r, f, h, n[o + 2], 9, -51403784),
                h = a(h, c, r, f, n[o + 7], 14, 1735328473),
                r = s(r, f = a(f, h, c, r, n[o + 12], 20, -1926607734), h, c, n[o + 5], 4, -378558),
                c = s(c, r, f, h, n[o + 8], 11, -2022574463),
                h = s(h, c, r, f, n[o + 11], 16, 1839030562),
                f = s(f, h, c, r, n[o + 14], 23, -35309556),
                r = s(r, f, h, c, n[o + 1], 4, -1530992060),
                c = s(c, r, f, h, n[o + 4], 11, 1272893353),
                h = s(h, c, r, f, n[o + 7], 16, -155497632),
                f = s(f, h, c, r, n[o + 10], 23, -1094730640),
                r = s(r, f, h, c, n[o + 13], 4, 681279174),
                c = s(c, r, f, h, n[o], 11, -358537222),
                h = s(h, c, r, f, n[o + 3], 16, -722521979),
                f = s(f, h, c, r, n[o + 6], 23, 76029189),
                r = s(r, f, h, c, n[o + 9], 4, -640364487),
                c = s(c, r, f, h, n[o + 12], 11, -421815835),
                h = s(h, c, r, f, n[o + 15], 16, 530742520),
                r = v(r, f = s(f, h, c, r, n[o + 2], 23, -995338651), h, c, n[o], 6, -198630844),
                c = v(c, r, f, h, n[o + 7], 10, 1126891415),
                h = v(h, c, r, f, n[o + 14], 15, -1416354905),
                f = v(f, h, c, r, n[o + 5], 21, -57434055),
                r = v(r, f, h, c, n[o + 12], 6, 1700485571),
                c = v(c, r, f, h, n[o + 3], 10, -1894986606),
                h = v(h, c, r, f, n[o + 10], 15, -1051523),
                f = v(f, h, c, r, n[o + 1], 21, -2054922799),
                r = v(r, f, h, c, n[o + 8], 6, 1873313359),
                c = v(c, r, f, h, n[o + 15], 10, -30611744),
                h = v(h, c, r, f, n[o + 6], 15, -1560198380),
                f = v(f, h, c, r, n[o + 13], 21, 1309151649),
                r = v(r, f, h, c, n[o + 4], 6, -145523070),
                c = v(c, r, f, h, n[o + 11], 10, -1120210379),
                h = v(h, c, r, f, n[o + 2], 15, 718787259),
                f = v(f, h, c, r, n[o + 9], 21, -343485551),
                r = l(r, e),
                f = l(f, u),
                h = l(h, p),
                c = l(c, i);
                return [r, f, h, c]
            } (function(n) {
                var t, o = [];
                for (o[(n.length >> 2) - 1] = void 0, t = 0; t < o.length; t += 1) o[t] = 0;
                for (t = 0; t < 8 * n.length; t += 8) o[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32;
                return o
            } (n), 8 * n.length))
        }
        function o(n) {
            return t(unescape(encodeURIComponent(n)))
        }
        return function(n) {
            var t, o, e = "0123456789abcdef",
            u = "";
            for (o = 0; o < n.length; o += 1) t = n.charCodeAt(o),
            u += e.charAt(t >>> 4 & 15) + e.charAt(15 & t);
            return u
        } (o(n))
    },
    function r(f, h, c, l, g) {
        g = g || [[this], [{}]];
        for (var t = [], o = null, n = [function() {
            return ! 0
        },
        function() {},
        function() {
            g.length = c[h++]
        },
        function() {
            g.push(c[h++])
        },
        function() {
            g.pop()
        },
        function() {
            var n = c[h++],
            t = g[g.length - 2 - n];
            g[g.length - 2 - n] = g.pop(),
            g.push(t)
        },
        function() {
            g.push(g[g.length - 1])
        },
        function() {
            g.push([g.pop(), g.pop()].reverse())
        },
        function() {
            g.push([l, g.pop()])
        },
        function() {
            g.push([g.pop()])
        },
        function() {
            var n = g.pop();
            g.push(n[0][n[1]])
        },
        function() {
            g.push(g[g.pop()[0]][0])
        },
        function() {
            var n = g[g.length - 2];
            n[0][n[1]] = g[g.length - 1]
        },
        function() {
            g[g[g.length - 2][0]][0] = g[g.length - 1]
        },
        function() {
            var n = g.pop(),
            t = g.pop();
            g.push([t[0][t[1]], n])
        },
        function() {
            var n = g.pop();
            g.push([g[g.pop()][0], n])
        },
        function() {
            var n = g.pop();
            g.push(delete n[0][n[1]])
        },
        function() {
            var n = [];
            for (var t in g.pop()) n.push(t);
            g.push(n)
        },
        function() {
            g[g.length - 1].length ? g.push(g[g.length - 1].shift(), !0) : g.push(void 0, !1)
        },
        function() {
            var n = g[g.length - 2],
            t = Object.getOwnPropertyDescriptor(n[0], n[1]) || {
                configurable: !0,
                enumerable: !0
            };
            t.get = g[g.length - 1],
            Object.defineProperty(n[0], n[1], t)
        },
        function() {
            var n = g[g.length - 2],
            t = Object.getOwnPropertyDescriptor(n[0], n[1]) || {
                configurable: !0,
                enumerable: !0
            };
            t.set = g[g.length - 1],
            Object.defineProperty(n[0], n[1], t)
        },
        function() {
            h = c[h++]
        },
        function() {
            var n = c[h++];
            g[g.length - 1] && (h = n)
        },
        function() {
            throw g[g.length - 1]
        },
        function() {
            var n = c[h++],
            t = n ? g.slice( - n) : [];
            g.length -= n,
            g.push(g.pop().apply(l, t))
        },
        function() {
            var n = c[h++],
            t = n ? g.slice( - n) : [];
            g.length -= n;
            var o = g.pop();
            g.push(o[0][o[1]].apply(o[0], t))
        },
        function() {
            var n = c[h++],
            t = n ? g.slice( - n) : [];
            g.length -= n,
            t.unshift(null),
            g.push(new(Function.prototype.bind.apply(g.pop(), t)))
        },
        function() {
            var n = c[h++],
            t = n ? g.slice( - n) : [];
            g.length -= n,
            t.unshift(null);
            var o = g.pop();
            g.push(new(Function.prototype.bind.apply(o[0][o[1]], t)))
        },
        function() {
            g.push(!g.pop())
        },
        function() {
            g.push(~g.pop())
        },
        function() {
            g.push(typeof g.pop())
        },
        function() {
            g[g.length - 2] = g[g.length - 2] == g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] === g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] > g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] >= g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] << g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] >> g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] >>> g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] + g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] - g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] * g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] / g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] % g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] | g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] & g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] ^ g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] in g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] instanceof g.pop()
        },
        function() {
            g[g[g.length - 1][0]] = void 0 === g[g[g.length - 1][0]] ? [] : g[g[g.length - 1][0]]
        },
        function() {
            for (var e = c[h++], u = [], n = c[h++], t = c[h++], p = [], o = 0; o < n; o++) u[c[h++]] = g[c[h++]];
            for (var i = 0; i < t; i++) p[i] = c[h++];
            g.push(function n() {
                var t = u.slice(0);
                t[0] = [this],
                t[1] = [arguments],
                t[2] = [n];
                for (var o = 0; o < p.length && o < arguments.length; o++) 0 < p[o] && (t[p[o]] = [arguments[o]]);
                return r(f, e, c, l, t)
            })
        },
        function() {
            t.push([c[h++], g.length, c[h++]])
        },
        function() {
            t.pop()
        },
        function() {
            return !! o
        },
        function() {
            o = null
        },
        function() {
            g[g.length - 1] += String.fromCharCode(c[h++])
        },
        function() {
            g.push("")
        },
        function() {
            g.push(void 0)
        },
        function() {
            g.push(null)
        },
        function() {
            g.push(!0)
        },
        function() {
            g.push(!1)
        },
        function() {
            g.length -= c[h++]
        },
        function() {
            g[g.length - 1] = c[h++]
        },
        function() {
            var n = g.pop(),
            t = g[g.length - 1];
            t[0][t[1]] = g[n[0]][0]
        },
        function() {
            var n = g.pop(),
            t = g[g.length - 1];
            t[0][t[1]] = n[0][n[1]]
        },
        function() {
            var n = g.pop(),
            t = g[g.length - 1];
            g[t[0]][0] = g[n[0]][0]
        },
        function() {
            var n = g.pop(),
            t = g[g.length - 1];
            g[t[0]][0] = n[0][n[1]]
        },
        function() {
            g[g.length - 2] = g[g.length - 2] < g.pop()
        },
        function() {
            g[g.length - 2] = g[g.length - 2] <= g.pop()
        }];;) try {
            for (; ! n[c[h++]](););
            if (o) throw o;
            return g.pop()
        } catch(n) {
            var e = t.pop();
            if (void 0 === e) throw n;
            o = n,
            h = e[0],
            g.length = e[1],
            e[2] && (g[e[2]][0] = o)
        }
    } (120731, 0, [21, 34, 50, 100, 57, 50, 102, 50, 98, 99, 101, 52, 54, 97, 52, 99, 55, 56, 52, 49, 57, 54, 57, 49, 56, 98, 102, 100, 100, 48, 48, 55, 55, 102, 2, 10, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 61, 8, 9, 48, 61, 9, 9, 48, 4, 21, 427, 54, 2, 15, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 61, 8, 9, 48, 61, 9, 9, 48, 61, 10, 9, 48, 61, 11, 9, 48, 61, 12, 9, 48, 61, 13, 9, 48, 61, 14, 9, 48, 61, 10, 9, 55, 54, 97, 54, 98, 54, 99, 54, 100, 54, 101, 54, 102, 54, 103, 54, 104, 54, 105, 54, 106, 54, 107, 54, 108, 54, 109, 54, 110, 54, 111, 54, 112, 54, 113, 54, 114, 54, 115, 54, 116, 54, 117, 54, 118, 54, 119, 54, 120, 54, 121, 54, 122, 54, 48, 54, 49, 54, 50, 54, 51, 54, 52, 54, 53, 54, 54, 54, 55, 54, 56, 54, 57, 13, 4, 61, 11, 9, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 102, 54, 108, 54, 111, 54, 111, 54, 114, 14, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 114, 54, 97, 54, 110, 54, 100, 54, 111, 54, 109, 14, 25, 0, 3, 4, 9, 11, 3, 3, 9, 11, 39, 3, 1, 38, 40, 3, 3, 9, 11, 38, 25, 1, 13, 4, 61, 12, 9, 55, 13, 4, 61, 13, 9, 3, 0, 13, 4, 4, 3, 13, 9, 11, 3, 11, 9, 11, 66, 22, 306, 4, 21, 422, 24, 4, 3, 14, 9, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 102, 54, 108, 54, 111, 54, 111, 54, 114, 14, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 114, 54, 97, 54, 110, 54, 100, 54, 111, 54, 109, 14, 25, 0, 3, 10, 9, 55, 54, 108, 54, 101, 54, 110, 54, 103, 54, 116, 54, 104, 15, 10, 40, 25, 1, 13, 4, 61, 12, 9, 6, 11, 3, 10, 9, 3, 14, 9, 11, 15, 10, 38, 13, 4, 61, 13, 9, 6, 11, 6, 5, 1, 5, 0, 3, 1, 38, 13, 4, 61, 0, 5, 0, 43, 4, 21, 291, 61, 3, 12, 9, 11, 0, 3, 9, 9, 49, 72, 0, 2, 3, 4, 13, 4, 61, 8, 9, 21, 721, 3, 2, 8, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 4, 55, 54, 115, 54, 101, 54, 108, 54, 102, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 510, 4, 21, 523, 22, 4, 55, 54, 115, 54, 101, 54, 108, 54, 102, 8, 10, 0, 55, 54, 119, 54, 105, 54, 110, 54, 100, 54, 111, 54, 119, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 566, 4, 21, 583, 3, 4, 55, 54, 119, 54, 105, 54, 110, 54, 100, 54, 111, 54, 119, 8, 10, 0, 55, 54, 103, 54, 108, 54, 111, 54, 98, 54, 97, 54, 108, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 626, 4, 21, 643, 25, 4, 55, 54, 103, 54, 108, 54, 111, 54, 98, 54, 97, 54, 108, 8, 10, 0, 55, 54, 69, 54, 114, 54, 114, 54, 111, 54, 114, 8, 55, 54, 117, 54, 110, 54, 97, 54, 98, 54, 108, 54, 101, 54, 32, 54, 116, 54, 111, 54, 32, 54, 108, 54, 111, 54, 99, 54, 97, 54, 116, 54, 101, 54, 32, 54, 103, 54, 108, 54, 111, 54, 98, 54, 97, 54, 108, 54, 32, 54, 111, 54, 98, 54, 106, 54, 101, 54, 99, 54, 116, 27, 1, 23, 56, 0, 49, 444, 0, 0, 24, 0, 13, 4, 61, 8, 9, 55, 54, 95, 54, 95, 54, 103, 54, 101, 54, 116, 54, 83, 54, 101, 54, 99, 54, 117, 54, 114, 54, 105, 54, 116, 54, 121, 54, 83, 54, 105, 54, 103, 54, 110, 15, 21, 1126, 49, 2, 14, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 61, 8, 9, 48, 61, 9, 9, 48, 61, 10, 9, 48, 61, 11, 9, 48, 61, 9, 9, 55, 54, 108, 54, 111, 54, 99, 54, 97, 54, 116, 54, 105, 54, 111, 54, 110, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 862, 21, 932, 21, 4, 55, 54, 108, 54, 111, 54, 99, 54, 97, 54, 116, 54, 105, 54, 111, 54, 110, 8, 55, 54, 104, 54, 111, 54, 115, 54, 116, 14, 55, 54, 105, 54, 110, 54, 100, 54, 101, 54, 120, 54, 79, 54, 102, 14, 55, 54, 121, 54, 46, 54, 113, 54, 113, 54, 46, 54, 99, 54, 111, 54, 109, 25, 1, 3, 0, 3, 1, 39, 32, 22, 963, 4, 55, 54, 67, 54, 74, 54, 66, 54, 80, 54, 65, 54, 67, 54, 114, 54, 82, 54, 117, 54, 78, 54, 121, 54, 55, 21, 974, 50, 4, 3, 12, 9, 11, 3, 8, 3, 10, 24, 2, 13, 4, 61, 10, 9, 3, 13, 9, 55, 54, 95, 54, 95, 54, 115, 54, 105, 54, 103, 54, 110, 54, 95, 54, 104, 54, 97, 54, 115, 54, 104, 54, 95, 54, 50, 54, 48, 54, 50, 54, 48, 54, 48, 54, 51, 54, 48, 54, 53, 15, 10, 22, 1030, 21, 1087, 22, 4, 3, 13, 9, 55, 54, 95, 54, 95, 54, 115, 54, 105, 54, 103, 54, 110, 54, 95, 54, 104, 54, 97, 54, 115, 54, 104, 54, 95, 54, 50, 54, 48, 54, 50, 54, 48, 54, 48, 54, 51, 54, 48, 54, 53, 15, 3, 9, 9, 11, 3, 3, 9, 11, 38, 25, 1, 13, 4, 61, 11, 9, 3, 12, 9, 11, 3, 10, 3, 53, 3, 37, 39, 24, 2, 13, 4, 4, 55, 54, 122, 54, 122, 54, 97, 3, 11, 9, 11, 38, 3, 10, 9, 11, 38, 0, 49, 771, 2, 1, 12, 9, 13, 8, 3, 12, 4, 4, 56, 0], n);
    var t = n.__getSecuritySign;
    sign = t;
    return t;
});

function get_sign(data){
    return sign(data)
};