更新 netease_music 脚本
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
start cmd /k "node index --utils assistant"
|
|
||||||
|
|
||||||
start cmd /k "node index --utils song"
|
|
||||||
start cmd /k "node index --utils album --limit 10000"
|
|
||||||
start cmd /k "node index --utils artist --limit 10000"
|
|
||||||
start cmd /k "node index --utils comment --limit 10000"
|
|
||||||
start cmd /k "node index --utils lyric --limit 10000"
|
|
||||||
|
|
||||||
@REM start cmd /k "node index --utils playlist"
|
|
||||||
exit
|
|
1
netease_music/manual-script/.gitignore
vendored
Normal file
1
netease_music/manual-script/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
comment id segment.txt
|
@@ -2,20 +2,16 @@
|
|||||||
# cd ./netease_music
|
# cd ./netease_music
|
||||||
cd tools/netease_music/
|
cd tools/netease_music/
|
||||||
|
|
||||||
|
# 【ING】
|
||||||
start cmd /k "node index --utils assistant"
|
start cmd /k "node index --utils assistant"
|
||||||
start cmd /k "node index --utils song"
|
start cmd /k "node index --utils song"
|
||||||
start cmd /k "node index --utils artist --limit 50000"
|
start cmd /k "node index --utils artist --limit 50000"
|
||||||
start cmd /k "node index --utils album --limit 50000"
|
start cmd /k "node index --utils album --limit 50000"
|
||||||
start cmd /k "node index --utils lyric"
|
start cmd /k "node index --utils lyric --limit 10000"
|
||||||
|
# start cmd /k "node index --utils comment --limit 10000"
|
||||||
|
|
||||||
start cmd /k "node index --utils playlist"
|
start cmd /k "node index --utils playlist"
|
||||||
|
|
||||||
exit
|
|
||||||
|
|
||||||
# 把增量数据带上来
|
|
||||||
|
|
||||||
# node index --utils lyric --limit 500 --order desc
|
|
||||||
# node index --utils lyric --limit 500
|
|
||||||
|
|
||||||
# lyric_5
|
# lyric_5
|
||||||
# 【ING】
|
# 【ING】
|
||||||
@@ -99,39 +95,54 @@ node index --utils comment --min 2000000 --max 2500000 --limit 10000
|
|||||||
node index --utils comment --min 2500000 --max 3000000 --limit 10000
|
node index --utils comment --min 2500000 --max 3000000 --limit 10000
|
||||||
node index --utils comment --min 3000000 --max 3500000 --limit 10000
|
node index --utils comment --min 3000000 --max 3500000 --limit 10000
|
||||||
|
|
||||||
# comment_3
|
# comment_3 配置待更新
|
||||||
# 【阿里云ing】
|
# 【阿里云ing】
|
||||||
node index --utils comment --min 3500000 --max 4000000 --limit 10000 &
|
node index --utils comment --min 3500000 --max 4000000 --limit 10000 &
|
||||||
node index --utils comment --min 4000000 --max 4500000 --limit 10000 &
|
node index --utils comment --min 4000000 --max 4500000 --limit 10000 &
|
||||||
node index --utils comment --min 4500000 --max 5000000 --limit 10000 &
|
node index --utils comment --min 4500000 --max 5000000 --limit 10000 &
|
||||||
node index --utils comment --min 5000000 --max 5500000 --limit 10000 &
|
node index --utils comment --min 5000000 --max 5500000 --limit 10000 &
|
||||||
node index --utils comment --min 5500000 --max 6000000 --limit 10000 &
|
# node index --utils comment --min 5500000 --max 6000000 --limit 10000
|
||||||
|
|
||||||
# comment_4
|
# comment_4 配置待更新
|
||||||
# 【阿里云ing】
|
|
||||||
node index --utils comment --min 6000000 --max 6500000 --limit 10000 &
|
|
||||||
node index --utils comment --min 6500000 --max 7000000 --limit 10000 &
|
|
||||||
node index --utils comment --min 7000000 --max 7500000 --limit 10000 &
|
|
||||||
node index --utils comment --min 7500000 --max 8000000 --limit 10000 &
|
|
||||||
|
|
||||||
# comment_5
|
# comment_5 配置待更新
|
||||||
node index --utils comment --min 8000000 --max 8500000 --limit 10000
|
# 【公司电脑ing】
|
||||||
node index --utils comment --min 8500000 --max 9000000 --limit 10000
|
# node index --utils comment --min 6000000 --max 9000000 --limit 10000
|
||||||
node index --utils comment --min 9000000 --max 9500000 --limit 10000
|
node index --utils comment --min 9000000 --max 9500000 --limit 10000
|
||||||
node index --utils comment --min 9500000 --max 10000000 --limit 10000
|
# node index --utils comment --min 9500000 --max 10000000 --limit 10000
|
||||||
|
|
||||||
# comment_n
|
# comment_n
|
||||||
|
# 【公司电脑ing】
|
||||||
node index --utils comment --min 10000000 --max 20000000 --limit 10000
|
node index --utils comment --min 10000000 --max 20000000 --limit 10000
|
||||||
node index --utils comment --min 20000000 --max 30000000 --limit 10000
|
node index --utils comment --min 20000000 --max 30000000 --limit 10000
|
||||||
node index --utils comment --min 30000000 --max 40000000 --limit 10000
|
node index --utils comment --min 30000000 --max 40000000 --limit 10000
|
||||||
# node index --utils comment --min 40000000 --max 50000000 --limit 10000
|
# node index --utils comment --min 40000000 --max 50000000 --limit 10000
|
||||||
node index --utils comment --min 50000000 --max 500000000 --limit 10000
|
node index --utils comment --min 50000000 --max 500000000 --limit 10000
|
||||||
|
|
||||||
# comment_2n
|
# comment_2n_1 配置待更新
|
||||||
node index --utils comment --min 1000000000 --max 1500000000 --limit 10000
|
# 【公司电脑ing】
|
||||||
node index --utils comment --min 1500000000 --max 2000000000 --limit 10000
|
# node index --utils comment --min 1000000000 --max 1100000000 --limit 10000
|
||||||
node index --utils comment --min 2000000000 --max 2500000000 --limit 10000
|
# node index --utils comment --min 1100000000 --max 1200000000 --limit 10000
|
||||||
node index --utils comment --min 2500000000 --limit 10000
|
node index --utils comment --min 1200000000 --max 1300000000 --limit 10000
|
||||||
|
node index --utils comment --min 1300000000 --max 1400000000 --limit 10000
|
||||||
|
node index --utils comment --min 1400000000 --max 1500000000 --limit 10000
|
||||||
|
|
||||||
|
# comment_2n_2 配置待更新
|
||||||
|
# 【手机ing】
|
||||||
|
node index --utils comment --min 1500000000 --max 1600000000 --limit 10000 &
|
||||||
|
node index --utils comment --min 1600000000 --max 1700000000 --limit 10000 &
|
||||||
|
node index --utils comment --min 1700000000 --max 1800000000 --limit 10000 &
|
||||||
|
node index --utils comment --min 1800000000 --max 1900000000 --limit 10000 &
|
||||||
|
node index --utils comment --min 1900000000 --max 2000000000 --limit 10000 &
|
||||||
|
|
||||||
|
# comment_2n_3 配置待更新
|
||||||
|
# 【阿里云ing】
|
||||||
|
node index --utils comment --min 2000000000 --max 2100000000 --limit 10000 &
|
||||||
|
node index --utils comment --min 2100000000 --max 2200000000 --limit 10000 &
|
||||||
|
# node index --utils comment --min 2200000000 --max 2300000000 --limit 10000
|
||||||
|
# node index --utils comment --min 2300000000 --max 2400000000 --limit 10000
|
||||||
|
# node index --utils comment --min 2400000000 --max 2500000000 --limit 10000
|
||||||
|
# node index --utils comment --min 2500000000 --limit 10000
|
||||||
|
|
||||||
# # 待整理 2000000 - 1999000000
|
# # 待整理 2000000 - 1999000000
|
||||||
# start cmd /k "node index --utils comment --limit 10000 --min --max " #
|
# start cmd /k "node index --utils comment --limit 10000 --min --max " #
|
@@ -1,4 +1,24 @@
|
|||||||
let a = `1990000000
|
// -- 查看需要爬取的 comment 的分布
|
||||||
|
// SELECT cast( FLOOR( song_id / 10000000 ) * 10000000 as UNSIGNED ) as s, count(*) as count
|
||||||
|
// FROM comment_progress
|
||||||
|
// WHERE current_status != 2
|
||||||
|
// GROUP BY s
|
||||||
|
// ORDER BY s DESC;
|
||||||
|
|
||||||
|
// 变量 a 为通过执行以上SQL获取的分段
|
||||||
|
let a = `2110000000
|
||||||
|
2100000000
|
||||||
|
2090000000
|
||||||
|
2080000000
|
||||||
|
2070000000
|
||||||
|
2060000000
|
||||||
|
2050000000
|
||||||
|
2040000000
|
||||||
|
2030000000
|
||||||
|
2020000000
|
||||||
|
2010000000
|
||||||
|
2000000000
|
||||||
|
1990000000
|
||||||
1980000000
|
1980000000
|
||||||
1970000000
|
1970000000
|
||||||
1960000000
|
1960000000
|
||||||
@@ -60,13 +80,12 @@ let a = `1990000000
|
|||||||
410000000
|
410000000
|
||||||
400000000
|
400000000
|
||||||
390000000
|
390000000
|
||||||
40000000
|
|
||||||
30000000
|
30000000
|
||||||
20000000
|
20000000
|
||||||
10000000
|
10000000
|
||||||
0`
|
0`
|
||||||
|
|
||||||
const splitCount = 1000
|
const splitCount = 1
|
||||||
const step = 10000000 / splitCount
|
const step = 10000000 / splitCount
|
||||||
|
|
||||||
let b = []
|
let b = []
|
||||||
@@ -77,4 +96,8 @@ a.split('\n')
|
|||||||
b.push(Number(n) + (i - 1) * step)
|
b.push(Number(n) + (i - 1) * step)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(b.join('\n'))
|
let content = b.join('\n')
|
||||||
|
// console.log(content)
|
||||||
|
|
||||||
|
const fs = require('fs')
|
||||||
|
fs.writeFileSync('comment id segment.txt', content, 'utf-8')
|
@@ -134,3 +134,14 @@ WHERE
|
|||||||
table_schema = 'neteasemusic'
|
table_schema = 'neteasemusic'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
table_rows DESC;
|
table_rows DESC;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- 统计等待爬取的数据条数 2023.12.25
|
||||||
|
SELECT 'comment' as wait_fetch, count(*) as `count` FROM `comment_progress` where current_status = 0
|
||||||
|
UNION ALL
|
||||||
|
SELECT 'album', count(*) FROM `wait_fetch_album`
|
||||||
|
UNION ALL
|
||||||
|
SELECT 'artist', count(*) FROM `wait_fetch_artist`
|
||||||
|
UNION ALL
|
||||||
|
SELECT 'lyric', count(*) FROM `wait_fetch_lyric`
|
@@ -4,6 +4,11 @@ cd C:\Users\Administrator\Desktop\tools\netease_music
|
|||||||
linux服务器
|
linux服务器
|
||||||
cd /www/neteasemusic/tools
|
cd /www/neteasemusic/tools
|
||||||
|
|
||||||
|
手机 Termux
|
||||||
|
pkg update
|
||||||
|
pkg install git
|
||||||
|
pkg install nodejs
|
||||||
|
|
||||||
|
|
||||||
本地库测试
|
本地库测试
|
||||||
node index --database neteasemusic_develop --utils song
|
node index --database neteasemusic_develop --utils song
|
Reference in New Issue
Block a user