ukweather.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:scroll-phat-hd 作者: alexmburns 项目源码 文件源码
def get_wet():
# Get the weather data
    print("Updating weather for", postcode)
    d = feedparser.parse(url)
    entries = int(len(d['entries']))
    val = "        " + d['entries'][0]['title']
    val +="        " + d['entries'][1]['title']
    val +="        " + d['entries'][2]['title']
# Tidy & shorten the message for the scroll display
    val = val.replace("Maximum", "Max")
    val = val.replace("Minimum", "Min")
    val = val.replace("Temperature: ", "")
    val = val.replace(u"\u00B0","")
    val = val.replace(",", "")
    val = val.replace("(", "")
    val = val.replace(")", "")
    return val
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号