本文整理匯總了Python中scrobbler.Scrobbler.find_clan方法的典型用法代碼示例。如果您正苦於以下問題:Python Scrobbler.find_clan方法的具體用法?Python Scrobbler.find_clan怎麽用?Python Scrobbler.find_clan使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類scrobbler.Scrobbler
的用法示例。
在下文中一共展示了Scrobbler.find_clan方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Scrobbler
# 需要導入模塊: from scrobbler import Scrobbler [as 別名]
# 或者: from scrobbler.Scrobbler import find_clan [as 別名]
scrob = Scrobbler(max_rank=12000)
scrob.build_headers('NA')
data = scrob.scrobble()
print 'indexed players: ', str(scrob.current_count) + "/" + str(scrob.total_count) + " (" + str(
round((float(scrob.current_count) / float(scrob.total_count)) * 100)) + "\%)", 'pages scrobbled: ', scrob.current_page
print ''
print '-----------------------------------------'
print 'Clan Search: QuickyBaby\'s Special forces'
print '-----------------------------------------'
players = texttable.Texttable(max_width=0)
players.set_deco(texttable.Texttable.HEADER)
players.set_cols_dtype(['i', 'i', 't', 't', 'i', 'i', 'i'])
players.add_row(['Current Rank', 'Real Rank', 'Name', 'Clan', 'Points', 'Delta', 'Real Delta'])
for x in scrob.find_clan(['otter']):
players.add_row(
[x['position'], x['real_position'], x['name'], scrob.clans[x['clan']]['tag'].upper(), x['points'],
x['delta'], x['real_delta']])
print players.draw()
print ''
print '------------------------------------------'
print 'top clans by number of players in top 10 k'
print '------------------------------------------'
clans = texttable.Texttable(max_width=0)
clans.set_deco(texttable.Texttable.HEADER)
clans.set_cols_dtype(['i', 't', 't', 'i'])
clans.add_row(['Current Rank', 'Name', 'Tag', 'Players in Top 10K'])