#!/usr/bin/python # -*- coding: utf-8 -*- import urllib query_args = { 'id':'2955923' ,'appid':'' ,'lang':'de' } encoded_args = urllib.urlencode(query_args) print 'Encoded:', encoded_args link = 'http://api.openweathermap.org/data/2.5/forecast?' + encoded_args f = urllib.urlopen(link) print 'URL :', f.geturl() myfile = f.read() print myfile