forked from sopel-irc/sopel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[web,modules,setup] More python 3 compatibility
Most modules should now work with Python 3. Work is in progress to get the rest of them fixed.
- Loading branch information
Elad Alfassa
committed
Feb 22, 2014
1 parent
95ba19a
commit 2212563
Showing
4 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
""" | ||
youtube.py - Willie YouTube Module | ||
Copyright 2012, Dimitri Molenaars, Tyrope.nl. | ||
Copyright © 2012-2013, Elad Alfassa, <[email protected]> | ||
Copyright © 2012-2014, Elad Alfassa, <[email protected]> | ||
Copyright 2012, Edward Powell, embolalia.net | ||
Licensed under the Eiffel Forum License 2. | ||
|
@@ -15,8 +15,11 @@ | |
from willie.module import rule, commands, example | ||
import json | ||
import re | ||
from HTMLParser import HTMLParser | ||
|
||
import sys | ||
if sys.version_info.major < 3: | ||
from HTMLParser import HTMLParser | ||
else: | ||
from html.parser import HTMLParser | ||
|
||
def setup(bot): | ||
regex = re.compile('(youtube.com/watch\S*v=|youtu.be/)([\w-]+)') | ||
|