iptv-org / epg

Utilities for downloading the EPG (Electronic Program Guide) for thousands of TV channels from hundreds of sources.
https://iptv-org.github.io/
The Unlicense
1.66k stars 156 forks source link

Update web.magentatv.de.config.js #2382

Closed PopeyeTheSai10r closed 5 days ago

PopeyeTheSai10r commented 3 weeks ago

Fixes #2367

BellezaEmporium commented 1 week ago

As for web.magenta.de https://api.prod.sngtv.magentatv.de/EPG/JSON/Login?&T=Windows_firefox_127 can give the best EPG server available for your host.

{"enctytoken":"*random*","encryptiontype":"0002","platformcode":"0200","epgurl":"http://api.prod.sngtv.magentatv.de:33220","version":"MEM V200R008C18SPC806B002","epghttpsurl":"https://api.prod.sngtv.magentatv.de:33227","rootCerAddr":"http://api.prod.sngtv.magentatv.de:33220/EPG/CA/iptv_ca.der","upgAddr4IPTV":"https://slbedifk11100.prod.sngtv.t-online.de:33428/EDS/jsp/upgrade.jsp","upgAddr4OTT":"https://slbedmfk11100.prod.sngtv.t-online.de:33428/EDS/jsp/upgrade.jsp,https://slbedmfk11100.prod.sngtv.t-online.de:33428/EDS/jsp/upgrade.jsp","EPGDomainNameList":[{"key":"2","value":"appepmfk10045.prod.sngtv.t-online.de"},{"key":"3","value":"80.157.246.168"},{"key":"4","value":"80.157.246.168"},{"key":"5","value":"80.157.246.168"},{"key":"6","value":"80.157.246.168"},{"key":"7","value":"80.157.246.168"}],"sam3Para":[{"key":"SAM3ServiceURL","value":"https://accounts.login.idm.telekom.com"},{"key":"OAuthScope","value":"ngtvepg"}]}

On EPGDomainNameList, you have 2 diff domains.

AUTH is https://api.prod.sngtv.magentatv.de/EPG/JSON/Authenticate?SID=firstup&T=Windows_firefox_127 with {"terminalid":"00:00:00:00:00:00","mac":"00:00:00:00:00:00","terminaltype":"WEBTV","utcEnable":1,"timezone":"Africa/Ceuta","userType":3,"terminalvendor":"Unknown","preSharedKeyID":"PC01P00002","cnonce":"753adeceff416ad53da6be620722bc65"}

https://api.prod.sngtv.magentatv.de/EPG/JSON/AllChannel?SID=first&T=Windows_firefox_127 gives all channels.

BellezaEmporium commented 6 days ago

Test failed:

npm test -- osn.com   

> test
> run-script-os osn.com

> test:default
> TZ=Pacific/Nauru npx jest --runInBand osn.com

 FAIL  sites/osn.com/osn.com.test.js
  ✕ can generate valid request headers (10 ms)
  ✓ can generate valid url (3 ms)
  ✓ can parse response (ar) (140 ms)
  ✓ can parse response (en) (1 ms)
  ✓ can handle empty guide

  ● can generate valid request headers

    expect(received).toMatchObject(expected)

    - Expected  - 1
    + Received  + 1

      Object {
    -   "Referer": "https://www.osn.com/ar-ae/watch/tv-schedule",
    +   "Referer": "https://www.osn.com/ar-sa/watch/tv-schedule",
      }

      14 | it('can generate valid request headers', () => {
      15 |   const result = request.headers({ channel: channelAR, date })
    > 16 |   expect(result).toMatchObject({
         |                  ^
      17 |     Referer: 'https://www.osn.com/ar-ae/watch/tv-schedule'
      18 |   })
      19 | })

      at Object.<anonymous> (sites/osn.com/osn.com.test.js:16:18)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 4 passed, 5 total
Snapshots:   0 total
Time:        3.777 s
Ran all test suites matching /osn.com/i.

Your test is concerning osn.com, not magentatv.de

BellezaEmporium commented 6 days ago

Will take a check a bit later, just to make sure I have no issues as well on my side. Though Arhey having an quack on the OSN configuration makes me think we'll have to take a look soon

PopeyeTheSai10r commented 6 days ago

Your test is concerning osn.com, not magentatv.de

The initial PR was for osn and magenta. osn needs more work, it has been removed from this PR.

PopeyeTheSai10r changed the title ~Update web.magentatv.de.config.js & osn.com.config.js~ Update web.magentatv.de.config.js