Enigma2 plugin to to play various online streams (mostly Latvian).

1234567891011121314151617181920212223242526272829
  1. # * GNU General Public License for more details.
  2. # *
  3. # * You should have received a copy of the GNU General Public License
  4. # * along with this program; see the file COPYING. If not, write to
  5. # * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  6. # * http://www.gnu.org/copyleft/gpl.html
  7. # *
  8. # */
  9. import re,util
  10. __name__='vuuzla'
  11. def supports(url):
  12. return not _regex(url) == None
  13. # returns the steam url
  14. def resolve(url):
  15. m = _regex(url)
  16. if m:
  17. data = util.request(url)
  18. sid = re.search('sid=(?P<sid>[^\&]+)',data)
  19. if sid:
  20. data = util.request('http://www.vuuzla.com/app/deliver/playlist/%s?sid=%s' % (m.group('id'),sid.group('sid')))
  21. link = re.search('<video.+?url=\"(?P<url>[^\"]+)',data)
  22. if link:
  23. return [{'url':link.group('url')}]
  24. def _regex(url):
  25. return re.search('www\.vuuzla\.com.+?playerFrame/(?P<id>[^$]+)',url,re.IGNORECASE | re.DOTALL)