How to Submit Another Page Form

Asked

Viewed 138 times

-1

I’m applying Javascript in the address bar, to redirect Youtube video URL to https://youtubegomp3.com/? u=coloque_aqui_url_Youtube download "MP3".

Ja on the Website https://youtubegomp3.com/, you need to click on the Button "Convert" to start the Conversion soon followed by the Download.

I’ve been analyzing Source Code page and noticed that to start the Conversion Youtube URL it passes to convert.php next download.php?id=.

In other words - He https://youtubegomp3.com/? u= Download the Youtube video URL -> to convert.php -> next download.php?id= to download the "MP3".

Doubt

It would be possible to move this whole process in an automated way to the script, without needing human intervention to click on the "Convert"?

Code

javascript:window.location.href='https://youtubegomp3.com/?u='+encodeURIComponent(location.href)+'&title'+encodeURIComponent(document.title);

1 answer

2

It is not allowed to execute scripts or gain access to HTML objects under a different domain.

For example, if you run a Javascript action from www.foo.bar to access elements of www.bar.foo, you will not succeed.

The reason is basic standards of security of navigation on the Internet.

One option to resolve is to make a direct request with a language like PHP. To do this, read the HTML code of the target page to know which parameters and URL to request.

Another recommended way is to find out if the target website provides any API, so before you start doing any tricks, look for an API (webservice).

  • OK! Always before developing and getting involved with Script I try to go straight to the footer of the Website in order to inform me if there is any (a) tool(s) for developer/webmaster. On the other hand, my doubt was covered with your explanation. ATT+

Browser other questions tagged

You are not signed in. Login or sign up in order to post.