su1s / e2m3u2bouquet

Enigma2 IPTV m3u parser and bouquet creator
GNU General Public License v3.0
68 stars 50 forks source link

Python 3 #127

Closed BliNeR-KeY closed 3 years ago

BliNeR-KeY commented 4 years ago

hello have have plan to migrate PY3 ?

DougMac commented 4 years ago

If there's an image that works on the tmnanosem2plus and uses Python 3 I can have a look and test the changes needed.

I normally use OpenATV but there's not yet a supported image for 6.5 for my box

stingray82 commented 3 years ago

A Python 3 image is now available for testing from Openvix from here, http://images.satellites-xml.org/Py3/

lincsat commented 3 years ago

I believe ATV now have releases of PY3 images. I've tried on ViX and got some of the changes done but am only a Python novice

lincsat commented 3 years ago

Does anyone know the replacements for depreciated items AppUrlOpener & FancyURLopener

stingray82 commented 3 years ago

Lincsat, I think you can use just requests or urllib2 is there a repo your working on this from?

https://pypi.org/project/requests/ & https://docs.python.org/2/library/urllib2.html

lincsat commented 3 years ago

All I have done is to run the existing .py though the 2to3 converter and then corrected what syntax errors remain. I am a total novice and haven't looked at changing the code, just converting what I can

neoatomic commented 3 years ago

This release works with Py3 : https://github.com/oe-mirrors/e2m3u2bouquet-plugin

lincsat commented 3 years ago

I've tried that and still get the depreciation warning and it fails to download any M3U's. Maybe it's just the version of PY3 in the latest ViX images?

DeprecationWarning: AppUrlOpener style of invoking requests is deprecated. Use newer urlopen functions/methods urllib._urlopener = AppUrlOpener()

stingray82 commented 3 years ago

I tested this in the latest VIX and it appears to work fine, when running it from the command line i get the same error message but the bouquets where generated

lincsat commented 3 years ago

Do you use config based setup? I've just tried again with latest ViX developer image and again, doesn't download

root@zgemmah7:/usr/lib/enigma2/python/Plugins/Extensions/E2m3u2bouquet# ./e2m3u2bouquet.py
/usr/lib/enigma2/python/Plugins/Extensions/E2m3u2bouquet/./e2m3u2bouquet.py:1617: DeprecationWarning: AppUrlOpener style of invoking requests is deprecated. Use newer urlopen functions/methods
  urllib._urlopener = AppUrlOpener()

********************************
Starting Enigma2 IPTV bouquets v0.8.5
2021-09-25 16:35:10.099711
********************************

********************************
E2m3u2bouquet - Config based setup
********************************

********************************
Config based setup - Test1
********************************

Test1: ----Downloading m3u file----
Test1: Unable to download m3u file from url

********************************
Config based setup - Test2
********************************

Test2: ----Downloading m3u file----
Test2: Unable to download m3u file from url

----Reloading bouquets----
bouquets reloaded...

********************************
Enigma2 IPTV bouquets created !
********************************
BliNeR-KeY commented 3 years ago

Fixed Plugin on Py2/3 https://github.com/BliNeR-KeY/e2m3u2bouquet-plugin

lincsat commented 3 years ago

I've just tried this version and it works when downloading from the XC panel or the M3U on a local http server but not from a local file or direct from a site like m3u4u.

I'm guessing the m3u4u site is giving the flood protection, is the script using multiple connections to trigger that? Is it possible to configure a local file download rather than just a http? The original version did download from m3u4u OK, even multiple servers.

KittyBua commented 1 year ago

Here my fix for pli Dev ! Version 0.8.6

https://github.com/KittyBua/e2m3u2bouquet-0.8.6-pli-dev