hatebu_info.py 文件源码

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

项目:taikutsu_blog_works 作者: hokekiyoo 项目源码 文件源码
def is_hatenatop(url):
    try:
        html = request.urlopen("http://hatenablog.com/")
    except urllib.HTTPError as e:
        print(e.reason)
    except urllib.URLError as e:
        print(e.reason)
    soup = BeautifulSoup(html,"lxml")
    a = soup.find("a",href=url)
    if a is None:
        return False
    return url == a.get("href")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号