Inspired by this tutorial I wanted to make MP4 downloader too
How code looks in the beggining
So I founded that site with MP4 API too. There is written how to make API link similar like above in script
How could look example link for this API
so how code looks for lolyyoutube downloader
as we can see button has no src attrib and I cant get link for this, its generated in Javascript and how to click that button?
Next is Recaptcha button too similar too this button
I tracked whats going on on and got something like that.
[Only registered and activated users can see links. Click Here To Register...]
how to click that captcha with autoit?
[Only registered and activated users can see links. Click Here To Register...]
see something here is like
and it click captcha i saw but it has to open IE
|
|
PHP Code:
#include <_httprequest.au3>
#include <string.au3>
$url = InputBox('YoububeToMp3','Type url video...')
if @error Then Exit
YoububeToMp3($url)
Func YoububeToMp3($url,$dir=@ScriptDir,$type='mp3')
$id = _StringBetween($url,'watch?v=','')[0]
$oIE = _httprequest(2,'https://www.download-mp3-youtube.com/api/?api_key=MzQ3NzQzNDYz&format='&$type&'&video_id='&$id)
$link = _StringBetween($oIE,'src="','"')[0]
$oIE = _httprequest(2,$link)
$name = _StringBetween($oIE,'<div class="buttonTitle">','</div>')[0]
$oIE =_StringBetween($oIE,'id="downloadButton" href="','"')[0]
$linkdowload = 'https://www.convertmp3.io'&$oIE
ProgressOn('', 'Downloading '&$name&'.'&$type, '0%')
Local $BinaryData = _HttpRequest(3, $linkdowload, '', '', '', '', '', ProgressFunc)
If @error Then
MsgBox(16,'Error',"Couldn't download file!!")
Exit
EndIf
ProgressOff()
_HttpRequest_Test($BinaryData, $dir & '\'&$name&'.'&$type,Default,False)
EndFunc
Func ProgressFunc($NowSize, $TotalSize)
$iPercent = Round(100 * $NowSize / $TotalSize, 2)
ProgressSet ($iPercent, $iPercent & '%', 'Downloading...' & Round($NowSize / (1024 ^ 2), 2) & 'Mb')
EndFunc
Code:
https://lolyoutube.com
Code:
https://lolyoutube.com/download/mp3/HLVjWH8deew/1537966320
PHP Code:
; make request for the link
$oIE = _httprequest(2,'https://lolyoutube.com/download/' & $format & '/' & $id & '/' & $timestamp)
; but there is no src attrib
$link = _StringBetween($oIE,'src="','"')[0] ; iframe button with src attribute
; so cant make http request to the link
$oIE = _httprequest(2,$link)
Next is Recaptcha button too similar too this button
I tracked whats going on on and got something like that.
[Only registered and activated users can see links. Click Here To Register...]
how to click that captcha with autoit?
[Only registered and activated users can see links. Click Here To Register...]
see something here is like
Code:
; Click on ReCaptcha checkbox
$idivs = _IETagNameGetCollection($iframe, 'div')
For $idiv In $idivs
If $idiv.classname = 'recaptcha-checkbox-checkmark' And $idiv.attributes.item('role').value="presentation" Then
$idiv.click()
EndIf
Next