diff options
-rw-r--r-- | modules/tracking.py | 7 |
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: |