diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2015-04-14 22:56:44 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2015-04-14 22:56:44 +0200 |
commit | 287f229ad4d368f16a60d708d7a07eb9a8bcad69 (patch) | |
tree | bf3ca29e26192d4cfba6bf09b0fc41db33eeaf04 /modules | |
parent | 3f03b3d2c09f3a3047134a284664c82b5047b590 (diff) |
tracking: Updated URLs for PostNord.
Diffstat (limited to 'modules')
-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: |