904118851 3 月之前
父節點
當前提交
cbe381935a

+ 4 - 3
0_RECEIVE_FACTORY/RECEIVE_FACTORY.js

@@ -324,9 +324,9 @@ CMD.get_dz_callback_template = async function(channelId,res) {
     })
 }
 
-CMD.get_dz_channel_Info_list = async function(res) {
+CMD.get_dz_channel_Info_list = async function(is_wx,res) {
     console.log("get_dz_channel_Info_list!")
-    require('../src/api/dz/get_channel_Info_list').get_channel_Info_list((data)=>{
+    require('../src/api/dz/get_channel_Info_list').get_channel_Info_list(is_wx,(data)=>{
         console.log('get_dz_channel_Info_list:', data);
         res.writeHead(200, {'Content-Type': 'application/json'});
         res.end(JSON.stringify({ message:"成功!",data:data,code:10000}));
@@ -604,7 +604,8 @@ var server = http.createServer(function(req,res){
                         let channelId = jsonData['data']['channelId']
                         CMD.get_dz_recharge_template(channelId,res) 
                     }else if(jsonData['fun']=="get_dz_channel_Info_list"&&jsonData['cmd']=="dz_link"){
-                        CMD.get_dz_channel_Info_list(res) 
+                        let is_wx = jsonData['data']['is_wx']
+                        CMD.get_dz_channel_Info_list(is_wx,res) 
                     }else if(jsonData['fun']=="get_qm_recharge_template"&&jsonData['cmd']=="qm_link"){
                         let category = jsonData['data']['category']
                         let qm_id = jsonData['data']['qm_id']

二進制
dump.rdb


+ 24 - 0
logs/combined.log

@@ -46,3 +46,27 @@
 >>>>>>> db77ff2f8a90617115d079bc031bf29c2bc8bb6c
 >>>>>>> b426a81d12231f0530137f364afb541275a06067
 >>>>>>> 84be9db016c7ffd7b81d835670a4cfd7525d17c9
+2025-04-30T16:59:20: 
+2025-04-30T16:59:20: > heiyan@1.0.0 start
+2025-04-30T16:59:20: > node tg_factory_main.js
+2025-04-30T16:59:20: 
+2025-04-30T16:59:48: Connected to Redis
+2025-04-30T16:59:48: qm_book_data: {
+2025-04-30T16:59:48:   words: 10200,
+2025-04-30T16:59:48:   book_name: '喜欢一碗水端平的婆婆彻底傻眼了',
+2025-04-30T16:59:48:   book_id: 396740,
+2025-04-30T16:59:48:   genre: 3,
+2025-04-30T16:59:48:   publish_time: '2024-12-17 14:28:19'
+2025-04-30T16:59:48: }
+2025-04-30T17:10:37: 
+2025-04-30T17:10:37: > heiyan@1.0.0 start
+2025-04-30T17:10:37: > node tg_factory_main.js
+2025-04-30T17:10:37: 
+2025-04-30T17:10:39: Connected to Redis
+2025-04-30T17:10:39: qm_book_data: {
+2025-04-30T17:10:39:   words: 10200,
+2025-04-30T17:10:39:   book_name: '喜欢一碗水端平的婆婆彻底傻眼了',
+2025-04-30T17:10:39:   book_id: 396740,
+2025-04-30T17:10:39:   genre: 3,
+2025-04-30T17:10:39:   publish_time: '2024-12-17 14:28:19'
+2025-04-30T17:10:39: }

+ 24 - 0
logs/out.log

@@ -46,3 +46,27 @@
 >>>>>>> db77ff2f8a90617115d079bc031bf29c2bc8bb6c
 >>>>>>> b426a81d12231f0530137f364afb541275a06067
 >>>>>>> 84be9db016c7ffd7b81d835670a4cfd7525d17c9
+2025-04-30T16:59:20: 
+2025-04-30T16:59:20: > heiyan@1.0.0 start
+2025-04-30T16:59:20: > node tg_factory_main.js
+2025-04-30T16:59:20: 
+2025-04-30T16:59:48: Connected to Redis
+2025-04-30T16:59:48: qm_book_data: {
+2025-04-30T16:59:48:   words: 10200,
+2025-04-30T16:59:48:   book_name: '喜欢一碗水端平的婆婆彻底傻眼了',
+2025-04-30T16:59:48:   book_id: 396740,
+2025-04-30T16:59:48:   genre: 3,
+2025-04-30T16:59:48:   publish_time: '2024-12-17 14:28:19'
+2025-04-30T16:59:48: }
+2025-04-30T17:10:37: 
+2025-04-30T17:10:37: > heiyan@1.0.0 start
+2025-04-30T17:10:37: > node tg_factory_main.js
+2025-04-30T17:10:37: 
+2025-04-30T17:10:39: Connected to Redis
+2025-04-30T17:10:39: qm_book_data: {
+2025-04-30T17:10:39:   words: 10200,
+2025-04-30T17:10:39:   book_name: '喜欢一碗水端平的婆婆彻底傻眼了',
+2025-04-30T17:10:39:   book_id: 396740,
+2025-04-30T17:10:39:   genre: 3,
+2025-04-30T17:10:39:   publish_time: '2024-12-17 14:28:19'
+2025-04-30T17:10:39: }

+ 16 - 17
src/api/dz/get_channel_Info_list.js

@@ -4,27 +4,26 @@ const config = require('../../../etc/config.json')
 const helper = require('../../helper')
 
 // 渠道列表查询接口(新)
-CMD.get_channel_Info_list = async function(call_back){
+CMD.get_channel_Info_list = async function(is_wx,call_back){
     let clinet = new HttpClient()
     let timestamp = Date.now()
     let response = null
     let signKey  = null
-    // if(is_wx){
-    //     signKey = helper.md5(config.dianzhong_channel_config.clientId+config.dianzhong_channel_config.token+timestamp)
-    //     response = await clinet.post(config.dianzhong_channel_config.channelInfoList,{
-    //         clientId:config.dianzhong_channel_config.clientId,
-    //         timestamp:timestamp,
-    //         signKey:signKey
-    //     })
-    // }else{
- 
-    // }
-    signKey = helper.md5(config.dianzhong_config.clientId+config.dianzhong_config.token+timestamp)
-    response = await clinet.post(config.dianzhong_channel_config.channelInfoList,{
-        clientId:config.dianzhong_config.clientId,
-        timestamp:timestamp,
-        signKey:signKey
-    })
+    if(is_wx){
+        signKey = helper.md5(config.dianzhong_channel_config.clientId+config.dianzhong_channel_config.token+timestamp)
+        response = await clinet.post(config.dianzhong_channel_config.channelInfoList,{
+            clientId:config.dianzhong_channel_config.clientId,
+            timestamp:timestamp,
+            signKey:signKey
+        })
+    }else{
+        signKey = helper.md5(config.dianzhong_config.clientId+config.dianzhong_config.token+timestamp)
+        response = await clinet.post(config.dianzhong_channel_config.channelInfoList,{
+            clientId:config.dianzhong_config.clientId,
+            timestamp:timestamp,
+            signKey:signKey
+        })
+    }
     call_back(response)
 }
 module.exports = CMD;

+ 67 - 5
src/api/fq/fq_search_book.js

@@ -2,6 +2,7 @@ const axios = require('axios');
 const querystring = require('querystring');
 const config = require("../../../etc/config.json")
 const helper = require('../../helper');
+const https = require('https');
 const CMD = {}
 CMD.search_id = async function(bookId,distributorId){
     const postData = {
@@ -61,7 +62,7 @@ CMD.search_name = function(keyword){
     });
 }
 
-CMD.search_new_id = function(){
+CMD.search_new_id = async function(bookId,call_back){
     const https = require('https');
 
     const options = {
@@ -91,9 +92,9 @@ CMD.search_new_id = function(){
     const params = new URLSearchParams({
       permission_statuses: '3,4',
       search_type: '5',
-      query: '7156137614049807396',
+      query: `${bookId}`,
       page_index: '0',
-      page_size: '10',
+      page_size: '1',
       msToken: 'QtOXD1IEPGNjuwS8Lzzew68qWnqxmVU10gPxOLcbijTXMmshIe_toySxUmiovwVBez7c8O3QcscyRES2_uC',
       a_bogus: 'D7UVhFyEYZW5F3AG8OsveV2UN69lr08y7FTdRt697NxbThUPk8e1NPe5noLRXP3XauBNZ9OHAn4MudpcKcziZSpkwmZDSN0ftGCA9g8Lh17IaTkgVHWqCGSwok3n/cWEmA1txemvUULaZfOlk1QZMddeq/4oQODdbi9hfNfai1wg6sta7Qy='
     });
@@ -108,15 +109,76 @@ CMD.search_new_id = function(){
       });
       
       res.on('end', () => {
-        console.log(JSON.parse(data));
+        call_back(JSON.parse(data))
       });
     });
     
     req.on('error', (error) => {
-      console.error(error);
+        call_back(null)
+        console.error(error);
     });
     
     req.end();
 }
 
+
+CMD.search_mf_new_id = async function(bookId,call_back){
+
+    const options = {
+        hostname: 'www.changdunovel.com',
+        path: '/novelsale/distributor/content/book/list/v1',
+        method: 'GET',
+        headers: {
+          'accept': 'application/json, text/plain, */*',
+          'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
+          'agw-js-conv': 'str',
+          'appid': '40017687',
+          'apptype': '15',
+          'distributorid': '1819222136130603',
+          'priority': 'u=1, i',
+          'sec-ch-ua': '"Microsoft Edge";v="135", "Not-A.Brand";v="8", "Chromium";v="135"',
+          'sec-ch-ua-mobile': '?1',
+          'sec-ch-ua-platform': '"Android"',
+          'sec-fetch-dest': 'empty',
+          'sec-fetch-mode': 'cors',
+          'sec-fetch-site': 'same-origin',
+          'x-secsdk-csrf-token': '00010000000165946eed4d812d087c4148a726264fe223e04f1c6e23eb1a0ebb30e517cbcf91183afa24b99abee3',
+          'cookie': 'store-region=cn-gd; store-region-src=uid; is_staff_user=false; passport_csrf_token=4d1582c647abf363099fe8a4f975751e; passport_csrf_token_default=4d1582c647abf363099fe8a4f975751e; s_v_web_id=verify_m8fcj8us_JZLlXrhR_OZsr_42Uz_BjhU_sRduBwB5eG8l; n_mh=-Akptc0OjS9zIJQaCBO_o6uzJlp3wAItgZeldsCLFeU; sid_guard=6cda0bf1f5b9891a648e6193dbd4b600%7C1745982840%7C5184000%7CSun%2C+29-Jun-2025+03%3A14%3A00+GMT; uid_tt=b3bebe7098b5f11e07d1d5dd8238d822; uid_tt_ss=b3bebe7098b5f11e07d1d5dd8238d822; sid_tt=6cda0bf1f5b9891a648e6193dbd4b600; sessionid=6cda0bf1f5b9891a648e6193dbd4b600; sessionid_ss=6cda0bf1f5b9891a648e6193dbd4b600'
+        }
+      };
+      
+      // 构建查询参数
+      const params = new URLSearchParams({
+        permission_statuses: '3,4',
+        search_type: '6',
+        query: `${bookId}`,
+        page_index: '0',
+        page_size: '1',
+        msToken: 'QtOXD1IEPGNjuwS8Lzzew68qWnqxmVU10gPxOLcbijTXMmshIe_toySxUmiovwVBez7c8O3QcscyRES2_uC',
+        a_bogus: 'mf0RheSEOx/nKpltmKsUeUHUEy2MrzuyDBTKRijyeNxpTZMaA8eeNOc9rxumZFaaeYpNZSMHUn-AznrcOcwwZ7HpKskvui7RtG9I98so8ZH3bBJg9r6MCGGoqkke/cWE85ltx9011UfO1nclk3dKMp3Jo/4qQODdRJ9zfPvax1q6640a7s8='
+      });
+      
+      options.path += `?${params.toString()}`;
+      
+      const req = https.request(options, (res) => {
+        let data = '';
+        
+        res.on('data', (chunk) => {
+          data += chunk;
+        });
+        
+        res.on('end', () => {
+          console.log(JSON.parse(data));
+          call_back(JSON.parse(data))
+        });
+      });
+      
+      req.on('error', (error) => {
+        console.error(error);
+        call_back(null)
+      });
+      
+      req.end();
+}
+
 module.exports = CMD;

二進制
src/api/hy/qr.gif


二進制
src/api/hy/qr_resized.gif


+ 87 - 0
src/api/qm/qm_gen_signature.js

@@ -0,0 +1,87 @@
+const crypto = require('crypto');
+
+function testSignatureGeneration() {
+    const timestamp = '1745997864484';
+    const url = `/api/account/login?t=${timestamp}&env=&qm_csrf_backend=undefined`;
+    const data = {
+        account_name: "zhuoyue",
+        password: "Wnl3ejAzOTYz",
+        env: ""
+    };
+
+    function test(testName, signString) {
+        const signature = crypto.createHash('sha256')
+            .update(signString)
+            .digest('hex');
+        console.log(`\n${testName}:`);
+        console.log('签名字符串:', signString);
+        console.log('生成签名:', signature);
+        console.log('是否匹配:', signature === '87c88d2b321fd439c756847c7348a198be6abf769a46f34dbc83d9a4fec34567');
+    }
+
+    // 方案13:使用Base64编码的数据
+    const base64Data = Buffer.from(JSON.stringify(data)).toString('base64');
+    const str13 = `${url}&${base64Data}&${timestamp}`;
+    test('方案13', str13);
+
+    // 方案14:URL参数分开处理
+    const urlParams = new URLSearchParams({
+        t: timestamp,
+        env: '',
+        qm_csrf_backend: 'undefined'
+    });
+    const path = '/api/account/login';
+    const sortedData = Object.keys(data)
+        .sort()
+        .map(key => `${key}=${JSON.stringify(data[key])}`)
+        .join('&');
+    const str14 = `${path}?${urlParams.toString()}&${sortedData}&${timestamp}`;
+    test('方案14', str14);
+
+    // 方案15:将参数作为对象处理
+    const allParams = {
+        ...data,
+        t: timestamp,
+        env: '',
+        qm_csrf_backend: 'undefined'
+    };
+    const sortedAllParams = Object.keys(allParams)
+        .sort()
+        .map(key => `${key}=${JSON.stringify(allParams[key])}`)
+        .join('&');
+    const str15 = `${path}&${sortedAllParams}`;
+    test('方案15', str15);
+
+    // 方案16:处理特殊字符
+    const encodedSortedData = Object.keys(data)
+        .sort()
+        .map(key => {
+            const value = data[key].toString()
+                .replace(/"/g, '\\"')
+                .replace(/'/g, "\\'");
+            return `${key}="${value}"`;
+        })
+        .join('&');
+    const str16 = `${url}&${encodedSortedData}&${timestamp}`;
+    test('方案16', str16);
+
+    // 方案17:尝试不同的时间戳位置
+    const str17 = `${timestamp}&${url}&${sortedData}`;
+    test('方案17', str17);
+
+    // 方案18:完全扁平化所有参数
+    const flatParams = {
+        url: path,
+        t: timestamp,
+        env: '',
+        qm_csrf_backend: 'undefined',
+        ...data
+    };
+    const str18 = Object.keys(flatParams)
+        .sort()
+        .map(key => `${key}=${flatParams[key]}`)
+        .join('&');
+    test('方案18', str18);
+}
+
+testSignatureGeneration();

+ 92 - 12
src/api/qm/qm_login.js

@@ -3,20 +3,100 @@ const HttpClient = require('../../../src/HttpClient')
 const config = require('../../../etc/config.json')
 const helper = require('../../helper')
 const dns = require('dns').promises;
-
+const https = require('https');
+const crypto = require('crypto');
 // 获取七猫充值模板
 CMD.login = async function(call_back){
-    let clinet = new HttpClient()
-    let timestamp = helper.getCurrentUnixTimestamp()
-    let {data,headers} = await clinet.postAndGetHeaders(config.qimao_config.login_host+timestamp,{
-        account_name:"zhuoyue",
-        password:helper.base64("Zywz03963"),
-        env:""
-    },{
-        headers:{
-            "target-id": ""
+    const result = await CMD.login_qm();
+    console.log("result:",result)
+    call_back(result.data,result.headers)
+}
+
+function encodePassword(password) {
+    // const encoded = Buffer.from(password).toString('base64')
+    //   .replace(/Z/g, 'W')
+    //   .replace(/y/g, 'n')
+    //   .replace(/w/g, 'l')
+    //   .replace(/z/g, 'e');
+    return Buffer.from(password).toString('base64');
+}
+
+function generateSignature(params) {
+    const timestamp = Date.now();
+    // 假设签名规则为: md5(账号 + 密码 + 时间戳 + 密钥)
+    const signStr = `${params.account_name}${params.password}${timestamp}your_secret_key`;
+    return crypto.createHash('md5').update(signStr).digest('hex');
+  }
+  
+CMD.login_qm =async function() {
+    let timestamp = Date.now();
+    timestamp = "1745997864484"
+    const postData = JSON.stringify({
+        "account_name": "zhuoyue",
+        "password": "Wnl3ejAzOTYz",
+        "env": ""
+    });
+
+    // const signature = crypto.createHash('sha256')
+    //     .update(str)
+    //     .digest('hex');
+    
+    // console.log('输入字符串:', str);
+    // console.log('生成的签名:', signature);
+
+    const options = {
+        hostname: 'new-media-fx.qimao.com',
+        path: `/api/account/login?t=${timestamp}&env=&qm_csrf_backend=undefined`,
+        method: 'POST',
+        headers: {
+            'Host': 'new-media-fx.qimao.com',
+            'Connection': 'keep-alive',
+            'Content-Length': Buffer.byteLength(postData),
+            'sec-ch-ua-platform': '"Windows"',
+            'signature': '87c88d2b321fd439c756847c7348a198be6abf769a46f34dbc83d9a4fec34567',
+            'sec-ch-ua': '"Microsoft Edge";v="135", "Not-A.Brand";v="8", "Chromium";v="135"',
+            'project': '',
+            'sec-ch-ua-mobile': '?0',
+            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0',
+            'Accept': 'application/json, text/plain, */*',
+            'target-id': '',
+            'Content-Type': 'application/json;charset=UTF-8',
+            'app-external-id': '',
+            'Origin': 'https://new-media-fx.qimao.com',
+            'Sec-Fetch-Site': 'same-origin',
+            'Sec-Fetch-Mode': 'cors',
+            'Sec-Fetch-Dest': 'empty',
+            'Referer': 'https://new-media-fx.qimao.com/backend/login',
+            'Accept-Encoding': 'gzip, deflate, br, zstd',
+            'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
+            'Cookie': 'sensorsdata2015jssdkcross=%7B%22%24device_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%7D; sa_jssdk_2015_new-media-fx_qimao_com=%7B%22distinct_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E5%BC%95%E8%8D%90%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22http%3A%2F%2F120.79.128.142%3A4999%2F%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkzYmRjMTI0NjQ1ZTItMGNiZWFlZTE3MmQ0Y2U4LTRjNjU3YjU4LTkyMTYwMC0xOTNiZGMxMjQ2NTU2NyJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%22%2C%22value%22%3A%22%22%7D%7D'
         }
-    })
-    call_back(data,headers)
+    };
+
+    return new Promise((resolve, reject) => {
+        const req = https.request(options, (res,_) => {
+            let data = '';
+            
+            res.on('data', (chunk) => {
+                data += chunk;
+            });
+            res.on('end', () => {
+                try {
+                    resolve({data:JSON.parse(data),headers:res.headers});
+                } catch (e) {
+                    resolve(data);
+                }
+            });
+        });
+
+        req.on('error', (error) => {
+            reject(error);
+        });
+
+        req.write(postData);
+        req.end();
+    });
+    
+    
 }
 module.exports = CMD;

+ 80 - 13
src/api/qm/qm_search_book.js

@@ -3,31 +3,39 @@ const tools = require('../../../tools');
 const helper = require('../../helper');
 const CMD = {}
 CMD.search_id = async function (bookId) {
-    const url = 'https://new-media-fx.qimao.com/api/content/book/list';
-    
+    // const url = 'https://new-media-fx.qimao.com/api/content/book/list';
+    return await makeRequest(bookId);
     // 请求参数
     const params = new URLSearchParams({
         book_id: bookId,
         page: '1',
         page_size: '50',
         env: '',
-        t: Date.now()  // 当前时间戳
+        // t: Date.now()  // 当前时间戳
+        t:"1746001071923"
     });
 
     // 请求头
     var headers = {
-        'accept': 'application/json, text/plain, */*',
-        'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
-        'app-external-id': '4c6e8d8709c14de9a4397b6cbb978f85',
-        'authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SUQiOjU0NDA1NjQxNjM3MTI4MjExMSwiQWNjb3VudE5hbWUiOiJ6aHVveXVlIiwiVGltZVN0YW1wIjoxNzM0MDg4MjI1LCJDbGllbnRJUCI6IjIxOS43Ny4yMzYuMTgwIiwiQnVmZmVyVGltZSI6MCwiZXhwIjoxNzM0MTc0NjI1LCJpc3MiOiJxbV9uZXdfbWVkaWFfZngiLCJuYmYiOjE3MzQwODgyMjUsIkVudiI6InJlbGVhc2UiLCJJc1NpbXVsYXRpb25Mb2dpbiI6ZmFsc2V9.LaEHd147NoCt1Wfo9ZZlCs4pludA7D3LajN4xff2H5o',
-        'project': 'reader_paid_dyminiapp',
-        'signature': 'b4782a395b0d0de3f78bb5c8157cb35ab0d6c51f3677a1cfb4b5390c39f63169',
-        'target-id': '544180064332673816',
-        'cookie': 'sensorsdata2015jssdkcross=%7B%22%24device_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%7D; sajssdk_2015_new_user_new-media-fx_qimao_com=1; acw_tc=1a0c380f17341043811111513e003f4b4a7b61bafaac1abb4e5d21e565003f; sa_jssdk_2015_new-media-fx_qimao_com=%7B%22distinct_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkzYmRjMTI0NjQ1ZTItMGNiZWFlZTE3MmQ0Y2U4LTRjNjU3YjU4LTkyMTYwMC0xOTNiZGMxMjQ2NTU2NyJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%22%2C%22value%22%3A%22%22%7D%7D',
-        'Referer': 'https://new-media-fx.qimao.com/backend/postback-configuration/index?projectId=reader_paid_dyminiapp&appId=4c6e8d8709c14de9a4397b6cbb978f85&accountId=544180064332673816'
+        "accept": "application/json, text/plain, */*",
+        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+        "app-external-id": "14f237fdbb7711ef93f90293e6ac97a2",
+        "authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SUQiOjU0NDA1NjQxNjM3MTI4MjExMSwiQWNjb3VudE5hbWUiOiJ6aHVveXVlIiwiVGltZVN0YW1wIjoxNzQ2MDAwOTcyLCJDbGllbnRJUCI6IjEyMS4zMy4yMTcuMjE4IiwiQnVmZmVyVGltZSI6MCwiZXhwIjoxNzQ2MDg3MzcyLCJpc3MiOiJxbV9uZXdfbWVkaWFfZngiLCJuYmYiOjE3NDYwMDA5NzIsIkVudiI6InJlbGVhc2UiLCJJc1NpbXVsYXRpb25Mb2dpbiI6ZmFsc2V9.r4Heb9qmhrpSvDQW5QiTi1dVW_hyX_JKoyenpEnUMDg",
+        "project": "reader_paid_dyminiapp",
+        "sec-ch-ua": "\"Microsoft Edge\";v=\"135\", \"Not-A.Brand\";v=\"8\", \"Chromium\";v=\"135\"",
+        "sec-ch-ua-mobile": "?1",
+        "sec-ch-ua-platform": "\"Android\"",
+        "sec-fetch-dest": "empty",
+        "sec-fetch-mode": "cors",
+        "sec-fetch-site": "same-origin",
+        "signature": "01b4982bffb69237587a38de6428cce9e1948cce3517c357bd136aa66cfd192b",
+        "target-id": "549124667291906201",
+        "cookie": "sensorsdata2015jssdkcross=%7B%22%24device_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%7D; sa_jssdk_2015_new-media-fx_qimao_com=%7B%22distinct_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E5%BC%95%E8%8D%90%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22http%3A%2F%2F120.79.128.142%3A4999%2F%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkzYmRjMTI0NjQ1ZTItMGNiZWFlZTE3MmQ0Y2U4LTRjNjU3YjU4LTkyMTYwMC0xOTNiZGMxMjQ2NTU2NyJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%22%2C%22value%22%3A%22%22%7D%7D; acw_tc=ac11000117460009692805554e0074ec3c1591025be468ce51e9071843da7f",
+        "Referer": "https://new-media-fx.qimao.com/backend/book-manage/index?projectId=reader_paid_dyminiapp&appId=14f237fdbb7711ef93f90293e6ac97a2&accountId=549124667291906201",
+        "Referrer-Policy": "strict-origin-when-cross-origin"
     };
 
-    headers['authorization'] = await tools.getQMToken()
+    // headers['authorization'] = await tools.getQMToken()
     try {
         const response = await fetch(`${url}?${params}`, {
             method: 'GET',
@@ -56,10 +64,69 @@ CMD.search_id = async function (bookId) {
         }
         return info;
     } catch (error) {
+        console.log(error)
+        return null
+    }
+}
+
+
+
+async function makeRequest(book_id) {
+    const url = `https://new-media-fx.qimao.com/api/content/book/list?book_id=${book_id}&page=1&page_size=50&env=&t=1746001846107`;
+    
+    const headers = {
+        "accept": "application/json, text/plain, */*",
+        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
+        "app-external-id": "14f237fdbb7711ef93f90293e6ac97a2",
+        "authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBY2NvdW50SUQiOjU0NDA1NjQxNjM3MTI4MjExMSwiQWNjb3VudE5hbWUiOiJ6aHVveXVlIiwiVGltZVN0YW1wIjoxNzQ2MDAwOTcyLCJDbGllbnRJUCI6IjEyMS4zMy4yMTcuMjE4IiwiQnVmZmVyVGltZSI6MCwiZXhwIjoxNzQ2MDg3MzcyLCJpc3MiOiJxbV9uZXdfbWVkaWFfZngiLCJuYmYiOjE3NDYwMDA5NzIsIkVudiI6InJlbGVhc2UiLCJJc1NpbXVsYXRpb25Mb2dpbiI6ZmFsc2V9.r4Heb9qmhrpSvDQW5QiTi1dVW_hyX_JKoyenpEnUMDg",
+        "project": "reader_paid_dyminiapp",
+        "sec-ch-ua": "\"Microsoft Edge\";v=\"135\", \"Not-A.Brand\";v=\"8\", \"Chromium\";v=\"135\"",
+        "sec-ch-ua-mobile": "?1",
+        "sec-ch-ua-platform": "\"Android\"",
+        "sec-fetch-dest": "empty",
+        "sec-fetch-mode": "cors",
+        "sec-fetch-site": "same-origin",
+        "signature": "66cd5f564e85598c73adabf398496dff8268da075658e6feab4fe3cfe76e438a",
+        "target-id": "549124667291906201",
+        "cookie": "sensorsdata2015jssdkcross=%7B%22%24device_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%7D; sa_jssdk_2015_new-media-fx_qimao_com=%7B%22distinct_id%22%3A%22193bdc124645e2-0cbeaee172d4ce8-4c657b58-921600-193bdc12465567%22%2C%22first_id%22%3A%22%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E5%BC%95%E8%8D%90%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22http%3A%2F%2F120.79.128.142%3A4999%2F%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkzYmRjMTI0NjQ1ZTItMGNiZWFlZTE3MmQ0Y2U4LTRjNjU3YjU4LTkyMTYwMC0xOTNiZGMxMjQ2NTU2NyJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%22%2C%22value%22%3A%22%22%7D%7D; acw_tc=ac11000117460009692805554e0074ec3c1591025be468ce51e9071843da7f",
+        "Referer": "https://new-media-fx.qimao.com/backend/book-manage/index?projectId=reader_paid_dyminiapp&appId=14f237fdbb7711ef93f90293e6ac97a2&accountId=549124667291906201"
+    };
+
+    try {
+        const response = await fetch(url, {
+            method: 'GET',
+            headers: headers
+        });
+
+        const data = await response.json();
+        if(data.code!=200){
+            throw data
+        }
+        // console.log('响应状态:', response.status);
+        // console.log('响应数据:', data.data.list[0]);
+        if(data.data.list.length<=0){
+            return null
+        }
+        let book_info = data.data.list[0]
+        let info = {}
+        info.words =  Math.floor(parseFloat(book_info.book_word_count)*10000)
+        info.book_name =  book_info.book_name
+        info.book_id =  book_info.book_id
+        info.genre = 999;
+        info.publish_time = book_info.create_time
+        if(book_info.book_type==2){  //七猫只有长或者短
+            info.genre = 3;
+        }else{
+            info.genre = 1;
+        }
+        return info;
+    } catch (error) {
+        console.log(error)
         return null
     }
 }
 
+// 执行请求
 // Node.js 18及以上版本可以直接运行
 // Node.js 18以下版本需要先安装 node-fetch:
 // npm install node-fetch@2

+ 1 - 0
src/api/zh/zh_search_book.js

@@ -39,6 +39,7 @@ CMD.search_id = async function(bookId) {
         info.words =  book_info.word_count
         info.book_name =  book_info.work_title
         info.book_id =  book_info.work_id
+        info.publish_time = book_info.online_time
         if(book_info.word_count<100000){
             info.genre = 3;
         }else{

+ 39 - 8
tg_factory_main.js

@@ -35,20 +35,51 @@ let isInit = false
 if(config.isDebug){
     redis_help.connect( async (results)=>{
         if(results){
-      
+            // await require('./src/api/fq/fq_search_book').search_new_id('7156137614049807396',(data)=>{
+            //     console.log("data:",data.data)
+            // })
+
+            // await require('./src/api/fq/fq_search_book').search_mf_new_id('7375572126402612286',(data)=>{
+            //     console.log("data:",data.data)
+            // })
+ 
             // require('./src/api/dz/dz_login').login()
-            setTimeout(async ()=>{
-                    // let data = await require('./src/api/dz/dz_search_book').search_id('11010288676')
-                    let data = await require('./src/api/fq/fq_search_book').search_new_id()
-                    console.log("data:",data)
-                },1000)
+            // setTimeout(async ()=>{
+            //         // let data = await require('./src/api/dz/dz_search_book').search_id('11010288676')
+         
+
+            //     },1000)
+
+            // let data = await hy_search_book.search_id("1868479666362478594")
+            // console.log("data:",data)
+
+
+            // let zh_book_data = await require('./src/api/zh/zh_search_book').search_id("1864355654438887424")
+            // console.log("zh_book_data:",zh_book_data)
+
+            // await redis_help.setKeyValue("OPENSESSID","00507b6b53d7d79fbe73d5dbb2cb5c62")
+            // let yw_book_data = await require('./src/api/yw/yw_search_book').search_id("20879682908817006")
+            // console.log("yw_book_data:",yw_book_data)
+
+            // let yw_book_data =  await require('./src/api/yw/get_book_tg_chapter_id').get_book_tg_chapter_id("20879682908817006")
+            // console.log("yw_book_data:",yw_book_data)
+
+                // let qm_login = require('./src/api/qm/qm_login')
+                // qm_login.login(async (data,headers)=>{
+                //     console.log("qi_mao_token:",headers['n-token'])
+                //     redis_help.setKeyValue("qi_mao_token",headers['n-token'])
+
+                // })
+                let qm_book_data =  await require('./src/api/qm/qm_search_book').search_id('396740')
+                console.log("qm_book_data:",qm_book_data)
+          
+
             // let totalWordSize = data.rows[0].totalWordSize
             // let totalChapterNum = data.rows[0].totalChapterNum
             // let book_info =  await require("./src/api/qm_mf/qm_mf_search_book").search_name("巧克力薄脆","爸妈地震中只救假千金,我离开后他们后悔了")
             // console.log("book_info:",book_info)
             //    await require("./5_CREATE_LINK_FACTORY/zh_create_link").makeRequest()
-            // let data = await hy_search_book.search_id("1868479666362478594")
-            // console.log("data:",data)
+ 
             // if(isInit){
             //     return
             // }