duckduckgo / zeroclickinfo-goodies

DuckDuckGo Instant Answers based on Perl & JavaScript
https://duckduckhack.com/
Other
980 stars 1.76k forks source link

DHL tracking number points only to dhl-usa.com site #642

Closed plaes closed 7 years ago

plaes commented 10 years ago

When searching for 'dhl 429660411968' it correctly shows that tracking number belongs to DHL, but only shows link to dhl-usa.com

Information about this package can be seen only on dhl.de


IA Page: https://duck.co/ia/view/dhl

killerfish commented 10 years ago

Quick search tells that we have a way to validate the tracking number, but unfortunately, we wont know when to direct to dhl.de etc. perhaps we should convert this into a spice? (Or someone could dig in deeper to see if we can do this in goodie)

mwmiller commented 10 years ago

@killerfish Does DHL expose an API which would allow us to put the actual tracking info in-page?

killerfish commented 10 years ago

@mwmiller sadly no, though i have a good hunch on this, i'd check and update, so no worries

plaes commented 10 years ago

Weirdly, google knows that this is .de tracking number.

killerfish commented 10 years ago

//cc @jagtalon So from dhl.dk :-


12 digit tracking numbers are for shipments that originate from Germany, sent via parcel post with Deutsche Post. Your shipment will be handled by your local postal service.Should you have any questions regarding the status of this shipment: Before the shipment arrives in Denmark, you can check the status here: http://nolp.dhl.de/


Fun thing is this isnt mentioned on dhl-us/dhl or even dhl de -_- Anyhow i got some further observations from google 10 digits query points to dhl.com 11 digits query points to webtrack.dhlglobalmail.com 12 digits query points to nolp.dhl.de Problem is their website says the dhl tracking number could be 10/11 digits, so why does the 11 digits one point to globalmail? Can we get a hold of the original author of this ia, to share this with him, maybe he could provide some insight (or maybe we can just point like google is doing, which i really dont want to, unless i confirm why)

mwmiller commented 10 years ago

I took a tentative stab at combining all of the package tracking logic into a single, err, package this weekend. That task escalated quite quickly.

@killerfish In more direct answer to your question, I don't believe the original author of the DHL IA is going to be available to help out on this one.

killerfish commented 10 years ago

Oh, tough luck. Attribution mentions duckduckgo so i thought perhaps someone internally made this, i would make a pr for 12 digits (since we know it points to the dhl.de), perhaps, but then again i dont know if the algo to evaluate a DHL number would hold true for a 12-digit number, and i just cant seem to find the format.

ghost commented 9 years ago

@mwmiller What was the problem?

mwmiller commented 9 years ago

@bpaschen So long as the package tracking code is in a bunch of different packages, it i hard to get the triggering space right for each. But when I tried to combine them, it became a jumble.

Thanks for reminding me of this. Perhaps I will take another stab at it.

ghost commented 9 years ago

Probably a good candidate for a rewrite. The tough part seems to be finding out how the different tracking numbers are made up. I found infos on UPS and on USPS, but nothing on DHL and the rest of the couriers. I'll probably give DHL Germany a call on Monday and see what I can find out about DHL tracking numbers.

EDIT: I didn't see the tracking info a couple of comments above, sorry :D

ghost commented 9 years ago

DHL indeed has a developer portal (at least the german website, https://entwickler.dhl.de/). And according to the overview they have a Tracking API.

mwmiller commented 9 years ago

@bpaschen I've been arguing that these should actually be Spices so that they can get and display the information directly. That conversion is yet another hurdle.

ghost commented 9 years ago

@mwmiller It's a bit of work, yes. Is it worth it? How often are the different package tracking goodies on DDG triggered per day.

I registered on the DHL developer site. This is a bit of info I found:

Leseratte10 commented 9 years ago

Any progess made on this? Would be great if German DHL tracking numbers would work correctly in DDG.

ghost commented 9 years ago

@Leseratte10 not yet.

Leseratte10 commented 9 years ago

Well, then I've made a pull request with the little change that 12-digit DHL tracking IDs will get a link to "nolp.dhl.de": https://github.com/duckduckgo/zeroclickinfo-goodies/pull/834

It's my first contribution to DDG and also my first Perl thing so the code may be a little messy, but it works.

pjhampton commented 7 years ago

Closing legacy issue.