The functionality of my script might only be useful for a handful of people, because it interacts with the website of my german telefon network service provider TNG.de. The company only offers their services in the near region around my hometown Kiel. But if I've had such a script as example for the interaction with websites, I would have written my script much faster and easier as I did. I hope in this way my script might be useful for more than a handful of people.

I also have to admit, that I am a python beginner. There are for sure better or more elegant ways to perform the needed tasks in python, but the script works for me:

Gist: Redirect Telefonnumbers via TNG.de: https://gist.github.com/nealtz/9713098

PS: To get the right URL and payload parameters to post with the requests module I used the Firefox Browser with the Live HTTP Headers Add-on.

PPS: I want to thank all the people who supported my little personal programming project! Especially Ole for his great apps and ccc for good input to my questions (1, 2).