Skip to content

Instantly share code, notes, and snippets.

View PeterDing's full-sized avatar
🪐
Working

Peter Ding PeterDing

🪐
Working
View GitHub Profile
@PeterDing
PeterDing / baidu_mp3_album_downloader.py
Last active February 22, 2017 05:12
baidu mp3 专辑下载 python 脚本-------------用法:python baidu_mp3_album_downloader.py url## url 是 http://music.baidu.com/song/23473715http://music.baidu.com/album/783596 -- # 移到仓库 https://github.com/PeterDing/iScript
#!/usr/bin/env python2
# vim: set fileencoding=utf8
import re, sys, os, random, time, json, urllib2, logging, argparse
from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TCOM,TCON,TSST,WXXX,TSRC
from HTMLParser import HTMLParser
parser = HTMLParser()
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template
ua = 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36'
@PeterDing
PeterDing / trans.py
Created June 12, 2011 14:32
rearranging the record that stardict saved to readable lines.
#!/usr/bin/env python
#########################################################
# I wrote the little script depended on following dictionaries:
# stardict-cced-2.4.2.tar.bz2, stardict-langdao-ec-gb-2.4.2.tar.bz2,
# stardict-ncce-ec-2.4.2.tar.bz2, stardict-xiangya-medical-2.4.2.tar.bz2
#
# If you want to use other dictionary you will add or remove parts of the code.
#
# Default is designed to remove the record of <Collins Cobuild English Dictionary>