LinkTitler — Fetch url information

Grabs titles and other info of links posted into the channel.

Supported services:

  • Youtube
  • Reddit

Other URLs will grab the <title> element for html pages, or Content-Type header and length for any other kind of file.

Class Reference

class pyircbot.modules.LinkTitler.LinkTitler(bot, moduleName)[source]

Bases: pyircbot.modulebase.ModuleBase

doLinkTitle(args, sender, trailing)[source]
getISOdurationseconds(stamp)[source]
get_reddit_submission(subid)[source]
get_video_description(vid_id)[source]
group_int_digits(number, delimiter=', ', grouping=3)[source]
nicesize(numBytes)[source]

Return kb or plain bytes

searches(msg, cmd)[source]
url_headers(url)[source]

HEAD requests a url to check content type & length. Returns something like: {‘type’: ‘image/jpeg’, ‘size’: ‘90583’}”

url_htmltitle(url)[source]

Requests page html and returns title in a safe way