<?xml version="1.0" encoding="utf-8"?>
<parser delay="2500" crpj="true" date="2021.03.11">
    <url><![CDATA[https?://(?:www\.)?amazon\.com/(?<id>[^/]+)]]></url>
    <title><![CDATA["productTitle">([^<]+)</span>]]></title>
    <thumbnail><![CDATA[slateUrl":"([^"]+)]]></thumbnail>
    <duration><![CDATA[durationSeconds":([^,]+)]]></duration>
    <mediaUrl><![CDATA[cr_video_url=([^\$]+)]]></mediaUrl>
    <jsCode><![CDATA[
        try {
            //https://www.amazon.com/CeraVe-Foaming-Facial-Cleanser-Washing/dp/B01N1LL62W
            var mp4_url = '';
            var video_url = '';
            var m = document.body.innerHTML.match(/\"([^\"]+)\.mp4/);
            if (m) {
                mp4_url = m[1];
                if (mp4_url.indexOf('.mp4') != -1)
                    video_url = mp4_url.substr(0, mp4_url.indexOf('.mp4')) + '.hls1080.m3u8';
            }
            if (!video_url) {
                var m = document.body.innerHTML.match(/<video[^>]+src=\"([^\"]+)/);
                if (m)
                    video_url = m[1];
            }
            if (!video_url) {
                if (mp4_url)
                    video_url = mp4_url + '.mp4';
                else {
                    var m = ocument.body.innerHTML.match(/\"([^\"]+\.m3u8)/);
                    video_url = m ? m[1] : window.location.href;
                }
            }
            document.body.innerHTML = 'cr_video_url=' + video_url + '$' + document.body.innerHTML;
        }
        catch (ex) {
        }
    ]]></jsCode>
</parser>