Greasy Fork is available in English.

La7.tv direct link

This script gives you the direct link while watching a video on La7.it

< Feedback on La7.tv direct link

سؤال / تعليق

It stopped working a few months ago

I've got version 2.9.1 of the script (the latest as of today), and a few months ago the "Direct download" link stopped appearing. Anyone else is seeing this?

Lazzaمؤلف
§
Posted: 17-09-2017

Firefox

Imgur

Chrome

Imgur

Well, it just keeps not working. For some reason, the JSON that comes out of the src tag cannot be properly parsed as JSON in my Chrome (61.0.3163.100), as the names of the elements are not quoted:

src: {
                    m3u8: "http://la7-vh.akamaihd.net/i/content/entry/data/0/306/0_gyhww0vc_0_ebnz1on9_1.mp4/master.m3u8",
                    mp4: "http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/306/0_gyhww0vc_0_ebnz1on9_1.mp4",
                },

While parsing this as JSON, Javascript complains that "m" (of "m3u8") is an unexpected token.

I've fixed it on my side, but I wonder how it comes that it's still working for you.

The snippet above comes from http://tg.la7.it/repliche-tgla7?id=223032, by the way.

Yeah, it looks like the "tgla7 repliche" site uses a different encoding for the snippet.

Pages from "rivedila7" do quote the tags instead:

src: {"m3u8" : "http://la7-vh.akamaihd.net/i/,/content/entry/data/0/306/0_6pfxsoa1_0_fmotou7u_1,/content/entry/data/0/306/0_6pfxsoa1_0_s7mtl1wl_1,.mp4.csmil/master.m3u8","mp4" : "http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/306/0_6pfxsoa1_0_fmotou7u_1.mp4"},

Do you see the same on your side?

Lazzaمؤلف
§
Posted: 30-09-2017

Thanks for the feedback. Please try version 2.9.2.

§
Posted: 08-11-2017
Edited: 08-11-2017

Hey Lazza, thanks for the update, unfortunately it still doesn't work, same error.

Here are some details:

Uncaught SyntaxError: Unexpected token m in JSON at position 147
    at JSON.parse ()
    at handleObject (eval at E_c (:3:298), :50:28)
    at HTMLDocument.eval (eval at E_c (:3:298), :87:3)
    at j (eval at E_c (:3:298), :6:27244)

Your console.log prints:

{
                    "3u8": "http://la7-vh.akamaihd.net/i/content/entry/data/0/310/0_1bfksz6j_0_57xzmfgw_1.mp4/master.m3u8",
                    mp4: "http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/310/0_1bfksz6j_0_57xzmfgw_1.mp4",
                }

It looks like the "magic" replacement you added only worked with m3u8 and not with the following mp4.

Lazzaمؤلف
§
Posted: 16-11-2017

Could you link another video that does not work for you? I think the one you mentioned above has been removed from the website. Thank you.

§
Posted: 18-11-2017
Edited: 18-11-2017

Sure, fresh from yesterday night's TG:

Error:

VM264:3 Uncaught SyntaxError: Unexpected token m in JSON at position 147
    at JSON.parse ()
    at handleObject (eval at E_c (:3:298), :50:28)
    at HTMLDocument.eval (eval at E_c (:3:298), :88:3)
    at j (eval at E_c (:3:298), :6:27244)
    at Object.fireWith [as resolveWith] (eval at E_c (:3:298), :6:28057)
    at Function.ready (eval at E_c (:3:298), :6:29891)
    at Window.J (eval at E_c (:3:298), :6:30257)
    at :2:479
    at f.string.e.function.b.(anonymous function) (eval at exec_fn (:2:27), :52:92)
    at :2:479

Your console.log:

{
                    "3u8": "http://la7-vh.akamaihd.net/i/content/entry/data/0/311/0_iiu8r2k9_0_umgwz3it_1.mp4/master.m3u8",
                    mp4: "http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/311/0_iiu8r2k9_0_umgwz3it_1.mp4",
                }

This is with 2.9.3 by the way.

The above is when I open http://tg.la7.it/repliche-tgla7?id=227405. From your code I gather that tg.la7.it recently started serving different content to my country (NL) than the content you see in Italy (I'm assuming), the difference being in the content of the src tag.

Lazzaمؤلف
§
Posted: 21-11-2017

Please try version 2.9.4.

Thank you Lazza, it's a little step forward but still the JSON that comes out of your replacement is not real JSON. Here's the log:

{
                    "m3u8": "http://la7-vh.akamaihd.net/i/content/entry/data/0/312/0_euxo1hmn_0_g9ir38y5_1.mp4/master.m3u8",
                    "mp4": "http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/312/0_euxo1hmn_0_g9ir38y5_1.mp4",
                }

And here's the error:

Uncaught SyntaxError: Unexpected token } in JSON at position 262
    at JSON.parse ()

I believe the issue is the trailing comma.

This is a larger snippet of the original code, in case it helps:

pl.style.height = pl.clientWidth/1.77777+"px";
            videoLa7({
                id: "tgla7-player",
                title: "Edizione delle 20:00 - 21/11/2017",
                src: {
                    m3u8: "http://la7-vh.akamaihd.net/i/content/entry/data/0/312/0_euxo1hmn_0_g9ir38y5_1.mp4/master.m3u8",
                    mp4: "http://vodpmd.la7.it.edgesuite.net/content/entry/data/0/312/0_euxo1hmn_0_g9ir38y5_1.mp4",
                },
                vid: "0_euxo1hmn",

Again, thank you for your effort, but don't feel pressured - I've got my own "fork" from yours that works fine for NL.

Post reply

تسجيل الدخول إلى مرحلة ما بعد الرد.