Created
May 25, 2015 13:09
-
-
Save Hammer2900/edc40e52d880a44fe5d4 to your computer and use it in GitHub Desktop.
normalize string
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import pafy | |
import re | |
url = "https://www.youtube.com/watch?v=h1klFHmcw64" | |
video = pafy.new(url) | |
print video.title | |
def normalize_name(stringss): | |
return re.sub("\s+", '', stringss) | |
print normalize_name(video.title) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment