use future for urllib2

This commit is contained in:
Rob Weber 2019-08-27 15:03:43 -05:00
parent 8f8402ae8a
commit 94f872fb81
4 changed files with 6 additions and 4 deletions

View File

@ -5,6 +5,7 @@
<!-- jarvis -->
<import addon="xbmc.python" version="2.26.0"/>
<import addon="script.module.kodi-six" version="0.1.0"/>
<import addon="script.module.future" version="0.16.0.4"/>
<import addon="script.module.httplib2" version="0.8.0" />
<import addon="script.module.oauth2client" version="4.1.2" />
<import addon="script.module.uritemplate" version="0.6" />

View File

@ -1,4 +1,5 @@
import sys, urlparse
import sys
from future.moves.urllib.request import urlparse
from kodi_six import xbmc, xbmcgui
import resources.lib.utils as utils
from resources.lib.backup import XbmcBackup

View File

@ -1,5 +1,5 @@
import sys
import urlparse
from future.moves.urllib.request import urlparse
from kodi_six import xbmc, xbmcgui, xbmcvfs
import resources.lib.utils as utils
from resources.lib.authorizers import DropboxAuthorizer,GoogleDriveAuthorizer

View File

@ -1,10 +1,10 @@
import urllib2
from future.moves.urllib.request import urlopen
#this is duplicated in snipppets of code from all over the web, credit to no one
#in particular - to all those that have gone before me!
def shorten(aUrl):
tinyurl = 'http://tinyurl.com/api-create.php?url='
req = urllib2.urlopen(tinyurl + aUrl)
req = urlopen(tinyurl + aUrl)
data = req.read()
#should be a tiny url