mirror of
https://github.com/robweber/xbmcbackup.git
synced 2024-11-14 20:35:48 +01:00
use future for urllib2
This commit is contained in:
parent
8f8402ae8a
commit
94f872fb81
@ -5,6 +5,7 @@
|
|||||||
<!-- jarvis -->
|
<!-- jarvis -->
|
||||||
<import addon="xbmc.python" version="2.26.0"/>
|
<import addon="xbmc.python" version="2.26.0"/>
|
||||||
<import addon="script.module.kodi-six" version="0.1.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.httplib2" version="0.8.0" />
|
||||||
<import addon="script.module.oauth2client" version="4.1.2" />
|
<import addon="script.module.oauth2client" version="4.1.2" />
|
||||||
<import addon="script.module.uritemplate" version="0.6" />
|
<import addon="script.module.uritemplate" version="0.6" />
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import sys, urlparse
|
import sys
|
||||||
|
from future.moves.urllib.request import urlparse
|
||||||
from kodi_six import xbmc, xbmcgui
|
from kodi_six import xbmc, xbmcgui
|
||||||
import resources.lib.utils as utils
|
import resources.lib.utils as utils
|
||||||
from resources.lib.backup import XbmcBackup
|
from resources.lib.backup import XbmcBackup
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import sys
|
import sys
|
||||||
import urlparse
|
from future.moves.urllib.request import urlparse
|
||||||
from kodi_six import xbmc, xbmcgui, xbmcvfs
|
from kodi_six import xbmc, xbmcgui, xbmcvfs
|
||||||
import resources.lib.utils as utils
|
import resources.lib.utils as utils
|
||||||
from resources.lib.authorizers import DropboxAuthorizer,GoogleDriveAuthorizer
|
from resources.lib.authorizers import DropboxAuthorizer,GoogleDriveAuthorizer
|
||||||
|
@ -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
|
#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!
|
#in particular - to all those that have gone before me!
|
||||||
def shorten(aUrl):
|
def shorten(aUrl):
|
||||||
tinyurl = 'http://tinyurl.com/api-create.php?url='
|
tinyurl = 'http://tinyurl.com/api-create.php?url='
|
||||||
req = urllib2.urlopen(tinyurl + aUrl)
|
req = urlopen(tinyurl + aUrl)
|
||||||
data = req.read()
|
data = req.read()
|
||||||
|
|
||||||
#should be a tiny url
|
#should be a tiny url
|
||||||
|
Loading…
Reference in New Issue
Block a user