From 287f229ad4d368f16a60d708d7a07eb9a8bcad69 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 14 Apr 2015 22:56:44 +0200 Subject: tracking: Updated URLs for PostNord. --- modules/tracking.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules') 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: -- cgit v1.2.3