0

I'm trying to convert YouTube videos to mp3 (for personal use) and for that, I'm using the following converter https://www.yt2mp3s.me The problem is that I cannot get generated download link as the HTML output doesn't contain this links but when I'm looking the page Inspect all the links are visible.

Dear Friends, can anyone clarify how to get this links from Inspect?

Request example: https://www.yt2mp3s.me/@api/button/mp3/XY7tjffiAbc

Generated Output: enter image description here

Stuti Kasliwal
  • 771
  • 9
  • 20
Petros Mosoyan
  • 238
  • 2
  • 15

1 Answers1

1

The links are generated on the fly by the javascript functions, in order to hide them.
If you want to automate the process, you need the html version after the javascript code was run. The "easiest" way I know is to use an headless browser, and get the generated output.
There may not be one available now on android, but look at the way it was done on Android Web Scraping with a Headless Browser with WebView.
For your small page size the headless browser they talk about may work too...
By the way, on PC there are plenty of headless browsers or you could automate the calls to the browser, maybe with the help of the "Save Page WE" add-on of Firefox that allows to save the processed page, not the sources.

B. Go
  • 1,436
  • 4
  • 15
  • 22