当前位置: 首页>>代码示例>>Python>>正文


Python module_urltitle.handle_url函数代码示例

本文整理汇总了Python中pyfibot.modules.module_urltitle.handle_url函数的典型用法代码示例。如果您正苦于以下问题:Python handle_url函数的具体用法?Python handle_url怎么用?Python handle_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了handle_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_areena_not_available

def test_areena_not_available(botmock):
    regex = u"Title: (.*?) \[%s - %s - not available\]" % (
        length_str_regex,
        age_str_regex,
    )
    msg = "http://areena.yle.fi/1-2372901"
    check_re(regex, module_urltitle.handle_url(botmock, None, "#channel", msg, msg)[1])
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:7,代码来源:test_areena.py

示例2: test_liveleak

def test_liveleak():
    regex = "Title: (.*?) by (.*?) \[%s views - Jul-23-2013 - tags\: sword, cut, hand, watermelon, fail\]" % (
        views_str_regex
    )
    msg = "http://www.liveleak.com/view?i=f8e_1374614129"
    module_urltitle.init(bot)
    check_re(regex, module_urltitle.handle_url(bot, None, "#channel", msg, msg)[1])
开发者ID:BiohZn,项目名称:pyfibot,代码行数:7,代码来源:test_urltitle.py

示例3: test_eleven

def test_eleven():
    msg = "http://en.wikipedia.org/wiki/Edison_Arantes_do_Nascimento"
    module_urltitle.init(bot)
    eq_(
        ("#channel", u"Title: Edson Arantes do Nascimento, better known as Pelé, is a retired Brazilian footballer."),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:clooth,项目名称:pyfibot,代码行数:7,代码来源:test_wikipedia.py

示例4: test_iltasanomat

def test_iltasanomat():
    msg = "http://www.iltasanomat.fi/viihde/art-1288596309269.html"
    module_urltitle.init(bot)
    eq_(
        ("#channel", "Title: Muistatko Mari Sainion juontaman sarjan, josta sai palkinnoksi isdn-liittymän?"),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:BiohZn,项目名称:pyfibot,代码行数:7,代码来源:test_urltitle.py

示例5: test_wiki_fi

def test_wiki_fi():
    msg = "http://fi.wikipedia.org/wiki/Kimi_Räikkönen"
    module_urltitle.init(bot)
    eq_(
        ("#channel", "Title: Kimi-Matias Räikkönen on suomalainen autourheilija ja Formula 1:n maailmanmestari."),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:BiohZn,项目名称:pyfibot,代码行数:7,代码来源:test_urltitle.py

示例6: test_two

def test_two():
    msg = "http://fi.wikipedia.org/wiki/DTMF"
    module_urltitle.init(bot)
    eq_(
        ("#channel", u"Title: DTMF on puhelinlaitteissa käytetty numeroiden äänitaajuusvalintatapa."),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:clooth,项目名称:pyfibot,代码行数:7,代码来源:test_wikipedia.py

示例7: test_iltalehti

def test_iltalehti():
    msg = "http://www.iltalehti.fi/ulkomaat/2013072917307393_ul.shtml"
    module_urltitle.init(bot)
    eq_(
        ("#channel", "Title: Saksassa syntyi jättivauva - yli kuusi kiloa!"),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:BiohZn,项目名称:pyfibot,代码行数:7,代码来源:test_urltitle.py

示例8: test_wiki_en

def test_wiki_en():
    msg = "http://en.wikipedia.org/wiki/IPhone"
    module_urltitle.init(bot)
    eq_(
        ("#channel", "Title: iPhone is a line of smartphones designed and marketed by Apple Inc."),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:BiohZn,项目名称:pyfibot,代码行数:7,代码来源:test_urltitle.py

示例9: test_seven

def test_seven():
    msg = "http://en.wikipedia.org/wiki/Ramon_Llull"
    module_urltitle.init(bot)
    eq_(
        ("#channel", u"Title: Ramon Llull was a Majorcan writer and philosopher, logician and a Franciscan tertiary."),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:clooth,项目名称:pyfibot,代码行数:7,代码来源:test_wikipedia.py

示例10: test_six

def test_six():
    msg = "http://fi.wikipedia.org/wiki/Birger_Ek"
    module_urltitle.init(bot)
    eq_(
        ("#channel", u"Title: Rolf Birger Ek oli suomalainen lentäjä ja Mannerheim-ristin ritari."),
        module_urltitle.handle_url(bot, None, "#channel", msg, msg),
    )
开发者ID:clooth,项目名称:pyfibot,代码行数:7,代码来源:test_wikipedia.py

示例11: test_areena_tv_exiting

def test_areena_tv_exiting(botmock):
    regex = u"Title: (.*?) \[%s - %s( - exits in %s)?\]" % (
        length_str_regex,
        age_str_regex,
        age_str_regex,
    )
    msg = "http://areena.yle.fi/1-3093932"
    check_re(regex, module_urltitle.handle_url(botmock, None, "#channel", msg, msg)[1])
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:8,代码来源:test_areena.py

示例12: test_ten

def test_ten(botmock):
    msg = "http://en.wikipedia.org/wiki/802.11ac"
    eq_(
        (
            "#channel",
            u"Title: IEEE 802.11ac is a wireless networking standard in the 802.11 family, developed in the IEEE Standards Association process, providing high-throughput wireless local area networks on the 5\xa0GHz band.",
        ),
        module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
    )
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py

示例13: test_seven

def test_seven(botmock):
    msg = "http://en.wikipedia.org/wiki/Ramon_Llull"
    eq_(
        (
            "#channel",
            u"Title: Ramon Llull, T.O.S.F. was a philosopher, logician, Franciscan tertiary and Majorcan writer.",
        ),
        module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
    )
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py

示例14: test_five

def test_five(botmock):
    msg = "http://fi.wikipedia.org/wiki/David_Eddings"
    eq_(
        (
            "#channel",
            u"Title: David Carroll Eddings oli yhdysvaltalainen kirjailija, joka kirjoitti useita suosittuja fantasiakirjoja.",
        ),
        module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
    )
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py

示例15: test_four

def test_four(botmock):
    msg = "http://en.wikipedia.org/wiki/Dynamo_(magician)"
    eq_(
        (
            "#channel",
            u'Title: Steven Frayne, commonly known by his stage name "Dynamo", is an English magician, best known for his award-winning television show Dynamo: Magician Impossible.',
        ),
        module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
    )
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py


注:本文中的pyfibot.modules.module_urltitle.handle_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。