X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fwebsites%2Fefukt.rb;h=38b5913e0da242daabd80d2fc9b765972072667f;hb=c7d261ee6e515bb613104ad905b0ed95f2070fae;hp=4d5d397d24e1fa093927d1fce749aae228494f57;hpb=174589cd65cf32d4a54b9298953228f6094c7128;p=dead%2Fwhatever-dl.git diff --git a/src/websites/efukt.rb b/src/websites/efukt.rb index 4d5d397..38b5913 100644 --- a/src/websites/efukt.rb +++ b/src/websites/efukt.rb @@ -43,7 +43,7 @@ class Efukt < Website # Most of the URLs will just be the video's id, # followed by an underscore and the video title (with - # all spaces replaced by underscores. Sounds look a good + # all spaces replaced by underscores. Sounds like a good # filename to me. filename_regex = /\/([[:alnum:]_]+)\.html/ matches = filename_regex.match(@url) @@ -60,11 +60,20 @@ class Efukt < Website # Get the FLV file URL from the HTML page for this movie. # It's stored in some Flash variable. def parse_video_url(page_data) + # There are two formats; try them both one at a time. video_url_regex = /&file=(http:\/\/.*\.flv)&/i matches = video_url_regex.match(page_data) + if not (matches.nil? || matches.length < 2) + return matches[1] + end + + # If we didn't return a match already, try the second format. + video_url_regex = /