summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2010-05-10 16:26:44 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2010-05-10 16:26:44 -0400
commit1a4e9efc3e819da5541548fffe43696b6268ce65 (patch)
treeeb3bf6e7f035baeea08144438855a9b0f81d2fad
parentTrim for total lines. (diff)
downloadMovieStatistics-1a4e9efc3e819da5541548fffe43696b6268ce65.tar.xz
MovieStatistics-1a4e9efc3e819da5541548fffe43696b6268ce65.zip
Add for white space differences.
-rw-r--r--YouTubeStats.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/YouTubeStats.py b/YouTubeStats.py
index 4d535ae..f454ebd 100644
--- a/YouTubeStats.py
+++ b/YouTubeStats.py
@@ -25,7 +25,7 @@ def viewCount(keyword):
if html.find("No videos found for") != -1:
return 0
html = html[html.index("<!-- start search results -->") : html.index("<!-- end search results -->")]
- viewCountScrape = findall('class="video-view-count">([0-9,]+) views</span>', html)
+ viewCountScrape = findall('class="video-view-count"[ ]{0,1}>([0-9,]+) views\s{0,1}</span>', html)
if len(viewCountScrape) == 0:
break
for viewCount in viewCountScrape: