1. estension yt_embed_fix_for_CM :
--[[ <HCExtension>
@name yt_embed_fix_for_CM
@author noscar
@version 1.0
@description change the content type
@event AnswerHeaderReceived/answer
@rule youtube.com/get_video_info?
</HCExtension> ]]
function answer()
hc.answer_header = re.replace(hc.answer_header, "Content-Type: application/x-www-form-urlencoded", "Content-Type: text/html")
hc.monitor_string = hc.monitor_string..'ct4cm'
end
2. gunakan content master di bawah ini :
## REPLACEMENTS
youtube\.com/watch\?#~#(url":\s")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch.*?\.swf)(.*?)("auto")(.*?)(url_v9as2":\s"(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf))#~#\1\7\3"small"\5\6
youtube\.com/watch\?#~#(url":\s")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch.*?\.swf)(.*?)(url_v9as2":\s"(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf))(.*?)("auto")#~#\1\5\3\4\6"small"
youtube\.com/watch\?#~#(url_v9as2":\s"(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf))(.*?)(url":\s")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch.*?\.swf)(.*?)("auto")#~#\1\3\4\2\6"small"
youtube\.com/watch\?#~#(url_v9as2":\s"(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf))(.*?)("auto")(.*?)(url":\s")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch.*?\.swf)#~#\1\3"small"\5\6\2
youtube\.com/watch\?#~#("auto")(.*?)(url_v9as2":\s"(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf))(.*?)(url":\s")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch.*?\.swf)#~#"small"\2\3\5\6\4
youtube\.com/watch\?#~#("auto")(.*?)(url":\s")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch.*?\.swf)(.*?)(url_v9as2":\s"(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf))#~#"small"\2\3\7\5\6
youtube\.com/embed#~#("url\_v9as2":.*?")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf)(.*?url":.*?")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch\_.*?\.swf)#~#\1\2\3\2
youtube\.com/embed#~#(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/watch\_.*?\.swf)(.*?url\_v9as2":.*?")(http:\\/\\/s\.ytimg\.com\\/yts\\/swfbin\\/.*?\.swf)#~#\3\2\3
3. Tambahkan ekstension berikut ;
--[[ <HCExtension>
@name Youtube Saver
@author bdstd
@version 1.0.1
@rule ^.*youtube\.com/videoplayback\?.*
@event AnswerHeaderReceived/save
@event URLToFileNameConverting/convert
@event RequestHeaderReceived/block
</HCExtension> ]]
function save()
local pyt = re.match(hc.url, [[^.*youtube\.com/videoplayback\?.*]])
if pyt then
local dsv = re.find(hc.url, [[begin=.*(?!0)]])
local dsv2 = re.find(hc.answer_header, [[^HTTP/1.+302.+Found]])
local prt206 = re.find(hc.answer_header, [[^HTTP/1.+206.+Partial.+Content]])
if not prt206 and not dsv and not dsv2 then
hc.action = 'save'
hc.monitor_string = 'Saving'
end
end
end
function convert()
local pyt = re.match(hc.url, [[^.*youtube\.com/videoplayback\?.*]])
if pyt then
local id = re.find(hc.url, [[id=[^&]+]])
local itag = re.find(hc.url, [[itag=[^&]+]])
local rg = re.find(hc.url, [[range=[^&]+]])
if id and itag then
cache_file_iditag = hc.cache_path ..'youtube.com\\videoplayback^\\'..id..itag..'.flv'
hc.preform_cache_file_name(cache_file_iditag)
hc.monitor_string = 'YT-Non-Range-Converted'
end
if id and itag and rg then
cache_file_iditagrg = hc.cache_path ..'youtube.com\\videoplayback^\\'..id..'\\'..itag..rg
hc.preform_cache_file_name(cache_file_iditagrg)
hc.monitor_string = 'YT-Range-Converted'
end
end
end
function block()
local pyt = re.match(hc.url, [[^.*youtube\.com/videoplayback\?.*]])
if pyt then
local itagx = re.find(hc.url, [[itag=(.{1}|.{2})\&]])
local rangex = re.find(hc.url, [[range=[^&]+]])
if itagx and rangex then
hc.action = 'stop'
hc.monitor_string = 'Blocked By Extension'
end
end
end
4. Tambahkan whitlist berikut untuk menghindari looping
#10#~#True#~#^.*youtube.com/v/.*?version=2#~##~##~#False#~#False#~#False#~#False#~#True#~#False
5. Tambahkan rule berikut agar dapat autoplay :
#5#~#True#~#(^.*youtube.com/v/.*\?)(.*)#~#\1&version=2&autoplay=1#~#False#~#True
6. Semoga bermanfaat
mohon informasi... yang ##REPLACEMENT itu nanti di masukan kemnaa
BalasHapus