吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1828|回复: 30
收起左侧

[Python 原创] python同花顺i问财处理及获取hexin-v值

[复制链接]
machuhai 发表于 2024-9-14 11:16
本帖最后由 machuhai 于 2024-9-14 11:19 编辑

这是自用的程序,如有不妥请联系我删除
GUI界面是用吾爱大神wxpython可视化编辑器写的,简直爱不释手。
使用程序要先获取cookie,看图
局部截取_20240914_101049.png
问财与程序功能对应
局部截取_20240914_094751.png
局部截取_20240914_111851.png
局部截取_20240914_100601.png
python源码,需要第三方库
wx库
pip install wxPython
requests库
pip install requests
execjs库
pip install pyexecjs
[Python] 纯文本查看 复制代码
# -*- coding:utf-8 -*-
import wx
import json
import requests,re
import execjs
class Frame(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, title='i问财', size=(805, 662),name='frame',style=wx.DEFAULT_FRAME_STYLE^wx.MAXIMIZE_BOX)
        self.启动窗口 = wx.Panel(self)
        self.Centre()
        self.combo = wx.ComboBox(self.启动窗口, size=(300, 200), pos=(130, 200))
        # 绑定事件
        self.combo.Bind(wx.EVT_COMBOBOX, self.on_select)
        self.combo2 = wx.ComboBox(self.启动窗口, size=(150, 100), pos=(93, 347))
        self.combo3 = wx.ComboBox(self.启动窗口, size=(150, 100), pos=(93, 385))


        self.编辑框1 = wx.TextCtrl(self.启动窗口,size=(400, 106),pos=(29, 44),value='',name='text',style=wx.TE_MULTILINE)
        self.编辑框2 = wx.TextCtrl(self.启动窗口, size=(332, 563), pos=(442, 44), value='', name='text',style=wx.TE_MULTILINE | wx.TE_WORDWRAP)
        self.编辑框3 = wx.TextCtrl(self.启动窗口, size=(402, 86), pos=(27, 239), value='', name='text',style=wx.TE_MULTILINE)
        self.编辑框4 = wx.TextCtrl(self.启动窗口, size=(403, 104), pos=(26, 502), value='', name='text', style=wx.TE_MULTILINE)

        self.标签1 = wx.StaticText(self.启动窗口,size=(113, 33),pos=(29, 4),label='cookie:',name='staticText',style=2321)
        标签1_字体 = wx.Font(20,74,90,400,False,'Microsoft YaHei UI',28)
        self.标签1.SetFont(标签1_字体)
        self.标签2 = wx.StaticText(self.启动窗口, size=(113, 26), pos=(6, 212), label='搜索:', name='staticText',style=2321)
        标签2_字体 = wx.Font(16, 74, 90, 400, False, 'Microsoft YaHei UI', 28)
        self.标签2.SetFont(标签2_字体)
        self.标签3 = wx.StaticText(self.启动窗口, size=(77, 23), pos=(14, 351), label='保存到板块:', name='staticText',style=2321)
        self.标签4 = wx.StaticText(self.启动窗口, size=(62, 22), pos=(23, 390), label='搜索板块:', name='staticText',style=2321)
        self.标签5 = wx.StaticText(self.启动窗口, size=(115, 26), pos=(437, 13), label='返回结果:', name='staticText',style=2321)
        标签5_字体 = wx.Font(14, 74, 90, 400, False, 'Microsoft YaHei UI', 28)
        self.标签5.SetFont(标签5_字体)


        self.多选框1 = wx.CheckBox(self.启动窗口,size=(74, 26),pos=(150, 13),name='check',label='保存',style=16384)
        self.多选框1.SetValue(True)
        多选框1_字体 = wx.Font(12,74,90,400,False,'Microsoft YaHei UI',28)
        self.多选框1.SetFont(多选框1_字体)
        self.多选框1.Bind(wx.EVT_CHECKBOX, self.coobao)

        self.按钮1 = wx.Button(self.启动窗口,size=(95, 39),pos=(10, 436),label='保存到自选',name='button')
        self.Bind(wx.EVT_BUTTON, self.baozixuan1, self.按钮1)
        按钮1_字体 = wx.Font(12,74,90,400,False,'Microsoft YaHei UI',28)
        self.按钮1.SetFont(按钮1_字体)
        self.按钮1.SetForegroundColour((255, 0, 0, 255))
        self.按钮1.SetOwnBackgroundColour((255, 255, 128, 255))
        self.按钮2 = wx.Button(self.启动窗口,size=(95, 39),pos=(120, 436),label='保存到板块',name='button')
        按钮2_字体 = wx.Font(12,74,90,400,False,'Microsoft YaHei UI',28)
        self.按钮2.SetFont(按钮2_字体)
        self.按钮2.SetForegroundColour((0, 128, 255, 255))
        self.按钮2.SetOwnBackgroundColour((255, 128, 0, 255))
        self.Bind(wx.EVT_BUTTON, self.baobankuai1, self.按钮2)

        self.按钮3 = wx.Button(self.启动窗口,size=(95, 39),pos=(230, 436),label='搜索板块',name='button')
        self.Bind(wx.EVT_BUTTON, self.sousuobankuai, self.按钮3)
        按钮3_字体 = wx.Font(12,74,90,400,False,'Microsoft YaHei UI',28)
        self.按钮3.SetFont(按钮3_字体)
        self.按钮4 = wx.Button(self.启动窗口,size=(95, 39),pos=(340, 436),label='搜索',name='button')
        按钮4_字体 = wx.Font(14,74,90,400,False,'Microsoft YaHei UI',28)
        self.Bind(wx.EVT_BUTTON, self.sousuo1, self.按钮4)
        self.按钮4.SetFont(按钮4_字体)
        self.按钮4.SetForegroundColour((255, 0, 255, 255))
        self.按钮4.SetOwnBackgroundColour((0, 255, 128, 255))

        self.按钮5 = wx.Button(self.启动窗口, size=(80, 35), pos=(350, 160), label='删除记录', name='button')
        按钮5_字体 = wx.Font(12, 74, 90, 400, False, 'Microsoft YaHei UI', 28)
        self.按钮5.SetFont(按钮5_字体)
        self.Bind(wx.EVT_BUTTON, self.删除历史记录, self.按钮5)

        self.按钮6 = wx.Button(self.启动窗口, size=(95, 60), pos=(260, 350), label='获取板块', name='button')
        self.Bind(wx.EVT_BUTTON, self.huoqubankuai, self.按钮6)
        按钮6_字体 = wx.Font(12, 74, 90, 400, False, 'Microsoft YaHei UI', 36)
        self.按钮6.SetFont(按钮6_字体)

        self.lujing = 'lishijilu.txt'
        self.coodu()
        self.读取历史记录()


    def hexin(self):
        #获取hexin-v
        with open("wen.js", "r", encoding="utf-8") as f:
            js = f.read()
        JS = execjs.compile(js)  # 读取时间拼接进入js代码中
        hexin = JS.call("rt.update")
        return hexin


    def on_select(self, event):
        # 获取选中的值
        selected = self.combo.GetValue().rstrip('\n')
        self.编辑框3.SetValue(selected)


    def cook(self):
        #处理hexin-v
        try:
            hexin = self.hexin()
            cook = re.search('(.*)v=', self.编辑框1.GetValue()).group(1)
            coo = f"{cook}v={hexin}"
            self.编辑框1.SetValue(f"{coo}")
            return hexin
        except:
            self.编辑框2.AppendText("无cookie数据!!\n")


    def pachong(self,url,**kwargs):
        #post框架
        hexin = self.cook()
        data = kwargs
        headers = {
            'cookie': self.编辑框1.GetValue(),
            'hexin-v': hexin,
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0'
        }
        r = requests.request(method='POST', url=url, json=data, headers=headers,timeout=30)
        r.encoding = 'utf8'
        rr = r.text
        return rr


    def huoqubankuai(self, event):
        #获取板块按钮的函数
        url = 'https://www.iwencai.com/unifiedwap/self-stock/plate/list'
        rr = self.pachong(url,stocks=0,ths=0)
        json_data = json.loads(rr)
        self.my_dict = {}
        if json_data['success'] == True:
            for row in json_data['data']:
                self.my_dict[row['ln']] = row['sn']
                if self.combo2.GetValue() or self.combo3.GetValue():
                    pass
                else:
                    self.combo2.Append(row['ln'])
                    self.combo3.Append(row['ln'])
                    self.编辑框2.AppendText(f"{row['ln']},板块加载完成!!\n")
            self.combo2.SetValue(json_data['data'][0]['ln'])
            self.combo3.SetValue(json_data['data'][0]['ln'])
        else:
            pass


    def sousuo1(self,event,block_list=None):
        #搜索按钮的函数
        self.保存历史记录()
        self.coobao(event)
        url = "https://www.iwencai.com/customized/chart/get-robot-data"
        add_info = "{\"urp\":{\"scene\":1,\"company\":1,\"business\":1},\"contentType\":\"json\",\"searchInfo\":true}"
        log_info = "{\"input_type\":\"typewrite\"}"
        page = 1
        perpage = 100
        question = self.编辑框3.GetValue()
        secondary_intent = 'stock'
        source = 'Ths_iwencai_Xuangu'
        version = '2.0'
        rr = self.pachong(url,add_info=add_info,log_info=log_info,page=page,perpage=perpage,question=question,secondary_intent=secondary_intent,source=source,version=version,block_list=block_list,query_area=None)
        try:
            json_data = json.loads(rr)
            aa = json_data['data']['answer'][0]['txt'][0]['content']['components'][0]['data']['datas']
            self.co = ''
            self.计数 = 0
            for row in aa:
                self.chuli(row)
            self.编辑框2.AppendText(f"数量:{self.计数}\n")
            self.编辑框4.SetValue(f"{self.co}")
            ii = 1
            for i in range(20):
                ii += 1
                hexin = self.cook()
                iii = self.page(self.编辑框1.GetValue(),hexin,ii)
                if iii == 1:
                    self.编辑框2.AppendText(f"总数{ii-1}页,全部加载完成!!\n")
                    break
        except:
            self.编辑框2.AppendText("搜索无数据!!\n")

    def chuli(self,row):
        #处理数据
        #只选择0.3.6开头的其他过滤掉
        if row['code'][0] == '0' or row['code'][0] == '3':
            self.编辑框2.AppendText(f"{row['股票简称']} {row['code']}\n")
            self.co += f"{row['code']}_33|"
            self.计数 += 1
        if row['code'][0] == '6':
            if row['code'][0:3] == '688':#这是过滤688开头的
                pass
            else:
                self.编辑框2.AppendText(f"{row['股票简称']} {row['code']}\n")
                self.co += f"{row['code']}_17|"
                self.计数 += 1


    def page(self,cookie,hexin,ii):
        #处理分页
        url = 'http://www.iwencai.com/gateway/urp/v7/landing/getDataList'

        data = {'perpage': 100, 'page': ii, 'source': 'Ths_iwencai_Xuangu',
                'query': self.编辑框3.GetValue(), 'urp_sort_way': 'asc',
                'comp_id': 6836372, 'uuid': 24087}
        headers = {
            'cookie': cookie,
            'hexin-v': hexin,
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0'
        }
        r = requests.request(method='POST', url=url, data=data, headers=headers, timeout=30)
        # r.encoding = 'unicode_escape'
        rr = r.text
        json_data = json.loads(rr)
        if json_data['answer']['components'][0]['data']['datas'] == []:
            return 1
        else:
            for row in json_data['answer']['components'][0]['data']['datas']:
                self.chuli(row)
            self.编辑框2.AppendText(f"第{ii}页加载成功!!\n")
            self.编辑框2.AppendText(f"数量:{self.计数}\n")
            self.编辑框4.SetValue(f"{self.co}")



    def block(self):
        #需要搜索的板块
        selected = self.combo3.GetValue()
        return self.my_dict[selected],selected


    def snn(self):
        #需要保存到的板块
        selected = self.combo2.GetValue()
        return self.my_dict[selected],selected

    def sousuobankuai(self, event):
        #搜索板块按钮的函数
        try:
            block,lu = self.block()
            url = "https://www.iwencai.com/customized/chart/get-robot-data"
            add_info = "{\"urp\":{\"scene\":1,\"company\":1,\"business\":1},\"contentType\":\"json\",\"searchInfo\":true}"
            log_info = "{\"input_type\":\"typewrite\"}"
            page = 1
            perpage = 200
            question = self.编辑框3.GetValue()
            secondary_intent = 'stock'
            source = 'Ths_iwencai_Xuangu'
            version = '2.0'
            rr = self.pachong(url, add_info=add_info, log_info=log_info, page=page, perpage=perpage, question=question,
                              secondary_intent=secondary_intent, source=source, version=version, block_list=block,
                              query_area=None)

            json_data = json.loads(rr)
            aa = json_data['data']['answer'][0]['txt'][0]['content']['components'][0]['data']['datas']
            self.co = ''
            self.计数 = 0
            for row in aa:
                self.chuli(row)

            self.编辑框2.AppendText(f"数量:{self.计数}\n")
            self.编辑框4.SetValue(f"{self.co}")
        except:
            self.编辑框2.AppendText("搜索无数据!!\n")



    def baobankuai1(self,event):
        #保存到板块按钮的函数
        try:
            sn,lu = self.snn()
            url = "https://www.iwencai.com/iwencai/userinfo/iwc/userinfo/self-stock/plate/add"
            codes = self.编辑框4.GetValue()
            type = 2

            rr = self.pachong(url,sn=sn,codes=codes,type=type)
            json_data = json.loads(rr)
            rr = json_data
            shu = rr['result']['addedNum']
            if rr['status_msg'] == 'OK':
                self.编辑框2.AppendText(f"数量:{shu},保存至【{lu}】板块成功!!\n")
        except:
            self.编辑框2.SetValue("无数据!!\n")


    def baozixuan1(self,event):
        #保存自选按钮的函数
        try:
            url = "https://www.iwencai.com/iwencai/userinfo/iwc/userinfo/self-stock/index/add"
            codes = self.编辑框4.GetValue()
            type = 2
            r = self.pachong(url,codes=codes,type=type)
            json_data = json.loads(r)
            rr = json_data
            shu = rr['result']['addedNum']
            if rr['status_msg'] == 'OK':
                self.编辑框2.AppendText(f"数量:{shu},保存至自选成功!!\n")
        except:
            self.编辑框2.SetValue("无数据!!\n")



    def coobao(self,event):
        #保存cookie
        try:
            if self.多选框1.GetValue() == True:
                with open('cookie.txt', 'w', encoding='utf-8') as f:
                    f.write(self.编辑框1.GetValue())
        except:
            pass

    def coodu(self):
        #读取cookie
        try:
            with open('cookie.txt', 'r', encoding='utf-8') as f:
                text = f.read()
            self.编辑框1.SetValue(f"{text}")
        except:
            pass


    def 读取历史记录(self):
        #读取搜索历史记录
        try:
            with open(self.lujing, 'r') as file:
                # 逐行读取
                for line in file:
                    if line != '':
                        self.combo.Append(line)
        except:
            pass


    def 保存历史记录(self):
        # 保存搜索历史记录
        sdd = self.编辑框3.GetValue().rstrip('\n')
        with open(self.lujing, 'a') as f:
            f.write(f"{sdd}\n")
        self.combo.Append(self.编辑框3.GetValue())


    def 删除历史记录(self,event):
        #删除搜索记录按钮的函数
        with open(self.lujing, 'r') as file:
            lines = file.readlines()

        with open(self.lujing, 'w') as file:
            for i, line in enumerate(lines, 1):
                if line != self.combo.GetValue():
                    if line != '':
                        file.write(line)
        self.combo.Delete(self.combo.GetSelection())



class myApp(wx.App):
    def  OnInit(self):
        self.frame = Frame()
        self.frame.Show(True)
        return True

if __name__ == '__main__':
    app = myApp()
    app.MainLoop()


下面是获取hexin-v值js代码,文件保存为wen.js,不能改别的名字
[JavaScript] 纯文本查看 复制代码
var TOKEN_SERVER_TIME = 0
var document = {}
var window = {}
second = [1, "", 0, "he", "ad", 29, "\x180G\x1f", "?>=<;:\\\\/,+", "ng", "to", "ff", Number, Error, "11", "6", "er", "ro", "code", "co", "_?L", "ed", "@S\x15D*", Object, "len", "gth", "on", "lo", RegExp, "ySta", 13, "eel", "ee", "ouse", "ll", "\u2544\u2530\u2555\u2531", "FCm-", "isTru", "getC", "Pos", "ve", "or", "ae", "^", "On", "Sho", "can", "ont", "roid", "anguage", "\u2502", "ta", "tna", Date, "3", "am", "e", "n+", "f80", "\x1dD", 6, "\u255f\u253a\u2542\u252b\u2545\u2568\u251e", "KCABLLAC_NOELEMAHC", "X-Antispider-Message", 3, ".baidu.", Function, document, !0, "cookie", "; ", "=", 96, "\u255b\u253e\u2550\u2537\u2543\u252b", "\u250c\u252c\u255c\u253d\u2549\u2521\u251c", ";O", "; expires=", "getCookie", "Thu, 01 Jan 1970 00:00:00 GMT", "setCookie", "Z\x18|", "i", "\u255b\u2534\u2557\u2536\u255a\u2509\u257d\u2512\u2560\u2501\u2566\u2503", 52, window, 10, "Init", !1, "set", "v", "eliflmth", '<script>document.w=window<\/script><iframe src="/favicon.icon"></iframe>', "iS.p", "head", "#default#userData", "get", "[!\"#$%&'()*", "g", "^d", "$D", "\u2568\u2537\u2568\u254c\u256a", "]\\P", "___", "le", "th", "prototype", "base_f", 8, "\\R5Z\\R\x14@^Q3G", "ZV%PgQ?Y]S%", 67, "r", "length", "0", 16, "12", "\u2576\u095f\u0979\u09d5\u0995\u091b\u09a9\u09f9\u09bd\u09f7\u0989\u09fd\u09f5\u09f3\u09f9\u0a41\u0a4d\u098f\u0999\u0905\u0975\u09cb\u09a9\u09a9\u099d\u0927\u0933\u0913\u0a6b\u0999\u09a3\u0937\u098b\u09f5\u0933\u0a7b\u091b\u09b1\u0a63\u095f\u09fb\u094d\u0993\u0943\u092b\u0949\u09a3\u09e7\u09cb\u0925\u0993\u09ab\u09f0\u092c\u092c\u0942\u0950\u09c8\u0944\u09c6\u0990\u0944\u09cb\u098e", "i,", "\u2505\u092f", 12, 56, "20", "1000", 2, 5, "11111111", "encode", "\u255b\u0972\u0959", "\u2519", "s", "WY$PYS", "ystate", "1111101000", / /g, ",", "\u250d", '^".*"$', "edoc_sutats", "status_code", "location", "redirect_url", "href", "4294967295", "j", "1200000", "script", "src", "onreadystatechange", "read", "loaded", "readyState", "complete", "interactive", "onload", "undefined", "\\.com\\.cn$|\\.com\\.hk$", ".", "getServerTime", 'YY7YAD?FjD"', "strhash", "random", "getRootDomain", "booleanToDecimal", "timeNow", "\u2559\u253e", "eventBind", "onwh", "\u255b", 46, "DOMM", "cl", "T^5^", "div", "onmousewheel", "mousewheel", 51, "keydown", "clientY", "getKeyDown", "ch", "plu", "\u2543\u252b", "ouc", "art", "^i", "Po", "callPhantom", "max", "Hei", "ActiveXObject", "nd", "yG&Y]\x17\x15ZUG#A]Ez\x15qY5\x1b", "\u2576\u097e\u094e\u09f8\u09a6\u0938\u09b6\u09fe\u0996\u09d7\u09a7\u09d2\u09cc", "Maxthon", "Q", "opr", "chrome", "BIDUBrowser", "QQBro", "[_$ZUR", "UBrowser", "MSGesture", "plugins", "doNotTrack", "ShockwaveFlash.ShockwaveFlash", "]C|\x18", "webgl2", "platform", "name", "^Win32", "^MacIntel", "^Linux [ix]\\d+", "^BlackBerry", "language", "getPlatform", "getBrowserIndex", "1", "10", 4, 9, "1100", "\t\0", "3c", 256, "w", "TTP", "et", "c", "al", "\u255e", "base", "\u2569\u0975\u094e\u09e5\u09a0\u092e\u09d1\u09ed\u09ce", "target", "fh%PTQr", "#", "\u255f\u097c\u0949\u09f9", 97, "rg", "tnemelEcrs", "fn_Ws", "parentNode", "tagName", "A", "submit", "PX%", "me", "host", "\\.?", "d\x19", "Fri, 01 Feb 2050 00:00:00 GMT", "]E%", "toString", "[object Request]", "headers", 83, "&", encodeURIComponent, "open", "getAllResponseHeaders", "4", "tseuqeRpttHLMX", "Window", "\u2564\u095e", "RI", "\u2550\u0953", "(YaZ", "_", "_str", "V587"]
first = ["", 9527, String, Boolean, "eh", "ad", "Bu", "ileds", "1", "\b", Array, "7", "base", "64De", "\u2543\u252b", "etatS", "pa", "e", "FromUrl", "getOrigi", "nFromUrl", "\u255b\u253e", "b?\x18q)", "ic", "k", "sted", "he", "wser", "oNo", "ckw", "ent", "hst", "^And", "RM", "systemL", 5, "\u255f\u0978\u095b\u09f5", "TR8", "!'", "gth", "er", "TP", 83, "r", !0, "v", "v-nixeh", RegExp, "thsi.cn", 'K\x19"]K^xVV', "KXxAPD?\x1b[Y", document, 0, "allow", 1, "; ", "length", "Init", "=", "; domain=", "checkcookie", !1, "eikooCled", "tnemucod", "d", window, "\u2553\u0972\u0959\u09e4\u09bd\u0938\u0980\u09c5\u09b1\u09d1\u09a7\u09dc\u09dd\u09d3\u09c2", "\u2556\u0979\u095e\u09d3\u09b5\u0935\u098f\u09c7\u099d\u09d2\u09b0", 23, "l$P$~", "frames", "ducument", "ydob", "documentElement", "del", "@[\\]^`{|}~]", "base_fileds", "255", 10, "10", 39, "\u2547\u2535\u255a\u252e\u2541\u2535\u254c\u253c\u2559", 8, "4", "3", "de", 3, "11", 2, "203", "22", "111111", "3f", 16, "\x0f", "\u2506\u2537\u2507\u2537", "11111111", "base64Encode", "v\x1d", "ati", "WY", "te", "bo", "rs", "getHost", Date, "{DF", ":", "^{.*}$", "WU<P[C", 52, "1001", "href", "1111101010", "redirect_url", "^\\s*(?:https?:)?\\/{2,}([^\\/\\?\\#\\\\]+)", "i", "\u256c\u252c\u2516\u254b", "@", "ready", "change", "dy", 7, "protocol", "//s.thsi.cn/js/chameleon/time.1", "onerror", "2000", "readyState", null, "^(\\d+\\.)+\\d+$", "^\\s*(?:(https?:))?\\/{2,}([^\\/\\?\\#\\\\]+)", ".", "strToBytes", "isIPAddr", "serverTimeNow", "addEventListener", "th", "wh", "Scro", "mousemove", 55, "evomhcuot", "[[?PVC\x0e", "getMouseMove", '_R"xWB%Po_3YT', "getMouseClick", "ght", "gin", "msD", "ack", "\u2556\u096b\u095f", "Nativ", "^A", "MozSettingsEvent", "safari", "ActiveXObject", "postMessage", "Uint8Array", "WeakMap", "Google Inc.", "vendor", "chrome", "python", "sgAppName", "JX", 6, "me", "LBBROWSER", "w4", "2345Explorer", "TheWorld", "\u2544", 40, "tTr", "\u2506", "navigator", "webdriver", "languages", "taborcA|FDP", "\u2541\u097c\u0949", 95, "1e0", "e Cli", "iso-8859-1", "defaultCharset", "localStorage", "^Win64", "^Linux armv|Android", "^iPhone", "^iPad", "B_{VV", "getPluginNum", "getBrowserFeature", "12", "16", "sE", "10000", "17", "\u2542\u2532\u2556\u2537\u2543\u2526", "\x1cx`R", 2333, "XMLH", "ers", "0", "lo", 57, "ylppa", "error", "target", "click", "unload", "HE9AWT9Y", "\\.", "c?", "$", "/", "fetch", "prototype", "url", "\u2556\u0971\u0956\u09fe\u09a7", "headers", "\u256b\u2554", 79, "?", "^(.*?):[ \\t]*([^\\r\\n]*)\\r?$", "gm", "s", "src", "analysisRst", "\u255e\u0973\u0949\u09f4\u09a2\u0929\u09ac\u09d4\u0992\u09d2\u09b0\u09d4", "appendChild", "Y", "jsonp_ignore", "^", 70, "421", "XH>a", "\u2574\u253c\u257d\u2530\u2575\u2539\u257c\u2533\u257d\u2522\u256e\u2521\u2560\u2524\u2561\u2525", "CHAMELEON_LOADED"]

var r, e, a , n;
        r = e = a = n = first;
        var u, c, s , t;
        u = c = s = t = second;

function serverTimeNow(){
    return parseInt(TOKEN_SERVER_TIME);
}



function v() {
    var n = arguments[s[0]];
    if (!n)
        return r[0];
    for (var t = u[1], o = a[1], i = c[2]; i < n.length; i++) {
        var v = n.charCodeAt(i)
          , f = v ^ o;
        o = v,
        t += e[2].fromCharCode(f)
    }
    return t
}

function ot() {
    var n, t, e , c;
    n = t = e = c = second;
    var a, o, i , r;
    a = o = i = r = first;
    var u = arguments[a[52]];
    if (!u)
        return o[0];
    for (var s = a[0], v = n[267], f = o[200], l = t[2]; l < u.length; l++) {
        var p = u.charCodeAt(l);
        f = (f + t[0]) % v.length,
        p ^= v.charCodeAt(f),
        s += i[2].fromCharCode(p)
    }
    return s
}




var qn = function() {
    var n, t, r , a;
    n = t = r = a = first;
    var e, o, i , s;
    e = o = i = s = second;
    var u = o[15]
      , c = o[102]
      , f = e[103];
    function l(r) {
        var a = o[102]
          , i = e[103];
        this[n[76]] = r;
        for (var u = t[52], c = r["length"]; u < c; u++)
            this[u] = t[52]
    }
    l.prototype.toBuffer = function() {
        for (var a = "base_f", u = this["base_fileds"], c = [], s = -e[0], v = o[2], f = u[r[56]]; v < f; v++)
            for (var l = this[v], p = u[v], d = s += p; c[d] = l & parseInt(t[77], n[78]),
            --p != r[52]; )
                --d,
                l >>= parseInt(n[79], i[106]);
        return c
    };

    l.prototype.decodeBuffer = function(n) {
        for (var r = e[8], a = this[ot(e[108], e[109])], o = t[52], u = e[2], s = a[c + r + f]; u < s; u++) {
            var v = a[u]
              , l = i[2];
            do {
                l = (l << t[82]) + n[o++]
            } while (--v > t[52]);
            this[u] = l >>> i[2]
        }
    };

    return l;
}()

        function at() {
            var n, t, r;
            n = t = r = u;
            var a, o, i;
            a = o = i = e;
            var c = arguments[o[52]];
            if (!c)
                return t[1];
            for (var s = o[0], v = o[1], f = a[52]; f < c.length; f++) {
                var l = c.charCodeAt(f)
                  , p = l ^ v;
                v = v * f % n[222] + o[200],
                s += i[2].fromCharCode(p)
            }
            return s
        }

var zn
!function(n) {
    var t = s[13]
      , o = c[53]
      , i = r[83]
      , f = r[84]
      , l = s[110]
      , d = r[85]
      , h = r[86];
    function g(n, a, o, i, u) {
        for (var c = s[13], v = r[87], f = n[s[111]]; a < f; )
            o[i++] = n[a++] ^ u & parseInt(c + v + t + "11", r[88]),
            u = ~(u * parseInt(e[89], e[82]))
    }
    function w(n) {
        for (var t = c[112], i = r[52], v = n[s[111]], f = []; i < v; ) {
            var l = n[i++] << parseInt("1" + t, c[113]) | n[i++] << e[82] | n[i++];
            f.push(m.charAt(l >> parseInt(e[90], e[82])), m.charAt(l >> parseInt(s[114], e[78]) & parseInt(a[91], r[88])), m.charAt(l >> u[59] & parseInt("6" + o, a[78])), m.charAt(l & parseInt(a[92], u[113])))
        }
        return f.join(e[0])
    }
    for (var m = at(u[115], s[116]), I = {}, y = u[2]; y < parseInt(i + "0", e[93]); y++)
        I[m.charAt(y)] = y;
    function O(n) {
        var t, r, e;
        t = r = e = s;
        var o, i, u;
        o = i = u = a;
        for (var c = ot(i[94]), l = e[2], p = n[o[56]], d = []; l < p; ) {
            var h = I[n.charAt(l++)] << parseInt(at(t[117]), u[82]) | I[n.charAt(l++)] << parseInt(v(t[118], u[95], e[119]), o[88]) | I[n.charAt(l++)] << t[59] | I[n.charAt(l++)];
            d.push(h >> parseInt(e[120], t[106]), h >> parseInt(t[121], r[122]) & parseInt(f + b + c, t[106]), h & parseInt(o[96], u[88]))
        }
        return d
    }
    function D(n) {
        var t = O(n);
        if (rn,
        p,
        t[r[52]] != h)
            return error = T + B + l,
            void 0;
        var a = t[c[0]]
          , o = [];
        return g(t, +parseInt(e[79], c[122]), o, +u[2], a),
        x(o) == a ? o : void 0
    }
    function x(n) {
        var t = o;
        t = Vn;
        for (var e = c[2], i = a[52], u = n[c[111]]; i < u; i++)
            e = (e << s[123]) - e + n[i];
        return e & parseInt(s[124], r[88])
    }
    function N(n) {
        var r = x(n)
          , e = [h, r];
        return g(n, +a[52], e, +a[88], r),
        //t = "co", 出问题
        w(e)
    }
    n["base64Encode"] = w,
    n["base64Decode"] = O,
    n["encode"] = N,
    n["decode"] = D
}(zn || (zn = {}));



function strhash(n) {
    var t, e, a;
    t = e = a = s = second;
    var o, i, u;
    o = i = u = r = first;
    n = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
    for (var c = u[52], v = a[2], f = n[o[56]]; v < f; v++)
        c = (c << a[123]) - c + n.charCodeAt(v),
        c >>>= o[52];
    return c
}


function getBrowserFeature() {
    return 3812;
}

function getPlatform() {
    return 7;
}

function getBrowserIndex(){
    return 10;
}

function getPluginNum(){
    return 5;
}

function timeNow(){
    return time = s[52].now(),
    time / parseInt(c[131], a[88]) >>> c[2]
}


var En = a[8]
var An = v(a[35], s[49])
var Vn = 0
var Un = s[63]
var rt={};
!function(n) {
    var t = e[87], o = a[8], i = e[8], f = s[215], l = r[52], p = s[0], d = parseInt(c[216], u[122]), h = e[86], g = u[217], w = u[123], m = e[165], I = parseInt(t + En, c[122]), y = parseInt(a[79], a[82]), _ = c[218], C = parseInt(a[193], e[82]), E = parseInt(o + i, r[78]), A = parseInt(u[219], s[122]), b = parseInt(f + An, s[106]), T = parseInt(r[194], s[106]), B = parseInt(ot(s[220], e[195]), r[82]), R = parseInt(e[196], u[122]), k = parseInt(e[197], a[78]), S;
    function P() {
        var n = s[0]
          , t = r[88]
          , e = parseInt(u[13], c[122])
          , a = s[217];
        S = new qn([a, a, a, a, n, n, n, e, t, t, t, t, t, t, t, a, t, n]);
        S[p] = serverTimeNow();
        M(),
            S[B] = Vn;
            S[k] = Un;
            S[R] = c[2];
            S[h] = strhash();
            S[b] = getBrowserFeature();
            S[g] = getPlatform();
            S[w] = getBrowserIndex();
            S[m] = getPluginNum();
    }
    function M() {  //阅读后发现可以偷懒没直接使用random返回
        S[l] = Math.random() * parseInt(u[141], r[78]) >>> r[52]
        }

    function O() {
        S[R]++,
        S[p] = serverTimeNow(),
        S[d] = timeNow(),
        S[B] = Vn,
        S[I] = 0,
        S[y] = 0,
        S[_] = 0,
        S[C] = 0,
        S[E] = 0,
        S[A] = 0;
        var n = S.toBuffer();
        console.log(n);
        return zn.encode(n)
    }
    //n[e[57]] = P;
    P();
    function D() {
        return O()
    }
    n["update"] = D
}(rt);
result = rt.update();
console.log(result);


下面是源码的附件
局部截取_20240914_110854.png
wencai.zip (9.34 KB, 下载次数: 148)

免费评分

参与人数 7威望 +1 吾爱币 +14 热心值 +6 收起 理由
pojie20230721 + 1 + 1 我很赞同!
jfjfhajj + 1 我很赞同!
苏紫方璇 + 1 + 10 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
知心 + 1 + 1 我很赞同!
DRZH + 1 我很赞同!
gdp123gd + 1 + 1 我很赞同!
Moical + 1 我很赞同!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

gdp123gd 发表于 2024-9-14 14:28
感谢分析,我记得有个pywencai的模块可以问,但是这个保存到自己板块的功能不错。
kvttt_2021 发表于 2024-10-16 16:17
楼主你好,请问,能否详细讲讲同花顺问财的详细用法?另你软件中的下拉菜单是用什么条件实现的?这个自选股保存,是保存在同花顺网站上,还是保存在同花顺交易软件里?
我就是一小号 发表于 2024-9-14 11:20
52pojieyang2022 发表于 2024-9-14 12:07
大佬威武,看着很厉害的样子
 楼主| machuhai 发表于 2024-9-14 12:46
我就是一小号 发表于 2024-9-14 11:20
支持一下,这个是存在同花顺的板块中?

是的,跟同花顺板块一样
bzever 发表于 2024-9-14 14:43
感谢分享,新手新手前来学习报道
asa007 发表于 2024-9-14 15:16
能否打包为exe执行文件?
 楼主| machuhai 发表于 2024-9-14 16:02
gdp123gd 发表于 2024-9-14 14:28
感谢分析,我记得有个pywencai的模块可以问,但是这个保存到自己板块的功能不错。

是啊,pywencai不能加自选,加板块,所以自己动手弄一个
milu1123 发表于 2024-9-14 16:34
学习一下GUI如何写,,,,,
mytomsummer 发表于 2024-9-14 22:19
感谢分享学习了
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-24 09:59

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表