本文整理汇总了Python中pyfibot.modules.module_urltitle.handle_url函数的典型用法代码示例。如果您正苦于以下问题:Python handle_url函数的具体用法?Python handle_url怎么用?Python handle_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了handle_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: test_twelve
def test_twelve(botmock):
msg = "http://en.wikipedia.org/wiki/Mr._Bean"
eq_(
(
"#channel",
u"Title: Mr. Bean is a British sitcom created by Rowan Atkinson and Richard Curtis, and starring Atkinson in the title role.",
),
module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
)
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py
示例17: test_eleven
def test_eleven(botmock):
msg = "http://en.wikipedia.org/wiki/Edison_Arantes_do_Nascimento"
eq_(
(
"#channel",
u"Title: Edson Arantes do Nascimento, known as Pelé, is a retired Brazilian professional footballer who played as a forward.",
),
module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
)
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py
示例18: test_nine
def test_nine(botmock):
msg = u"http://fi.wikipedia.org/wiki/Kimi_Räikkönen"
eq_(
(
"#channel",
u"Title: Kimi-Matias Räikkönen on suomalainen autourheilija ja Formula 1 -sarjan maailmanmestari.",
),
module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
)
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py
示例19: test_eight
def test_eight(botmock):
msg = "https://en.wikipedia.org/wiki/Byzantine_art#Periods"
eq_(
(
"#channel",
u"Title: Byzantine art is the name for the artistic products of the Eastern Roman Empire, as well as the nations and states that inherited culturally from the empire.",
),
module_urltitle.handle_url(botmock, None, "#channel", msg, msg),
)
开发者ID:lepinkainen,项目名称:pyfibot,代码行数:9,代码来源:test_wikipedia.py
示例20: test_youtube
def test_youtube():
regex = "Title: (.*?) by (.*?) \[%s - %s views - %s( - age restricted)?\]" % (
lengh_str_regex,
views_str_regex,
age_str_regex,
)
msg = "http://www.youtube.com/watch?v=awsolTK175c"
module_urltitle.init(bot)
check_re(regex, module_urltitle.handle_url(bot, None, "#channel", msg, msg)[1])
开发者ID:BiohZn,项目名称:pyfibot,代码行数:9,代码来源:test_urltitle.py
注:本文中的pyfibot.modules.module_urltitle.handle_url函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论