17

Some sites like The Free Dictionary, and many other translation and pronunciation services, offers a little icon next to the word so you could hear its pronunciation.

How can I figure out the source for an audio\video embedded file on a webpage? Where do I start?

0

4 Answers 4

12

When you create a website and you embed images, videos, audio, javascript or other external sources, you specify their location by an own URL too.

For example you have this directory structure on your server, which resolves to the following accessible URLs (asuming your website is www.example.com):

|-- /index.html                ->  www.example.com/index.html
|-- /images/                   ->  www.example.com/images/
|    |-- /banner.png           ->  www.example.com/images/banner.png
|    +-- /icons/               ->  www.example.com/icons/
|         +-- favicon.png      ->  www.example.com/icons/favicon.png
+-- /audio/                    ->  www.example.com/audio/
    |-- intro.mp3              ->  www.example.com/audio/intro.mp3
    +-- voice.flac             ->  www.example.com/audio/voice.flac

When you access index.html your browser will look for all the other embedded URLs and will get them from the server too. You can use tools like Firebug for Firefox or the Chrome Developer Console to capture the requests. One of those requests should be the URL to the media file.

If you have an HTML <embed> tag (or a <img> tag), the URL to that media is specified by the src attribute, which can be also examined with tools like Firebug or the Chrome Developer Console. You can make a rightclick->Inspect Element anywhere on the page and examine the HTML.

<embed src="/audio/intro.mp3">   -> www.example.com/audio/intro.mp3
2
  • 3
    Yes, in Chrome or IE you can press F12 to bring up the Developer Tools window (in Firefox as well if you have Firebug installed). In the Developer Tools window, go to the Network view, click on the speaker icon on the target page, and for the example you posted above you'll see the following URL appear in the list of requests in the Network view: img.tfd.com/hm/mp3/H0004900.mp3 Commented Jun 25, 2013 at 21:59
  • 1
    An alternative is to go to the Elements view in the Developer Tools window, select the speaker icon on the page for inspection, and you'll see in the Elements view: <embed src="http://img.tfd.com/m/sound.swf" flashvars="sound_src=http://img.tfd.com/hm/mp3/H0004900.mp3"... Commented Jun 25, 2013 at 22:01
13

Another way to find url with audio file is check get requests by Developer Tools in Chrome browser:

enter image description here

3
  • Which browser are you using?
    – Karlo
    Commented Mar 26, 2018 at 12:11
  • 1
    Chrome browser.
    – 0x8BADF00D
    Commented Mar 27, 2018 at 15:50
  • Of particular note there is the "Copy as cURL", which will give you the full curl command to exactly reproduce the HTTP request. This can be helpful if the site checks user agents / referers / cookies etc. Commented Mar 27, 2018 at 23:10
2

Nowadays webpages commonly uses players written with Javascript, so you need a little html and js knowledge to dig out and use some web development tools like others mentioned

But there is an easier way of doing this. You can just use an app like Internet Download Manager (IDM) which offers to download any kind of multimedia file on playing on a browser. It supports all audio video playing websites like Youtube, Grooveshark etc. Its shareware but you can make this operation with trial version too.

Install the application and restart your browser. It supports Firefox, Chrome, Opera, IE, Safari etc.

When you play the file on the page you will see an icon on the left top of the window

Download Audio

After you click icon you will see the download file info window which has file url and other information. You can copy and use file name part of the url. Usually it has a pattern and you can guess or find paths of other files.

Download File Info Dialog

1
  • 1
    Thank you so much accfews. Your answer was perfect. That freeware is so simple to use. As soon as i play a track, the window automatically pops up asking if i want to download the audio track. Thanks heaps as I had no luck digging through js code in inspect.
    – Colin
    Commented Jan 6, 2021 at 6:53
-1

Developer console.,

Once you open your internet go to the settings and to find developer console. What ever is on the page will be provided in the source code. You just have to find it. Some sites block this info from viewers being able to see the things like location, dates, times. But depending on what site you're visiting you may be able to find this information. As long as the site isn't high security, like government or porn..... You should be able to find the original links and everything else to be honest. You will be surprised at the amount of information that can be pulled from this. If you ask me, This is the smartest and most simplistic way to do it. You don't have to build any code or use anyone's else's code. Your just simply phishing for the information you need on the websites source code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.