Python module (submodule repositary), which provides content (video streams) from various online stream sources to corresponding Enigma2, Kodi, Plex plugins

test_url.py 1.0KB

1234567891011121314151617181920212223
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. from util import streamproxy_encode3, streamproxy_decode3
  4. dt2ts = lambda dt: int(time.mktime(dt.timetuple()))
  5. ts2dt = lambda ts: datetime.datetime.fromtimestamp(ts)
  6. import time, datetime, pytz
  7. from datetime import datetime as dt
  8. # "20190302203000 +0200" panorāma
  9. print dt2ts(dt.now())
  10. print dt2ts(dt(2019, 3, 2, 20, 30))
  11. #print urlp
  12. # ltc::content/live-streams/101?include=quality
  13. print streamproxy_encode3("playstream", "ltc::content/catchup/101?start=1551551400")
  14. # http://localhost:8880/playstream/ltc%3A%3Acontent%2Fcatchup%2F101%3Fstart%3D1551551400/
  15. print streamproxy_encode3("playstream", "replay::tiesraide/ltv1")
  16. print streamproxy_encode3("playstream", "tvdom::tiesraides/ltv1/")
  17. print streamproxy_encode3("playstream", "tvplay::asset/10311641")
  18. print streamproxy_encode3("playstream", "xtv::rigatv24/video/Zw4pVPqr7OX-festivals_mainam_pasauli_sakam_ar_sevi")
  19. print streamproxy_encode3("playstream", "iplayer::episodes/b094f49s")
  20. #cmd, data, headers, qs = streamproxy_decode3(urlp)