Show
Ignore:
Timestamp:
04/13/09 13:11:05 (4 years ago)
Author:
valda
Message:

veoh の URL のバリエーションを追加

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/video_scraper/lib/www/video_scraper/veoh.rb

    r30120 r32340  
    66  module VideoScraper 
    77    class Veoh < Base 
    8       url_regex [%r!\Ahttp://www\.veoh\.com/videos/([[:alnum:]]+)!, 
    9                  %r!\Ahttp://www\.veoh\.com/collection/\w+/watch/.*#watch%3[Dd]([[:alnum:]]+)!, 
    10                  %r!\Ahttp://www\.veoh\.com/collection/\w+/watch/([[:alnum:]]+)!] 
     8      url_regex [%r!\Ahttp://www\.veoh\.com/videos/(v\d+[[:alnum:]]+)!, 
     9                 %r!\Ahttp://www\.veoh\.com/collection/\w+/watch/.*#watch%3[Dd](v\d+[[:alnum:]]+)!, 
     10                 %r!\Ahttp://www\.veoh\.com/(?:browse|collection)/(?:[\w]+/)+watch/(v\d+[[:alnum:]]+)!] 
    1111 
    1212      def scrape 
     
    1919        @thumb_url = xml.match(/fullMedResImagePath="([^"]+)"/).to_a[1] 
    2020        html = http_get(@page_url) 
    21         if embed_tag = html.match(/\sid="embed"\s[^>]*value="([^"]+)"/).to_a[1] 
     21        #logger.debug html 
     22        if embed_tag = html.match(/class="embedinput"\s[^>]*value="([^"]+)"/).to_a[1] 
    2223          @embed_tag = CGI.unescapeHTML(embed_tag) 
    2324        end