;ò = ÄDc@sÃdkZdkZdkZdkiZdkiZdkTdki Z dk i Z ei ddddgƒZ de dd?d@dAdBdCdDdEdFdGg3ƒZedHdIdJdKdLdMdNdOdPdQdRdSdTg ƒZhdUdV Returns the approximate weather conditions for a given city. is lastLocations ignoreNoUserscommands %s lookup failed, Trying others.s Trying %s.s%s lookup succeeded.Ns%s lookup failed as backup.s"Could not retrieve weather for %q.(sNoneschannelsircs isChannelsmsgsargsslocationsselfs userValuesprefixs callbackss ArgumentErrors setUserValuesTrues registryValues commandNames firstCommandsgetCommandMethodssplitscommands NoLocationslogsinfosweatherCommandsserrorsformat( sselfsircsmsgsargsslocations firstCommands commandNamescommandschannel((s./Weather/plugin.pysweatherAs>      stextcCsB|djo |dSn&|djo|dddSn|SdS(NsKf273.14999999999998sFi ii (sunitstemp(stempsunit((s./Weather/plugin.pys _toCelsiuses    s(-?\d+)(.*?)(F|C)cCs÷||iƒjpt‚|t|ƒjpt‚titiii i |ƒ}t ||jotd|||ƒSnt i||ƒ}d}|djo|d}d}d}n*|djo|dd d }d }nd|||fSdS( Ns %0.1f%s%ssCsKelvinf273.14999999999998sKs s Fahrenheiti ii sF(sunitsuppersAssertionErrorstempsfloatsconfsgetssupybotspluginssWeatherstemperatureUnitschansdefaults unitAbbrevssformatsdegs _toCelsius(stempsdegsunitschansdefault((s./Weather/plugin.pys_getTempos     sI([^,]+), ([^,]+),(.*?)sA([^,]+), (.*?)sh]+>([^<]+)se]+>(-?\d+)(.*?)(F|C)sdWind Chill:\s+]+>([^N][^<]+)sdHeat Index:\s+]+>([^N][^<]+)scSelect from one of[^<]+\s*]+>\s*saksalsarsazscascosctsdcsdesflsgashisiasidsilsinsksskyslasmasmdsmesmismnsmosmssmtsncsndsnesnhsnjsnmsnvsnysohsoksorspasrisscssdstnstxsutsvasvtswaswiswvswysabsbcsmbsnbsnfsnssntsnusonspesqcssksyksuksgbcCsÌd|jo>tii|tdƒ}|iƒiƒ}di|ƒ} | i dƒiƒ} ||i jo d}n'||ijo d}n |}d}||iiƒjo|i|}nd| ||f}tii|d |iƒ} d | joJd | |f}tii|d |iƒ} d | jo|iƒqGq©n_|iddƒ}|iƒ}d |}tii|d |iƒ} d | jo|iƒnd | joY|ii| ƒ}|o2d|idƒ}tii|d |iƒ} q|iƒn|ii| ƒ} | tj o| iƒ\} }}n:|i i| ƒ} | o| iƒ\} }n |iƒtii!| i"ƒƒ} tii!|i"ƒƒ}|i#i| ƒ}|i%d|i'dƒ}|tj op|iƒ\}}}tii!|ƒ}|o)|i+t,|ƒ|||i'dƒ}qX|i||fƒ}n|i-i| ƒ} | tj o| idƒ} nd}|i0i| ƒ}|tj o»|idƒ}tii!|ƒ}|o[|i2i|ƒ} | o>| iƒ\}}}|i+t,|ƒ|||i'dƒ}q2nt,|d ƒt,|d ƒjot4d|ƒ}qjn|i5i| ƒ}|tj oÆ|idƒ}tii!|ƒ}|of|i2i|ƒ} | oI| iƒ\}}}|o)|i+t,|ƒ|||i'dƒ}qqnt,|d ƒt,|d ƒjot4d|ƒ}qOn|o| o | o|oP| iddƒ} | iddƒ} t4d| |||| ƒ}|i9|ƒn|i:dƒdS(sŒ Returns the approximate weather conditions for a given city. s is+s,susscasslhttp://www.hamweather.net/cgi-bin/hw3/hw3.cgi?pass=&dpp=&forecast=zandh&config=&place=%s&state=%s&country=%ssheaderss was not foundsjhttp://www.hamweather.net/cgi-bin/hw3/hw3.cgi?pass=&dpp=&forecast=zandh&config=&place=%s&state=&country=%ssWhttp://www.hamweather.net/cgi-bin/hw3/hw3.cgi?config=&forecast=zandh&pands=%s&Submit=GOsMultiple Locations forshttp://www.hamweather.net/%ssconvertiiþÿÿÿs (Wind Chill: %s)s (Heat Index: %s)sTsras ThunderstormssTss:The current temperature in %s, %s is %s%s. Conditions: %s.sThe format of the page was odd.N(;slocsutilssstrsrsplitsNonespopslowersstatesjoinscitysrstripsselfs _realStatesscountrys _fakeStatess_hamCountryMapskeyssurlswebsgetUrlsheadersshtmls _noLocationsreplaceszips _hamMultiLocssearchsmsgroups_hamLocsheadDatasgroupss _interregexs htmlToTextsstrips_hamTempstemps registryValuesmsgsargssconvertsdegsunits_getTempsfloats_hamCondscondssindexs _hamChillschills_temps tempsplitsformats_hamHeatsheatsssircsreplyserrorPossibleBug(sselfsircsmsgsargsslocsunitszipsindexsstateshtmlsheadDatas tempsplitscondsscitysheatschillsconvertstempsurlscountrysmsssdeg((s./Weather/plugin.pysham¨s¨            )  -! 1!s.http://weather.cnn.com/weather/search?wsearch=s(-?\d+)(°)(F)s(align="center">([^<]+)sRel. Humidity: (\d+%)sWind: ([^<]+)s([^<]+)shref="([^f]+forecast.jsp[^"]+)sensgecCsMd|joˆtii|tdƒ}|iƒiƒ}di|ƒ} | i dƒiƒ} ||i jo|i |}ndi| |gƒ}n|i ddƒ}d|itii|ƒf}tii|d|iƒ}d|jp d|jo|iƒn]d |joO|ii|ƒ}|o(tii|idƒd|iƒ}qe|iƒn|ii|ƒ} |ii|ƒ} |ii|ƒ} |i i|ƒ}|i"i|ƒ}|i$d |i&d ƒ} | o| oV| idƒ} | i(d ƒd i)ƒ} | i*ƒ\} }}| o)|i-t.| ƒ|||i&d ƒ} n|i| |fƒ} t/d| | ƒg}| tj o#|i1t/d| idƒƒƒn|tj o#|i1t/d|idƒƒƒn|tj o#|i1t/d|idƒƒƒnt2tii3|ƒ}|i5di|ƒƒn|i6dƒdS(sŒ Returns the approximate weather conditions for a given city. s is,ss%s%ssheaderssNo search resultssdoes not match a zip codesseveral matching locations forsconvertis-iÿÿÿÿs$The current temperature in %s is %s.sConditions: %s.s Humidity: %s.s Wind: %s.s#Could not find weather information.N(7slocsutilssstrsrsplitsNonespopslowersstatesjoinscitysrstripsselfs_cnnCountryMapsreplaces_cnnUrlswebsurlquotesurlsgetUrlsheadersstexts _noLocations _cnnMultiLocssearchsmsgroups_cnnLocslocations _cnnFTempstemps_cnnCondscondss _cnnHumidshumiditys_cnnWindswinds registryValuesmsgsargssconvertssplitsstripsgroupssdegsunits_getTempsfloatsformatsrespsappendsmaps htmlToTextsircsreplyserrorPossibleBug(sselfsircsmsgsargsslocstextsrespsunitsstateslocationscondsscitysconvertstempsurlsmshumidityswindsdeg((s./Weather/plugin.pyscnn#sV  () # # #cBs½tZeidƒZdZeideiƒZeideieiBƒZ d„Z e e dgƒZ dZ eideiƒZ eid eiƒZd „Ze edgƒZd „ZRS( Ns"sEhttp://mobile.wunderground.com/cgi-bin/findweather/getForecast?query=sfont color="?#ff0000"?>([^<]+) Returns the approximate weather conditions for a given city. s%s%ssheaderssSearch not foundssize="2"> Place sPlace: Temperatureshttp://www.wunderground.comiNss %sstablesborders1strisbcCst|tiƒ o|iSdS(N(s isinstancests BeautifulSoups NavigableTextscontents(st((s./Weather/plugin.pysisText„scCsµ|i}|tijo”|i}|di}|di}|idƒo+t i i |ƒ}di ||fƒ}q­t i i |ƒ}di ||d|dfƒ}n|SdS(Niis s ( stsstringsss BeautifulSoupsNullscontentssnumsunitss startswithsutilsswebs htmlToTextsjoin(stsssnumsunits((s./Weather/plugin.pysgetText‡s    $stds s Temperatureis)The current temperature in %s is %s (%s).s ConditionssConditions: %s.sHumiditys Humidity: %s.s Dew PointsDew Point: %s.sWind: %s at %s %s.sWinds WindchillsWindchill: %s.sPressures Pressure: %s.(Ksselfs _wunderUrlsutilsswebsurlquoteslocsurlsgetUrlsWeathersheadersstextsressearchsIs _noLocations _backupUrlsmsNonesgroups_rsssircsseveres _wunderSeveresircutilssboldsformats BeautifulSoupssoupsfeedsfirststablesfetchstrsspopstimeslocationsstringsinfosisTextsgetTextstrstdsksfilterscontentssvsmapsvaluesjoinstempsconfsgetssupybotspluginssconvertsmsgsargsssplitsdegsunits_getTempsfloatsrespscondssappendshumiditysdews ValueErrorsKeyErrorstupleswinds TypeErrorschills htmlToTextsreply(sselfsircsmsgsargsslocsisTextstextsgetTextstablesdewsunitsvstrslocationsrespscondsschillsinfosconvertstempsurlsksmsvalueshumidityssoupsseverestimestrssdegswind((s./Weather/plugin.pyswunderds˜&   %        )    stextsDhttp://www.wunderground.com/cgi-bin/findweather/getForecast?query=%ss&s"font color="?#ff0000"?>([^<]+) Returns the approximate weather conditions for a given city. s%20s+sheaderssSearch not foundssize="2"> Place sSearch results forshttp://www.wunderground.comiN(sselfs _rsswunderUrlsutilsswebsurlquoteslocsurlsreplacesgetUrlsWeathersheadersstextsressearchsIs _noLocations _backupUrlsmsNonesgroups_rsssirc(sselfsircsmsgsargsslocsurlstextsm((s./Weather/plugin.pysrssÖs&  c Cs.d} |ii|ƒ}|oti|idƒƒ} n|i i|ƒ}| ot i ƒn|idƒ}t ii|dt iƒ}ti|ƒ}gi} |dD]}| |dƒq®~ } gi} | D]}| |idƒƒqÙ~ } | i| ƒ|it iidi| ƒƒƒdS(Nsisheaderssentriesssummarysutf-8s; (sseveresselfs_rsswunderSeveressearchstextsmsircutilssboldsgroups_rsswunderfeedsfeedsWeathers _noLocationsutilsswebsgetUrlsheaderssrsss rssparsersparsesinfosappends_[1]sesrespsssencodesircsreplys htmlToTextsjoin( sselfsircstextsfeedsinfosrsssesmsssresps_[1]ssevere((s./Weather/plugin.pys_rssës/0 (s__name__s __module__srescompiles _backupUrls _wunderUrlsIs _wunderSeveresSs_wunderMultiLocswunderswraps _rsswunderUrls_rsswunderfeeds_rsswunderSeveresrsss_rss(((s./Weather/plugin.pyswunder]s j     (+s__name__s __module__sweatherCommandssTruesthreadedsheaderss callCommands _noLocations staticmethodsweatherswraps additionals _toCelsiussrescompiles_temps_getTempsIs_hamLocs _interregexs_hamConds_hamTempsSs _hamChills_hamHeats _hamMultiLocssets _realStatess _fakeStatess_hamCountryMapshams_cnnUrls _cnnFTemps_cnnConds _cnnHumids_cnnWinds_cnnLocs _cnnMultiLocs_cnnCountryMapscnns callbackssCommandsswunder(((s./Weather/plugin.pysWeather2sX    "               ¥ 3 n  8(sres rssparsers BeautifulSoups supybot.confsconfs supybot.utilssutilsssupybot.commandsssupybot.ircutilssircutilsssupybot.callbackss callbackssabbrevs unitAbbrevssnoLocationErrorsErrors NoLocationsPluginsWeathersClass( s unitAbbrevss callbackssutilss BeautifulSoupsres NoLocationsWeathersnoLocationErrorsconfs rssparsersClasssircutils((s./Weather/plugin.pys?s         ÿÊ