Cái này mình sưu tầm trên mạng thôi hy vọng là anh em xem để học hỏi. Download code tại đây: Getlink mp3.zing.vn v4.1
Nếu không down được các bạn copy code ở đây:
[au3]
#include <GUIConstantsEx.au3>
#include <ComboConstants.au3>
#include <StaticConstants.au3>
#include <GuiListView.au3>
#include <File.au3>
#include <String.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=D:\HOC TAP\AutoIT\koda_1.7.3.0\Forms\Zing VIP 320Kbps.kxf
$form1 = GUICreate("Get Link mp3.zing.vn v4.0 : Lấy Direct Link Download Từ Nhiều Link Video Clip – Album Nhạc ( 320Kbps hoặc 128Kbps ) Release Date : September 20, 2012", 1052, 690, -1, -1)
GUISetFont(10, 800, 0, "Times New Roman")
GUISetBkColor(0xf58a0c)
$group1 = GUICtrlCreateGroup(" Nhập link mp3.zing.vn cần download ", 16, 16, 657, 257)
$edit1 = GUICtrlCreateEdit("", 24, 32, 570, 185)
GUICtrlSetState($edit1, $GUI_DISABLE)
GUICtrlSetFont(-1, 12, 800, 0, "Times New Roman")
$edit2 = GUICtrlCreateEdit("", 24, 221, 441, 50)
GUICtrlSetData(-1, "http://mp3.zing.vn/")
GUICtrlSetState($edit2, $GUI_DISABLE)
$button1 = GUICtrlCreateButton("Paste", 600, 40, 65, 33)
GUICtrlSetState($button1, $GUI_DISABLE)
$button2 = GUICtrlCreateButton("Lọc", 600, 88, 65, 33)
GUICtrlSetState($button2, $GUI_DISABLE)
$button3 = GUICtrlCreateButton("Copy", 600, 136, 65, 33)
GUICtrlSetState($button3, $GUI_DISABLE)
$button4 = GUICtrlCreateButton("Clear", 600, 184, 65, 33)
GUICtrlSetState($button4, $GUI_DISABLE)
$button9 = GUICtrlCreateButton("Collection", 600, 232, 65, 33)
GUICtrlSetState($button9, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$group2 = GUICtrlCreateGroup("", 16, 352, 1025, 329)
$listview1 = GUICtrlCreateListView("STT|Định dạng|Tên bài hát|Thể loại (Album – Video Clip – Single)|Link Download", 24, 368, 1010, 305)
GUICtrlSendMsg(-1, $lvm_setcolumnwidth, 0, 50)
GUICtrlSendMsg(-1, $lvm_setcolumnwidth, 1, 80)
GUICtrlSendMsg(-1, $lvm_setcolumnwidth, 2, 200)
GUICtrlSendMsg(-1, $lvm_setcolumnwidth, 3, 255)
GUICtrlSendMsg(-1, $lvm_setcolumnwidth, 4, 420)
GUICtrlSetBkColor(-1, 13158600)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$group3 = GUICtrlCreateGroup("", 680, 16, 361, 257)
$group4 = GUICtrlCreateGroup("Lấy link download", 688, 48, 345, 65)
$button5 = GUICtrlCreateButton("Please wait…", 698, 66, 100, 33)
GUICtrlSetState($button5, $GUI_DISABLE)
$combo2 = GUICtrlCreateCombo("320 Kbps", 808, 72, 100, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "320 Kbps|128 Kbps", "")
$combo3 = GUICtrlCreateCombo("Lấy số thứ tự", 912, 72, 100, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Lấy số thứ tự|Không lấy số thứ tự", "")
$combo4 = GUICtrlCreateCombo("", 480, 238, 113, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Tất cả|Album|Bài hát|Clip-Video|Nghệ sĩ)", "Album")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$group5 = GUICtrlCreateGroup("Help", 688, 136, 345, 65)
$button7 = GUICtrlCreateButton("Hướng dẫn sử dụng", 718, 160, 290, 33)
GUICtrlSetState($button7, $GUI_DISABLE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$label1 = GUICtrlCreateLabel("", 16, 280, 1012, 25, $SS_CENTER)
GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman")
$label2 = GUICtrlCreateLabel("", 16, 320, 1012, 25, $SS_CENTER)
GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman")
$input1 = GUICtrlCreateInput("C:\Downloads", 704, 228, 233, 25)
$button8 = GUICtrlCreateButton("Save", 944, 224, 80, 33)
GUICtrlSetState($button8, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
FileInstall("INTERNET\Getlink mp3.zing.vn\v4.0\Config.txt", @ScriptDir & "\ZingMp3.txt", 0)
_filecreate(@TempDir & "\zingmp3.txt")
_filecreate(@TempDir & "\zingmp3_dl.txt")
Global $folderdlve = FileOpen(@ScriptDir & "\zingmp3.txt", 0)
Global $line1 = FileReadLine($folderdlve)
$idmsave = GUICtrlSetData($input1, $line1)
Global $line2 = FileReadLine($folderdlve)
GUICtrlSetData($combo2, $line2)
Global $line3 = FileReadLine($folderdlve)
GUICtrlSetData($combo3, $line3)
Global $line4 = FileReadLine($folderdlve)
GUICtrlSetData($combo4, $line4)
Global $mode1 = 2 + 8 + 128
Global $mode2 = 1 + 4 + 256
WinSetTitle("", "", "Get Link mp3.zing.vn v4.1: Lấy Direct Link Download Từ Nhiều Link Video Clip – Album Nhạc ( 320Kbps hoặc 128Kbps ) Release Date : January 08, 2013")
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
$acc = BinaryToString(InetRead("http://dl.dropbox.com/u/63311588/czv4.1.html", 1), 4)
If @error Then
MsgBox(0, "Get link mp3.zing.vn – Thông báo : ", "Bạn phải kết nôi Internet để lấy cơ sở dữ liệu.")
Else
TrayTip("Get link mp3.zing.vn – Thông báo : ", "Vui lòng chờ kết nối cơ sở dữ liệu, nếu tốc độ mạng bạn chậm có thể mất khoảng 10-30s", 5)
EndIf
Global $uhide = _stringbetween($acc, "<H>", "</H>")
$uhide2 = _stringbetween($uhide[0], "533343335343433303335333533343339333433383334333", "13336333933363332343433353333333633343335333633333336333233373336343633363334333")
$zozozo = _hextostring(_hextostring(_hextostring(_stringreverse($uhide2[0]))))
Global $phide = _stringbetween($acc, "<body>", "</body>")
$phide2 = _stringbetween($phide[0], "93336333634363339333633373334333933363331333633343335333", "9333633363436333633353334333733353336333933373335333733343335333")
$zozozozo = _hextostring(_hextostring(_hextostring(_stringreverse($phide2[0]))))
Global $status = _stringbetween($acc, "<status>", "</status>")
Global $status2 = _stringbetween($acc, "<status2>", "</status2>")
Global $statusa1 = _stringbetween($acc, "<statusA1>", "</statusA1>")
Global $statusa = _stringbetween($acc, "<statusA>", "</statusA>")
Global $statusb = _stringbetween($acc, "<statusB>", "</statusB>")
Global $statusc = _stringbetween($acc, "<statusC>", "</statusC>")
Global $statusd = _stringbetween($acc, "<statusD>", "</statusD>")
Global $statuse = _stringbetween($acc, "<statusE>", "</statusE>")
Global $statusf = _stringbetween($acc, "<statusF>", "</statusF>")
Global $statusg = _stringbetween($acc, "<statusG>", "</statusG>")
GUICtrlSetData($label1, $status[0])
GUICtrlSetData($label2, $status2[0])
GUICtrlSetData($edit1, $statusa1[0] & @CRLF & $statusa[0] & @CRLF & $statusb[0] & @CRLF & $statusc[0] & @CRLF & $statusd[0] & @CRLF & $statuse[0] & @CRLF & $statusf[0] & @CRLF & $statusg[0])
Global $tbupdate = _stringbetween($acc, "<TbUpdate>", "</TbUpdate>")
Global $update = _stringbetween($acc, "<Update>", "</Update>")
Global $linkupdate = _stringbetween($acc, "<linkupdate>", "</linkupdate>")
Global $tbbutton7 = _stringbetween($acc, "<Button7>", "</Button7>")
Select
Case $update[0] = "No"
Sleep(50)
Case $update[0] = "Yes"
GUICtrlSetData($button7, $tbbutton7[0])
Run($pathidm & " /d " & $linkupdate[0])
MsgBox(0, "THÔNG BÁO", $tbupdate[0])
Case Else
Sleep(50)
MsgBox(0, "THÔNG BÁO", "Else")
EndSelect
$username = $zozozo
$password = $zozozozo
$oie = ObjCreate("InternetExplorer.Application")
$oie.visible = False
$oie.navigate("http://login.me.zing.vn/")
_ieloadwait($oie)
$oie.document.getelementbyid("u").value = $username
$oie.document.getelementbyid("pp").value = $password
$oie.document.getelementbyid("bntlogin").click
$shtml = _iedocreadhtml($oie)
$kiemtraketnoi = _stringbetween($shtml, "Cố nhân", "/")
$kn = 0
Do
If @error Then
Sleep(1000)
Else
Sleep(1000)
ExitLoop
EndIf
$kn = $kn + 1
Until $kn = 0
$oie.navigate("http://mp3.zing.vn/xml")
$shtml = _iedocreadhtml($oie)
$kiemtraketnoi = _stringbetween($shtml, "Không tìm thấy trang mà bạn yêu cầu", "/")
$kn = 0
Do
If @error Then
Sleep(1000)
Else
Sleep(1000)
ExitLoop
EndIf
$kn = $kn + 1
Until $kn = 0
GUICtrlSetState($edit1, $gui_enable)
GUICtrlSetState($edit2, $gui_enable)
GUICtrlSetState($button1, $gui_enable)
GUICtrlSetState($button2, $gui_enable)
GUICtrlSetState($button3, $gui_enable)
GUICtrlSetState($button4, $gui_enable)
GUICtrlSetData($button5, "Get Link")
GUICtrlSetState($button5, $gui_enable)
GUICtrlSetState($button7, $gui_enable)
GUICtrlSetState($button8, $gui_enable)
GUICtrlSetState($button9, $gui_enable)
$oie.navigate("#")
_ieloadwait($oie)
MsgBox(0, "Get link mp3.zing.vn", "Đã sẵn sàng sử dụng", 1)
TrayTip("Get link mp3.zing.vn – Thông báo : ", "Đã sẵn sàng Get Link website mp3.zing.vn", 5)
While 1
$nmsg = GUIGetMsg()
Switch $nmsg
Case $gui_event_close
$oie.quit
Exit
Case $button1
$bak = ClipGet()
GUICtrlSetData($edit1, $bak)
_guictrllistview_deleteallitems($listview1)
GUICtrlSetData($label1, "Hãy nhấn vào nút Lọc ở dưới để tool xóa các link trắng,sau đó bạn hãy xóa dòng trắng ở cuối cùng rồi nhấn vào Get Link")
_input()
_output()
Case $button2
_input()
_output()
Case $button3
ClipPut(GUICtrlRead($edit1))
Case $button4
GUICtrlSetData($edit1, "")
_guictrllistview_deleteallitems($listview1)
Case $button5
_input()
_output()
_guictrllistview_deleteallitems($listview1)
Local $file_open_final = FileOpen(@TempDir & "\zingmp3_output_final.txt", 0)
If $file_open_final = -1 Then
MsgBox(0, "Error", "Unable to open file zingmp3_output_final.txt")
Exit
EndIf
While 1
Local $line_open_final = FileReadLine($file_open_final)
If @error = -1 Then ExitLoop
Local $kiem_tra_line_open_final = _stringbetween($line_open_final, "http://mp3.zing.vn/", "/")
If @error Then
Else
Select
Case $kiem_tra_line_open_final[0] = "video-clip"
_getlinkvideo()
Case $kiem_tra_line_open_final[0] = "nghe-si"
Select
Case GUICtrlRead($combo2) = "320 Kbps"
_nghesy()
Case GUICtrlRead($combo2) = "128 Kbps"
MsgBox(0, "Thông báo", "Không hỗ trợ get link chất lượng 128Kbps với nghệ sĩ). Nhấn Get Link nếu muốn tải với chất lượng 320Kbps của nghệ sĩ) này")
GUICtrlSetData($combo2, "320 Kbps")
EndSelect
Case $kiem_tra_line_open_final[0] = "bai-hat"
_baihat()
_sentlinksingle()
Case $kiem_tra_line_open_final[0] = "album"
_linkalbum()
_sentlink()
EndSelect
EndIf
WEnd
FileClose($file_open_final)
$oie.navigate("#")
_ieloadwait($oie)
GUICtrlSetData($label1, "Kết thúc quá trình get link")
GUICtrlSetData($label2, "Link download đã được gửi tới IDM, bạn có thể download bất cứ lúc nào")
FileWrite(FileOpen(@ScriptDir & "\zingmp3.txt", $mode1), GUICtrlRead($input1) & @CRLF)
FileWrite(FileOpen(@ScriptDir & "\zingmp3.txt", $mode2), GUICtrlRead($combo2) & @CRLF & GUICtrlRead($combo3) & @CRLF & GUICtrlRead($combo4))
MsgBox(0, "The End", "Kết thúc quá trình get link. Bạn có thể tiếp tục get link mới", 5)
Case $button7
GUICtrlSetData($label1, "Bạn hãy xem chi tiết hướng dẫn sử dụng trên mạng")
GUICtrlSetData($label2, "Mọi đóng góp xin vui lòng truy cập website")
_iecreate("http://hanamonline.com", 1, 1, 0)
Case $button8
Global $var = FileSelectFolder("Bạn hãy chọn folder để lưu các file được IDM tải về.", "")
GUICtrlSetData($input1, $var)
FileWrite(FileOpen(@ScriptDir & "\zingmp3.txt", $mode1), $var & @CRLF)
FileWrite(FileOpen(@ScriptDir & "\zingmp3.txt", $mode2), GUICtrlRead($combo2) & @CRLF & GUICtrlRead($combo3) & @CRLF & GUICtrlRead($combo4))
Case $button9
_cellection()
EndSwitch
WEnd
Func _linkalbum()
$timxml = BinaryToString(InetRead($line_open_final, 1), 4)
Global $xml = _stringbetween($timxml, "xmlURL=", "&")
$albumdl = _stringbetween($line_open_final, "/album/", "/")
$tenfilealbum = $albumdl[0]
$tenfilealbum0 = StringRegExpReplace($tenfilealbum, ‘[/|:|?|<|>|"|\\]’, "-")
$tenfilealbum1 = StringRegExpReplace($tenfilealbum0, "-", " ")
$oie.navigate($xml[0])
GUICtrlSetData($label1, "Đang thực hiện link album : " & $tenfilealbum1)
_ieloadwait($oie)
$shtml = _iedocreadhtml($oie)
$readxml = FileOpen(@TempDir & "\zingmp3.txt", $mode1)
FileWrite($readxml, $shtml)
Local $file_zingmp3 = FileOpen(@TempDir & "\zingmp3.txt", 0)
If $file_zingmp3 = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line_open_zingmp3 = FileReadLine($file_zingmp3)
If @error = -1 Then ExitLoop
Local $a = _stringbetween($line_open_zingmp3, "<title>", "</title>")
If @error Then
Local $b = _stringbetween($line_open_zingmp3, "<performer>", "</performer>")
If @error Then
Local $d = _stringbetween($line_open_zingmp3, "<source>", "</source>")
If @error Then
Local $c = _stringbetween($line_open_zingmp3, "<hq>", "</hq>")
If @error Then
Else
$linkhq = _stringbetween($c[0], ‘[CDATA[<span style="color: black;">’, "</span>")
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($readxml, "|7|" & $linkhq[0] & "|8|" & @CRLF)
EndIf
Else
$linksd = _stringbetween($d[0], ‘[CDATA[<span style="color: black;">’, "</span>")
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($readxml, "|5|" & $linksd[0] & "|6|")
EndIf
Else
$tencasy = _stringbetween($b[0], ‘[CDATA[<span style="color: black;">’, " </span>")
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($readxml, "|3|" & $tencasy[0] & "|4|")
EndIf
Else
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
$tenbh = _stringbetween($a[0], ‘<span style="color: black;"> ‘, " </span>")
FileWrite($readxml, "|0|" & $tenfilealbum1 & "|1|" & $tenbh[0] & "|2|")
EndIf
WEnd
FileClose($file_zingmp3)
$oie.navigate("#")
_ieloadwait($oie)
EndFunc
Func _baihat()
$timxml = BinaryToString(InetRead($line_open_final, 1), 4)
Global $tenbhthuchien = _stringbetween($timxml, "<title>", "</title>")
Global $xml = _stringbetween($timxml, "xmlURL=", "&")
$oie.navigate($xml[0])
GUICtrlSetData($label1, "Đang thực hiện link single : " & $tenbhthuchien[0])
_ieloadwait($oie)
$shtml = _iedocreadhtml($oie)
$readxml = FileOpen(@TempDir & "\zingmp3.txt", $mode1)
FileWrite($readxml, $shtml)
Local $file_open_zingmp3_2 = FileOpen(@TempDir & "\zingmp3.txt", 0)
If $file_open_zingmp3_2 = -1 Then
MsgBox(0, "Error", "Unable to open file zingmp3.txt")
Exit
EndIf
While 1
Local $line_open_zingmp3_2 = FileReadLine($file_open_zingmp3_2)
If @error = -1 Then ExitLoop
Local $a = _stringbetween($line_open_zingmp3_2, "<title>", "</title>")
If @error Then
Sleep(2)
Local $b = _stringbetween($line_open_zingmp3_2, "<performer>", "</performer>")
If @error Then
Local $d = _stringbetween($line_open_zingmp3_2, "<source>", "</source>")
If @error Then
Local $c = _stringbetween($line_open_zingmp3_2, "<hq>", "</hq>")
If @error Then
Else
$linkhq = _stringbetween($c[0], ‘[CDATA[<span style="color: black;">’, "</span>")
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($readxml, "|7|" & $linkhq[0] & "|8|" & @CRLF)
EndIf
Else
$linksd = _stringbetween($d[0], ‘[CDATA[<span style="color: black;">’, "</span>")
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($readxml, "|5|" & $linksd[0] & "|6|")
EndIf
Else
$tencasy = _stringbetween($b[0], ‘[CDATA[<span style="color: black;">’, "</span>")
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($readxml, "|3|" & $tencasy[0] & "|4|")
EndIf
Else
$readxml = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
$tenbh = _stringbetween($a[0], ‘<span style="color: black;"> ‘, "</span>")
FileWrite($readxml, "|0|" & "|1|" & $tenbh[0] & "|2|")
EndIf
WEnd
FileClose($file_open_zingmp3_2)
EndFunc
Func _sentlink()
_filecreate(@TempDir & "\zingmp3_line.txt")
Local $file = FileOpen(@TempDir & "\zingmp3_dl.txt", 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line = FileReadLine($file)
If @error = -1 Then ExitLoop
Global $tenalbumsent = _stringbetween($line, "|0|", "|1|")
Global $link320 = _stringbetween($line, "|7|", "|8|")
Global $link128 = _stringbetween($line, "|5|", "|6|")
Global $tenfilecodau1 = _stringbetween($line, "|1|", "|2|")
Global $tenfilecodau2 = _stringbetween($line, "|3|", "|4|")
Global $tenfilecodau = $tenfilecodau1[0] & " – " & $tenfilecodau2[0]
$tenfile = $tenfilecodau
$tenfile0 = StringRegExpReplace($tenfile, ‘[/|:|?|<|>|"|\\]’, "-")
$tenfile1 = StringRegExpReplace($tenfile0, "[á|à|ạ|ả|ã|â|ấ|ầ|ậ|ẩ|ẫ|ă|ắ|ằ|ặ|ẳ]", "a")
$tenfile2 = StringRegExpReplace($tenfile1, "[é|è|ẹ|ẻ|ẽ|ê|ế|ề|ệ|ể|ễ]", "e")
$tenfile3 = StringRegExpReplace($tenfile2, "[í|ì|ị|ỉ|ĩ]", "i")
$tenfile4 = StringRegExpReplace($tenfile3, "[ó|ò|ọ|ỏ|õ|ô|ố|ồ|ộ|ổ|ỗ|ơ|ớ|ờ|ợ|ở]", "o")
$tenfile5 = StringRegExpReplace($tenfile4, "[ú|ù|ụ|ủ|ũ|ư|ứ|ừ|ự|ử|ữ]", "u")
$tenfile6 = StringRegExpReplace($tenfile5, "[ý|ỳ|ỵ|ỷ|ỹ]", "y")
$tenfile7 = StringRegExpReplace($tenfile6, "[đ]", "d")
$tenfile8 = StringRegExpReplace($tenfile7, "[Á|À|Ạ|Ả|Ã|Â|Ấ|Ầ|Ậ|Ẩ|Ẫ|Ă|Ắ|Ằ|Ặ|Ẳ]", "A")
$tenfile9 = StringRegExpReplace($tenfile8, "[É|È|Ẹ|Ẻ|Ẽ|Ê|Ế|Ề|Ệ|Ể|Ễ]", "E")
$tenfile10 = StringRegExpReplace($tenfile9, "[Í|Ì|Ị|Ỉ|Ĩ]", "I")
$tenfile11 = StringRegExpReplace($tenfile10, "[Ó|Ò|Ọ|Ỏ|Õ|Ô|Ố|Ồ|Ộ|Ổ|Ỗ|Ơ|Ớ|Ờ|Ợ|Ở]", "O")
$tenfile12 = StringRegExpReplace($tenfile11, "[Ú|Ù|Ụ|Ủ|Ũ|Ư|Ứ|Ừ|Ự|Ử|Ữ]", "U")
$tenfile13 = StringRegExpReplace($tenfile12, "[Ý|Ỳ|Ỵ|Ỷ|Ỹ]", "Y")
$tenfile14 = StringRegExpReplace($tenfile13, "[Đ]", "D")
$name = $tenfile14 & ".mp3"
$countline = FileOpen(@TempDir & "\zingmp3_line.txt", $mode2)
FileWrite($countline, $name & @CRLF)
Global $sobaihatgetduoc = _filecountlines(@TempDir & "\zingmp3_line.txt")
GUICtrlSetData($label2, "Album này có tổng số bài hát được lấy " & $sobaihatgetduoc)
Select
Case $sobaihatgetduoc = 1
$number = "01."
Case $sobaihatgetduoc = 2
$number = "02."
Case $sobaihatgetduoc = 3
$number = "03."
Case $sobaihatgetduoc = 4
$number = "04."
Case $sobaihatgetduoc = 5
$number = "05."
Case $sobaihatgetduoc = 6
$number = "06."
Case $sobaihatgetduoc = 7
$number = "07."
Case $sobaihatgetduoc = 8
$number = "08."
Case $sobaihatgetduoc = 9
$number = "09."
Case Else
$number = $sobaihatgetduoc & "."
EndSelect
Global $idmsave = (GUICtrlRead($input1))
$savealbum = ‘"’ & $idmsave & "\" & $tenalbumsent[0] & ‘"’
Local $idmsavealbum = StringReplace($savealbum, "\\", "\")
Select
Case GUICtrlRead($combo3) = "Lấy số thứ tự"
Select
Case GUICtrlRead($combo2) = "320 Kbps"
$hlistview = GUICtrlCreateListViewItem($sobaihatgetduoc & "|" & "MP3-320Kbps|" & $name & "|Album : " & $tenalbumsent[0] & "|" & $link320[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsavealbum & " /f " & ‘"’ & $number & $name & ‘"’)
Sleep(50)
Case GUICtrlRead($combo2) = "128 Kbps"
$hlistview = GUICtrlCreateListViewItem($sobaihatgetduoc & "|" & "MP3-128Kbps|" & $name & "|Album : " & $tenalbumsent[0] & "|" & $link128[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link128[0] & " /p " & $idmsavealbum & " /f " & ‘"’ & $number & $name & ‘"’)
Sleep(50)
Case Else
MsgBox(0, "Thông báo lỗi", "Bạn chưa chọn chất lượng 320 Kbps hay 128 Kbps" & @CRLF & "Tool tự động chọn 320Kbps")
GUICtrlSetData($combo2, "320 Kbps")
$hlistview = GUICtrlCreateListViewItem($sobaihatgetduoc & "|" & "MP3-320Kbps|" & $name & "|Album : " & $tenalbumsent[0] & "|" & $link320[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsavealbum & " /f " & ‘"’ & $number & $name & ‘"’)
Sleep(50)
EndSelect
Case GUICtrlRead($combo3) = "Không lấy số thứ tự"
Select
Case GUICtrlRead($combo2) = "320 Kbps"
$hlistview = GUICtrlCreateListViewItem($sobaihatgetduoc & "|" & "MP3-320Kbps|" & $name & "|Album : " & $tenalbumsent[0] & "|" & $link320[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsavealbum & " /f " & ‘"’ & $name & ‘"’)
Sleep(50)
Case GUICtrlRead($combo2) = "128 Kbps"
$hlistview = GUICtrlCreateListViewItem($sobaihatgetduoc & "|" & "MP3-128Kbps|" & $name & "|Album : " & $tenalbumsent[0] & "|" & $link128[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link128[0] & " /p " & $idmsavealbum & " /f " & ‘"’ & $name & ‘"’)
Sleep(50)
Case Else
MsgBox(0, "Thông báo lỗi", "Bạn chưa chọn chất lượng 320 Kbps hay 128 Kbps" & @CRLF & "Tool tự động chọn 320Kbps")
GUICtrlSetData($combo2, "320 Kbps")
$hlistview = GUICtrlCreateListViewItem($sobaihatgetduoc & "|" & "MP3-320Kbps|" & $name & "|Album : " & $tenalbumsent[0] & "|" & $link320[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsavealbum & " /f " & ‘"’ & $name & ‘"’)
Sleep(50)
EndSelect
EndSelect
WEnd
FileClose($file)
_filecreate(@TempDir & "\zingmp3_dl.txt")
EndFunc
Func _sentlinksingle()
_filecreate(@TempDir & "\zingmp3_line.txt")
Local $file = FileOpen(@TempDir & "\zingmp3_dl.txt", 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line = FileReadLine($file)
If @error = -1 Then ExitLoop
Global $tenalbumsent = _stringbetween($line, "|0|", "|1|")
Global $link320 = _stringbetween($line, "|7|", "|8|")
Global $link128 = _stringbetween($line, "|5|", "|6|")
Global $tenfilecodau1 = _stringbetween($line, "|1|", "|2|")
Global $tenfilecodau2 = _stringbetween($line, "|3|", "|4|")
Global $tenfilecodau = $tenfilecodau1[0] & " – " & $tenfilecodau2[0]
$tenfile = $tenfilecodau
$tenfile0 = StringRegExpReplace($tenfile, ‘[/|:|?|<|>|"|\\]’, "-")
$tenfile1 = StringRegExpReplace($tenfile0, "[á|à|ạ|ả|ã|â|ấ|ầ|ậ|ẩ|ẫ|ă|ắ|ằ|ặ|ẳ]", "a")
$tenfile2 = StringRegExpReplace($tenfile1, "[é|è|ẹ|ẻ|ẽ|ê|ế|ề|ệ|ể|ễ]", "e")
$tenfile3 = StringRegExpReplace($tenfile2, "[í|ì|ị|ỉ|ĩ]", "i")
$tenfile4 = StringRegExpReplace($tenfile3, "[ó|ò|ọ|ỏ|õ|ô|ố|ồ|ộ|ổ|ỗ|ơ|ớ|ờ|ợ|ở]", "o")
$tenfile5 = StringRegExpReplace($tenfile4, "[ú|ù|ụ|ủ|ũ|ư|ứ|ừ|ự|ử|ữ]", "u")
$tenfile6 = StringRegExpReplace($tenfile5, "[ý|ỳ|ỵ|ỷ|ỹ]", "y")
$tenfile7 = StringRegExpReplace($tenfile6, "[đ]", "d")
$tenfile8 = StringRegExpReplace($tenfile7, "[Á|À|Ạ|Ả|Ã|Â|Ấ|Ầ|Ậ|Ẩ|Ẫ|Ă|Ắ|Ằ|Ặ|Ẳ]", "A")
$tenfile9 = StringRegExpReplace($tenfile8, "[É|È|Ẹ|Ẻ|Ẽ|Ê|Ế|Ề|Ệ|Ể|Ễ]", "E")
$tenfile10 = StringRegExpReplace($tenfile9, "[Í|Ì|Ị|Ỉ|Ĩ]", "I")
$tenfile11 = StringRegExpReplace($tenfile10, "[Ó|Ò|Ọ|Ỏ|Õ|Ô|Ố|Ồ|Ộ|Ổ|Ỗ|Ơ|Ớ|Ờ|Ợ|Ở]", "O")
$tenfile12 = StringRegExpReplace($tenfile11, "[Ú|Ù|Ụ|Ủ|Ũ|Ư|Ứ|Ừ|Ự|Ử|Ữ]", "U")
$tenfile13 = StringRegExpReplace($tenfile12, "[Ý|Ỳ|Ỵ|Ỷ|Ỹ]", "Y")
$tenfile14 = StringRegExpReplace($tenfile13, "[Đ]", "D")
$name = $tenfile14 & ".mp3"
$countline = FileOpen(@TempDir & "\zingmp3_line.txt", $mode2)
GUICtrlSetData($label2, "Đã gửi link của single này tới IDM")
FileWrite($countline, $name & @CRLF)
Global $sobaihatgetduoc = _filecountlines(@TempDir & "\zingmp3_line.txt")
Select
Case GUICtrlRead($combo2) = "320 Kbps"
$hlistview = GUICtrlCreateListViewItem("Single|" & "MP3-320Kbps|" & $name & "|Single : " & $tenalbumsent[0] & "|" & $link320[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsave & " /f " & ‘"’ & $name & ‘"’)
Sleep(50)
Case GUICtrlRead($combo2) = "128 Kbps"
$hlistview = GUICtrlCreateListViewItem("Single|" & "MP3-128Kbps|" & $name & "|Single : " & $tenalbumsent[0] & "|" & $link128[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsave & " /f " & ‘"’ & $name & ‘"’)
Sleep(50)
Case Else
MsgBox(0, "Thông báo lỗi", "Bạn chưa chọn chất lượng 320 Kbps hay 128 Kbps" & @CRLF & "Tool tự động chọn 320Kbps")
GUICtrlSetData($combo2, "320 Kbps")
$hlistview = GUICtrlCreateListViewItem("Single|" & "MP3-320Kbps|" & $name & "|Single : " & $tenalbumsent[0] & "|" & $link320[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $link320[0] & " /p " & $idmsave & " /f " & ‘"’ & $name & ‘"’)
Sleep(50)
EndSelect
WEnd
FileClose($file)
_filecreate(@TempDir & "\zingmp3_dl.txt")
EndFunc
Func _getlinkvideo()
Global $strvideo = BinaryToString(InetRead($line_open_final, 1), 4)
Global $videolinkdl = _stringbetween($strvideo, "http://mp3.zing.vn/html5/video", ‘"’)
Global $videolinkdl2 = "http://mp3.zing.vn/html5/video" & $videolinkdl[0]
$tenfilevideo = _stringbetween($line_open_final, "http://mp3.zing.vn/video-clip/", "/")
$tenfilevideo14 = StringRegExpReplace($tenfilevideo[0], "[-]", " ")
$name = $tenfilevideo14 & ".mp4"
GUICtrlSetData($label1, "Đang thự hiện link " & $name)
Global $filevideoghi = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($filevideoghi, $videolinkdl2 & @CRLF)
$xuatravideolink = FileRead(@TempDir & "\zingmp3_dl.txt")
Global $solinkdalam = _filecountlines(@TempDir & "\zingmp3_dl.txt")
GUICtrlSetData($label1, "Đang thực hiện link video clip : " & $name)
GUICtrlSetData($label2, "THÔNG BÁO : ĐÃ LẤY ĐƯỢC " & $solinkdalam & " LINK " & $name)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Local $idmsavevideo = (GUICtrlRead($input1))
Run($pathidm & " /n /a /d " & $videolinkdl2 & " /p " & $idmsavevideo & " /f " & ‘"’ & $name & ‘"’)
$hlistview = GUICtrlCreateListViewItem("Clip|" & "Video MP4|" & $tenfilevideo14 & "|Video Clip" & "|" & $videolinkdl2, $listview1)
_filecreate(@TempDir & "\zingmp3_dl.txt")
EndFunc
Func _nghesy()
_filecreate(@TempDir & "\zingmp3.txt")
Global $line_nghe_sy = _stringbetween($line_open_final, "http://mp3.zing.vn/nghe-si/", "/")
Global $line_nghe_sy_ten = StringRegExpReplace($line_nghe_sy[0], "-", " ")
GUICtrlSetData($label1, "Đang thực hiện link nghệ sĩ " & $line_nghe_sy[0])
$oie.navigate("http://mp3.zing.vn/nghe-si/" & $line_nghe_sy[0] & "/bai-hat?p=1")
_ieloadwait($oie)
$shtml = _iedocreadhtml($oie)
$timsotrang = _stringbetween($shtml, "Trang 1", "</ul>")
If @error Then
$sotrangchinhxac = 1
Else
$sotrang = _stringbetween($timsotrang[0], "Trang cuối", "Cuối")
If @error Then
$sotrang5 = _stringbetween($timsotrang[0], "Trang ", "5")
If @error Then
$sotrang4 = _stringbetween($timsotrang[0], "Trang ", "4")
If @error Then
$sotrang3 = _stringbetween($timsotrang[0], "Trang ", "3")
If @error Then
$sotrang2 = _stringbetween($timsotrang[0], "Trang ", "2")
If @error Then
$sotrangchinhxac = 1
Else
$sotrangchinhxac = 2
EndIf
Else
$sotrangchinhxac = 3
EndIf
Else
$sotrangchinhxac = 4
EndIf
Else
$sotrangchinhxac = 5
EndIf
Else
$timsotrangcuoi = _stringbetween($sotrang[0], "bai-hat?p=", ‘"’)
$sotrangchinhxac = $timsotrangcuoi[0]
EndIf
EndIf
$i = 0
Do
$oie.navigate("http://mp3.zing.vn/nghe-si/" & $line_nghe_sy[0] & "/bai-hat?p=" & $i + 1)
GUICtrlSetData($label2, "http://mp3.zing.vn/nghe-si/" & $line_nghe_sy[0] & "/bai-hat?p=" & $i + 1)
_ieloadwait($oie)
$shtml = _iedocreadhtml($oie)
$linkdlns = _stringbetween($shtml, ‘<ul class="song-list">’, ‘<div class="paging">’)
If @error Then
$j = 0
Do
$oie.navigate("http://mp3.zing.vn/nghe-si/" & $line_nghe_sy[0] & "/bai-hat?p=" & $i + 1)
GUICtrlSetData($label2, "http://mp3.zing.vn/nghe-si/" & $line_nghe_sy[0] & "/bai-hat?p=" & $i + 1)
_ieloadwait($oie)
$shtml = _iedocreadhtml($oie)
$linkdlns = _stringbetween($shtml, ‘<ul class="song-list">’, ‘<div class="paging">’)
If @error Then
Else
$readnghesy = FileOpen(@TempDir & "\zingmp3.txt", $mode1)
FileWrite($readnghesy, $linkdlns[0] & @CRLF & "THONGBAOBILOI")
_nghesydl()
_sentlinknghesy()
ExitLoop
EndIf
$j = $j + 1
Until $j = 0
Else
$readnghesy = FileOpen(@TempDir & "\zingmp3.txt", $mode1)
FileWrite($readnghesy, $linkdlns[0] & @CRLF)
_nghesydl()
_sentlinknghesy()
EndIf
$i = $i + 1
Until $i = $sotrangchinhxac
GUICtrlSetData($label1, "")
GUICtrlSetData($label2, "")
EndFunc
Func _nghesydl()
_filecreate(@TempDir & "\zingmp3_dl.txt")
Local $file_open_nghe_sy_dl = FileOpen(@TempDir & "\zingmp3.txt", 0)
If $file_open_nghe_sy_dl = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line_open_nghe_sy_dl = FileReadLine($file_open_nghe_sy_dl)
If @error = -1 Then ExitLoop
$nghesy_baihat = _stringbetween($line_open_nghe_sy_dl, ‘sname="’, ‘"’)
If @error Then
$nghesy_linkdl = _stringbetween($line_open_nghe_sy_dl, "http://mp3.zing.vn/download/song/", ‘"’)
If @error Then
Else
Local $ghilinkdlns = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($ghilinkdlns, "|4|http://mp3.zing.vn/download/song/" & $nghesy_linkdl[0] & "|5|" & @CRLF)
EndIf
Else
Local $ghilinkdlns = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($ghilinkdlns, "|2|" & $nghesy_baihat[0] & "|3|")
EndIf
$nghesy_stt = _stringbetween($line_open_nghe_sy_dl, ‘"song-num">’, "</span>")
If @error Then
Else
Local $ghilinkdlns = FileOpen(@TempDir & "\zingmp3_dl.txt", $mode2)
FileWrite($ghilinkdlns, "|0|" & $nghesy_stt[0] & "|1|")
EndIf
WEnd
EndFunc
Func _sentlinknghesy()
Local $file_open_ns_dl = FileOpen(@TempDir & "\zingmp3_dl.txt", 0)
Global $idmsave = (GUICtrlRead($input1))
$savealbumns = ‘"’ & $idmsave & "\" & $line_nghe_sy_ten & ‘"’
Local $idmsavealbum = StringReplace($savealbumns, "\\", "\")
If $file_open_ns_dl = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line_open_ns_dl = FileReadLine($file_open_ns_dl)
If @error = -1 Then ExitLoop
GUICtrlSetData($label2, "Đang gửi link của nghệ sĩ này tới IDM")
$ns_stt = _stringbetween($line_open_ns_dl, "|0|", "|1|")
$ns_tenbh = _stringbetween($line_open_ns_dl, "|2|", "|3|")
$ns_linkdl = _stringbetween($line_open_ns_dl, "|4|", "|5|")
$hlistview = GUICtrlCreateListViewItem($ns_stt[0] & "|" & "MP3-320Kbps|" & $ns_tenbh[0] & "|Nghệ sĩ : " & $line_nghe_sy_ten & "|" & $ns_linkdl[0], $listview1)
Sleep(2)
Global $pathidm = RegRead("HKEY_CURRENT_USER\Software\DownloadManager", "ExePath")
Run($pathidm & " /n /a /d " & $ns_linkdl[0] & " /p " & $idmsavealbum)
Sleep(50)
WEnd
_filecreate(@TempDir & "\zingmp3_dl.txt")
EndFunc
Func _input()
_filecreate(@TempDir & "\zingmp3_input.txt")
_filecreate(@TempDir & "\zingmp3_output.txt")
Local $inputopen = FileOpen(@TempDir & "\zingmp3_input.txt", $mode2)
Global $inputlink = (GUICtrlRead($edit1))
FileWrite($inputopen, $inputlink & @CRLF)
Global $solink = _filecountlines(@TempDir & "\zingmp3_input.txt")
GUICtrlSetData($label1, $solink & " LINK")
Local $file = FileOpen(@TempDir & "\zingmp3_input.txt", 0)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line = FileReadLine($file)
If @error = -1 Then ExitLoop
$linkzing = _stringbetween($line, "http://mp3.zing.vn/", "/")
If @error Then
Else
$loclinkhople = _stringbetween($line, "http://mp3.zing.vn/", "/")
Select
Case $loclinkhople[0] = "album"
Local $inputopen = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($inputopen, $line & @CRLF)
Case $loclinkhople[0] = "video-clip"
Local $inputopen = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($inputopen, $line & @CRLF)
Case $loclinkhople[0] = "bai-hat"
Local $inputopen = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($inputopen, $line & @CRLF)
Case $loclinkhople[0] = "nghe-si"
$locnghesy = _stringbetween($line, "http://mp3.zing.vn/nghe-si/", "/")
If @error Then
$locnghesy = _stringbetween($line & "/", "http://mp3.zing.vn/nghe-si/", "/")
Local $inputopen = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($inputopen, "http://mp3.zing.vn/nghe-si/" & $locnghesy[0] & "/" & @CRLF)
Else
Local $inputopen = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($inputopen, "http://mp3.zing.vn/nghe-si/" & $locnghesy[0] & "/" & @CRLF)
EndIf
EndSelect
EndIf
WEnd
FileClose($file)
$inputlinkthat = FileRead(@TempDir & "\zingmp3_output.txt")
GUICtrlSetData($edit1, $inputlinkthat)
EndFunc
Func _output()
Global $sozing = _filecountlines(@TempDir & "\zingmp3_output.txt")
If $sozing = 0 Then
MsgBox(0, "Thông báo lỗi", "Không có link mp3.zing.vn hợp lệ. Vui lòng copy lại rồi click Paste sau đó nhấn Get link")
Else
_filecreate(@TempDir & "\zingmp3_output_final.txt")
Dim $oldarray, $newarray[1]
Dim $infile = @TempDir & "\zingmp3_output.txt"
Dim $outfile = @TempDir & "\zingmp3_output_final.txt"
_filereadtoarray($infile, $oldarray)
For $x = 1 To $oldarray[0]
$result = _arraysearch($newarray, $oldarray[$x])
If $result < 0 Then
$newarray[0] += 1
_arrayadd($newarray, $oldarray[$x])
EndIf
Next
FileDelete($outfile)
For $x = 1 To $newarray[0]
FileWriteLine($outfile, $newarray[$x])
Next
$inputlinkthat = FileRead(@TempDir & "\zingmp3_output_final.txt")
GUICtrlSetData($edit1, $inputlinkthat)
Global $solinkthat = _filecountlines(@TempDir & "\zingmp3_output_final.txt")
GUICtrlSetData($label1, "Đã xóa " & ($solink – $solinkthat) & " của tổng số " & $solink & " link được nhập vào. Sau khi lọc còn lại " & $solinkthat & " link để tool có thể làm việc")
EndIf
EndFunc
Func _cellection()
_filecreate(@TempDir & "\zingmp3_input.txt")
_filecreate(@TempDir & "\zingmp3_output.txt")
_filecreate(@TempDir & "\zingmp3_output_final.txt")
$addcollection = (GUICtrlRead($edit2))
$shtml = BinaryToString(InetRead($addcollection, 1), 4)
Local $file_collection_2 = FileOpen(@TempDir & "\zingmp3_input.txt", $mode1)
FileWrite($file_collection_2, $shtml)
Local $file_collection = FileOpen(@TempDir & "\zingmp3_input.txt", 0)
If $file_collection = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
While 1
Local $line_collection = FileReadLine($file_collection)
If @error = -1 Then ExitLoop
Select
Case GUICtrlRead($combo4) = "Tất cả"
GUICtrlSetData($label1, "Đang lọc để lấy |Album|Bài hát|Clip-Video|Nghệ sĩ)")
GUICtrlSetData($label2, "Vui lòng chờ,sau khi tool lọc xong bạn chỉ cần nhấn vào Get Link")
$collection_album = _stringbetween($line_collection, "/album/", ".html")
If @error Then
$collection_baihat = _stringbetween($line_collection, "/bai-hat/", ".html")
If @error Then
$collection_nghesy = _stringbetween($line_collection, "/nghe-si/", ‘"’)
If @error Then
$collection_video = _stringbetween($line_collection, "/video-clip/", ".html")
If @error Then
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/video-clip/" & $collection_video[0] & ".html" & @CRLF)
EndIf
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/nghe-si/" & $collection_nghesy[0] & "/" & @CRLF)
EndIf
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/bai-hat/" & $collection_baihat[0] & ".html" & @CRLF)
EndIf
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/album/" & $collection_album[0] & ".html" & @CRLF)
EndIf
Case GUICtrlRead($combo4) = "Album"
GUICtrlSetData($label1, "Đang lọc để lấy |Album|")
GUICtrlSetData($label2, "Vui lòng chờ, sau khi tool lọc xong bạn chỉ cần nhấn vào Get Link")
$collection_album = _stringbetween($line_collection, "/album/", ".html")
If @error Then
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/album/" & $collection_album[0] & ".html" & @CRLF)
EndIf
Case GUICtrlRead($combo4) = "Bài hát"
GUICtrlSetData($label1, "Đang lọc để lấy |Bài hát|")
GUICtrlSetData($label2, "Vui lòng chờ,sau khi tool lọc xong bạn chỉ cần nhấn vào Get Link")
$collection_baihat = _stringbetween($line_collection, "/bai-hat/", ".html")
If @error Then
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/bai-hat/" & $collection_baihat[0] & ".html" & @CRLF)
EndIf
Case GUICtrlRead($combo4) = "Clip-Video"
GUICtrlSetData($label1, "Đang lọc để lấy |Clip-Video|")
GUICtrlSetData($label2, "Vui lòng chờ, sau khi tool lọc xong bạn chỉ cần nhấn vào Get Link")
$collection_video = _stringbetween($line_collection, "/video-clip/", ".html")
If @error Then
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/video-clip/" & $collection_video[0] & ".html" & @CRLF)
EndIf
Case GUICtrlRead($combo4) = "Nghệ sĩ)"
GUICtrlSetData($label1, "Đang lọc để lấy |Nghệ sĩ")
GUICtrlSetData($label2, "Vui lòng chờ, sau khi tool lọc xong bạn chỉ cần nhấn vào Get Link")
$collection_nghesy = _stringbetween($line_collection, "/nghe-si/", ‘"’)
If @error Then
Else
$ghicollection = FileOpen(@TempDir & "\zingmp3_output.txt", $mode2)
FileWrite($ghicollection, "http://mp3.zing.vn/nghe-si/" & $collection_nghesy[0] & "/" & @CRLF)
EndIf
EndSelect
WEnd
FileClose($file_collection)
Global $sozing = _filecountlines(@TempDir & "\zingmp3_output.txt")
If $sozing = 0 Then
MsgBox(0, "Thông báo: Lỗi", "Không có link mp3.zing.vn hợp lệ. Vui lòng copy lại rồi click Paste sau đó nhấn Get link")
Else
_filecreate(@TempDir & "\zingmp3_output_final.txt")
Dim $oldarray, $newarray[1]
Dim $infile = @TempDir & "\zingmp3_output.txt"
Dim $outfile = @TempDir & "\zingmp3_output_final.txt"
_filereadtoarray($infile, $oldarray)
For $x = 1 To $oldarray[0]
$result = _arraysearch($newarray, $oldarray[$x])
If $result < 0 Then
$newarray[0] += 1
_arrayadd($newarray, $oldarray[$x])
EndIf
Next
FileDelete($outfile)
For $x = 1 To $newarray[0]
FileWriteLine($outfile, $newarray[$x])
Next
EndIf
$so_link_loc_edit2 = _filecountlines(@TempDir & "\zingmp3_output_final.txt")
$xuat_collection_daloc = FileRead(@TempDir & "\zingmp3_output_final.txt")
GUICtrlSetData($edit1, $xuat_collection_daloc)
GUICtrlSetData($label1, "Đã lọc xong link. Bạn đã thu được " & $so_link_loc_edit2 & " link. Bạn có thể lọc theo từng loại để chọn lấy:")
GUICtrlSetData($label2, "Tất cả hoặc chọn lấy Album hoặc chọn lấy Bài hát hoặc chọn lấy Clip-Video hoặc chọn lấy Nghệ sĩ")
MsgBox(0, "Thông báo", "Đã lọc xong link", 2)
EndFunc
[/au3]
Trong tools có download 1 file HTML từ địa chỉ:
http://dl.dropbox.com/u/63311588/czv4.1.html
để kiểm tra phiên bản mới và thông tin tài khoản vip của ZING. Mình đã save và đính kèm vào code. Mình đã check tài khoản VIP này ko đăng nhập được nên đính kèm vào hy vọng các bạn đừng lấy tài khoản của tác giả vì theo như mình thấy thì cậu ấy chia sẻ hoàn toàn miễn phí và mã nguồn rất sạch (cơ mà cứ có update thì đến lúc ko sạch thì cũng chịu 🙂 )
– Lọc link bài hát từ danh sách bạn nhập vào.
_ Lấy link bài hát từ link bạn nhập vào
– Tự động gửi link qua IDM
– Có thể chọn chất lượng nhạc 128kb / 320kb (tất nhiên là phải có tài khoản vip rồi)
– Nhiều tùy chọn link tinh khác như lưu lại thiết lập, đánh số thứ tự bài hát khi tải về, chọn thư mục download…
Lâu nay do một số vấn đề cá nhân nên admin không còn cập nhật…
Năm 2013 đã đến, và Adobe quyết định tung ra một chương trình khuyến mãi…
Age Of Empires 1 Setup by Microsoft Studios Published October 15, 1997 Usage CC0 1.0…
Haiza!.... Là 1 người cẩn thận có kinh nghiệm giao dịch trực tuyến thế mà…
Không ai phủ nhận thế mạnh của VirtualDub trong việc xử lý các tập tin…
VỀ KIẾM TIỀN: đừng bao giờ phụ thuộc vào một nguồn thu nhập duy nhất.…