-8

これを行う方法がわかりません。これの目的は、この関数への別のモジュール呼び出しを行い、正しい URL を返してダウンロードし、そこから何かを抽出することです。

getQuery(location)wunderground.com から特定の場所の天気を取得するための GET クエリを含む URL を返します。

たとえばgetQuery('Princeton, WV')、URL を返します

http://www.wunderground.com/cgi-bin/findweather/hdfForecast?query=Princeton%2C+WV
4

1 に答える 1

2
def getQuery(location):
   # return your root url plus the location encoded using quote_plus
   # http://docs.python.org/2/library/urllib.html#urllib.quote_plus
   pass
于 2013-04-14T23:24:03.607 に答える