La7.tv direct link

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

< 腳本La7.tv direct link的回應

提問/評論

§
發表於:2017-09-16

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作者
§
發表於:2017-09-17

Firefox

Imgur

Chrome

Imgur

§
發表於:2017-09-30

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.

§
發表於:2017-09-30

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作者
§
發表於:2017-09-30

Thanks for the feedback. Please try version 2.9.2.

§
發表於:2017-11-08
編輯:2017-11-08

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作者
§
發表於:2017-11-16

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.

§
發表於:2017-11-18
編輯:2017-11-18

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作者
§
發表於:2017-11-21

Please try version 2.9.4.

§
發表於:2017-11-22

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.

發表回覆

登入以回復