Open ghost opened 9 years ago
Yes I get the very same line 28 error using ruby 2.1.2 p95 on Linux. I could "fix" it, but then the script would be a no-op:
def get_var(doc, var)
regex = /var #{var} ?= ?(\d*%\d*);/
if !doc[regex].nil?
value = doc[regex].gsub(regex, '\1')
eval value
else
puts "Error! Parsing the document returned nothing."
end
end
The "bug" is that applying the regular expression regex
on doc
gives nothing at all, so gsub() fails because it cannot operate on a nil value. Maybe there is simply some bug in the regex, OR for some reason the document doc
does not get loaded in the first place.
The problem is that Zippyshare has changed their Javascript code (that makes their Download Link work) since this script was released, and from my understanding they will continue to do so (so that all scripts that allow direct downloading are rendered useless).
Re-writing the script is currently too much work for me, and I will not be doing that in the near future but I will gladly accept any Pull Requests that update the script for their new code.
Can you read bash? :P https://github.com/andreas--e/zippydl/blob/master/zippydl.sh Did a complete rewrite of an older (and, due to countless typos, non-working) script I found on GH.
Feel free to take this as a basis to "translate" this script to Ruby. (I don't know jack shizzle about Ruby, so you had better not count on me :P)
zippy http://www11.zippyshare.com/v/KoaO0sET/file.html
/usr/local/bin/zippy:28:in'
from /usr/local/bin/zippy:66:in '
get_var': undefined method
gsub' for nil:NilClass (NoMethodError) from /usr/local/bin/zippy:47:indo_magic' from /usr/local/bin/zippy:67:in
block ineach' from /usr/local/bin/zippy:66:in