diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2010-05-10 16:26:44 -0400 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2010-05-10 16:26:44 -0400 |
commit | 1a4e9efc3e819da5541548fffe43696b6268ce65 (patch) | |
tree | eb3bf6e7f035baeea08144438855a9b0f81d2fad | |
parent | Trim for total lines. (diff) | |
download | MovieStatistics-1a4e9efc3e819da5541548fffe43696b6268ce65.tar.xz MovieStatistics-1a4e9efc3e819da5541548fffe43696b6268ce65.zip |
Add for white space differences.
-rw-r--r-- | YouTubeStats.py | 2 |
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: |