Пример #1
0
def select(song,album,singer) :
	url = "http://music.yahoo.cn/s?q=%s" % song	#搜索歌曲,汉字及日本字符需要转码
	urlhandle = urllib.urlopen(url)
	linklist = []

	for csong,csinger,calbum,downlink in capture(urlhandle) :
		distinction = compare(csong,song)+compare(calbum,album)+compare(csinger,singer) 
		linklist.append((distinction,downlink))
	return linklist
Пример #2
0
def select(song,album,singer) :
	url = "http://mp3.sogou.com/music.so?query=%s" % song.decode('utf-8').encode('GBK')	#搜索歌曲,汉字及日本字符需要转码
	urlhandle = urllib.urlopen(url)
	linklist = []

	for csong,csinger,calbum,downlink in capture(urlhandle) :
		distinction = compare(csong,song)+compare(calbum,album)+compare(csinger,singer) 
		linklist.append((distinction,downlink))
	return linklist
Пример #3
0
def select(song, album, singer):
    url = "http://music.yahoo.cn/s?q=%s" % song  #搜索歌曲,汉字及日本字符需要转码
    urlhandle = urllib.urlopen(url)
    linklist = []

    for csong, csinger, calbum, downlink in capture(urlhandle):
        distinction = compare(csong, song) + compare(calbum, album) + compare(
            csinger, singer)
        linklist.append((distinction, downlink))
    return linklist
Пример #4
0
def select(song, album, singer):
    url = "http://mp3.sogou.com/music.so?query=%s" % song.decode(
        'utf-8').encode('GBK')  #搜索歌曲,汉字及日本字符需要转码
    urlhandle = urllib.urlopen(url)
    linklist = []

    for csong, csinger, calbum, downlink in capture(urlhandle):
        distinction = compare(csong, song) + compare(calbum, album) + compare(
            csinger, singer)
        linklist.append((distinction, downlink))
    return linklist
Пример #5
0
def call_appropriate_func(args):
    assert_only_one_arg(
        args, {"ted", "tos", "hted", "filter", "remove-duplicates", "compare"})

    #/!\ Dirty
    # When the list of input contain only one arg, pass only this arg
    if len(args.input) == 1:
        args.input = args.input[0]

    if args.ted:
        assert_args(args, {"input", "output", "start-date", "end-date"})
        ted(args.input, args.output, args.start_date, args.end_date)
    elif args.tos:
        assert_args(args, {"input", "output", "start-date", "end-date"})
        tos(args.input, args.output, args.start_date, args.end_date)
    elif args.hted:
        assert_args(args,
                    {"input", "output", "start-date", "end-date", "parc"})
        histo_ted(args.input, args.output, args.start_date, args.end_date,
                  args.parc)
    elif args.extract_driver_ndsi:
        assert_args(args, {"input", "output"})
        extract_driver_ndsi(args.input, args.output)
    elif args.filter:
        assert_args(args, {"input", "output"})
        filter_equipments(args.input, args.output, args.filter)
    elif args.remove_duplicates:
        assert_args(args, {"input", "output"})
        remove_duplicates(args.input, args.output)
    elif args.compare:
        assert_args(args, {"input", "output", "start-date", "end-date"})
        compare(args.input, args.output, args.start_date, args.end_date)
    elif args.ated:
        assert_args(args, {"input", "output", "start-date", "end-date"})
        audace_ted(args.input, args.output, args.start_date, args.end_date)
    elif args.atos:
        assert_args(args, {"input", "output", "start-date", "end-date"})
        audace_tos(args.input, args.output, args.start_date, args.end_date)
    elif args.merge_histo_ted:
        assert_args(args, {"input", "output"})
        merge_files(args.output, args.input)
    elif args.xlsx:
        assert_args(args, {"input", "output"})
        tosted_to_xlsx(args.input, args.output)
import pygments
from pygments import lexers
from Compare import compare
from Decompile import decompile

if __name__ == '__main__':

    action = input(
        "(1) Dekompiliranje\n(2) Usporedivanje datoteka\nOdaberite 1 ili 2: ")
    while action not in ["1", "2"]:
        # action = input("(1) Dekompiliranje\n(2) Usporedivanje datoteka")
        action = input(
            "(1) Dekompiliranje\n(2) Usporedivanje datoteka\nOdaberite 1 ili 2: "
        )

    if action == "1":
        decompile()
    elif action == "2":
        compare()