mardi 3 octobre 2017

Telegram built-in browser not opening URL correctly

I am using Python to develope a telegram bot which helps users (i.e. mainly college students) to get information about their next lesson. And the following code is how I get the link to the location of their next lesson:

Full_Location_Name = (Find_labname(Location))[0]
link = 'http://ift.tt/2fIEJch:'+ locNameFormatter(Full_Location_Name)

where(Find_labname(location))[0] returns a string of the name of the lab and locNameFormatter(Full_location_name) replaces all the space with %20 so that there is no error in the URL.

And the following screenshot shows that the code is working fine to obtain the correct URL of the location. URL shown correctly

In this case, the URL is http://ift.tt/2xYpPZZ and when it is opened on PC and IOS devices, it shows what is intended to be shown which is the map. However, when it is opened on Android devices using Telegram's built-in browser, the 'maps' in the URL suddenly becomes 'm' which will cause the URL to be directed to the homepage. (Sorry I cannot post more than 2 links.)

I tried to get around this by using Tinyurl and the same problem shows up again. I'm wondering why is this so and how can I fix this? Thanks!




Aucun commentaire:

Enregistrer un commentaire