Skip to content

Instantly share code, notes, and snippets.

@3rogue
3rogue / lyric.py
Last active July 9, 2020 13:23
网易云音乐歌词下载
# -*- coding: utf-8 -*-
import requests
import os
import re
# 163 api https://github.com/yanunon/NeteaseCloudMusic/wiki/%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90API%E5%88%86%E6%9E%90
def downloadlyric(songname):
songname = re.search(r'.*\\(.*).mp3',songname)
songname = songname.group(1)
headers = {'referer':'http://music.163.com', 'appver':'2.0.2'}
@3rogue
3rogue / 163_lyric_download.js
Last active May 3, 2024 15:11
网易云音乐歌词下载(双语喔)
// ==UserScript==
// @name 网易云歌词下载,可以双语了orz
// @namespace http://suselinks.us
// @description 我只是做了合并了两个脚本的工作,可以直接下载了。
// @description 脚本1:https://greasyfork.org/zh-CN/scripts/10548-%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90%E4%B8%8B%E8%BD%BD
// @description 脚本2:https://gist.github.com/anonymous/a800677393bbb2dd113a 多谢他们
// @include http://music.163.com/*
// @grant none
// @version 1.2
// ==/UserScript==
@3rogue
3rogue / filesize.py
Last active August 29, 2015 14:28
遍历目录下文件,按文件大小排序输出到txt中
import os
def list_size(path):
res={}
for dirpath, dirnames, filenames in os.walk(path):
for name in filenames:
fullpath = os.path.join(dirpath, name)
size = os.path.getsize(fullpath)
res[fullpath] = size/1024/1024
return sorted(res.items(), key = lambda d:d[1], reverse = True)
@3rogue
3rogue / avmo2.py
Last active December 27, 2016 08:34
download the picture from avmp.pw with multithreading
from pyquery import PyQuery as pq
import requests
import os
import os.path
import time
from multiprocessing.dummy import Pool as ThreadPool
def get_urls():
pagenum = 1
urls = []
@3rogue
3rogue / avmo.py
Last active December 27, 2016 08:33
download the picture from avmo.pw
from pyquery import PyQuery as pq
import requests
import os
import os.path
import time
def downloadpic(keyword):
if not os.path.exists(keyword):
os.makedirs(keyword)
pagenum = 1