summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2015-04-14 22:56:44 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2015-04-14 22:56:44 +0200
commit287f229ad4d368f16a60d708d7a07eb9a8bcad69 (patch)
treebf3ca29e26192d4cfba6bf09b0fc41db33eeaf04 /modules
parent3f03b3d2c09f3a3047134a284664c82b5047b590 (diff)
tracking: Updated URLs for PostNord.
Diffstat (limited to 'modules')
-rw-r--r--modules/tracking.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/tracking.py b/modules/tracking.py
index 0ba9152..74997c4 100644
--- a/modules/tracking.py
+++ b/modules/tracking.py
@@ -249,15 +249,14 @@ class PostNordModule(TrackingModule):
name = 'postnord'
def get_url(self, code = None):
- url = 'http://www.postnordlogistics.no/nb/Sider/search.aspx'
+ url = 'http://www.postnordlogistics.no/minside/SOPS/'
if code:
- url += '?' + urllib.urlencode({'k': code})
+ url += code
return url
def track(self, code):
code = self.splitcode(code)
- url = 'http://logistics.postennorden.com/wsp/rest-services/ntt-service-rest/api/shipment.json'
- url += '?' + urllib.urlencode((('id', code), ('locale', 'no'), ('consumerId', config.get(cfg_section, 'postnord_consumerid'))))
+ url = 'http://www.postnordlogistics.no/XMLServer/rest/trackandtrace?' + urllib.urlencode({'q': code})
try:
u = urllib2.urlopen(url)
except urllib2.HTTPError as e: