X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Fwebsites%2Fmotherless.rb;h=ab74fc0b07a883e065cf271e66a20cbef07faa15;hb=58c138db3959115c63f727306ab0cac23bb48038;hp=a5b59b2d709b2aa48d88a4573167caf73ec505df;hpb=1bbc47ddc336e2cba7e8449613dee97f3c58d6ef;p=dead%2Fwhatever-dl.git diff --git a/src/websites/motherless.rb b/src/websites/motherless.rb index a5b59b2..ab74fc0 100644 --- a/src/websites/motherless.rb +++ b/src/websites/motherless.rb @@ -26,22 +26,26 @@ class Motherless < Website return url =~ VALID_MOTHERLESS_URL_REGEX end - + def get_video_url() - page_data = self.get_page_data(@url) + page_data = self.get_page_data(@url) filepath = parse_video_url(page_data) - - return filepath + + # Some videos 403 without this parameter. + get_params = "?start=0" + video_url = filepath + get_params + + return video_url end - + protected; - + def parse_video_url(page_data) # If neither of the source formats are present, just grab the # video URL from the Flash variable and be done with it. - video_url_regex = /file=(.*?\.flv)&/i + video_url_regex = /\'file\', \'(http.*?\.flv)\'/i matches = video_url_regex.match(page_data) if matches.nil?