Posts Tagged ‘ download ’
Aby ściągnąć pliki z wrzuty w Ruby, należy ze strony danego adresu odczytać zmienne javascript-u które zostaną przekazane do odtwarzacza napisanego we flashu. require 'net/http' require 'uri' require 'rexml/document' def get(url) url = URI.parse(url) http = Net::HTTP.new(url.host) return http.get(url.path).body end page = get(url) #zczytanie zmiennych javascript if page =~ /'key' : '([^']*)',/ key = $1 [ READ MORE ]
Poniżej podaje skrypt w ruby do ściągania plików z przekleja #!/usr/bin/ruby require "net/http" require "uri" require "getoptlong" class FileToBigException < Exception end class FileDeletedException < Exception end class LinkErrorException < Exception end def file(name) File.open(name) {|file| return file.read() } end def host(url) url =~ /http:\/\/([^\/]*)\// return $1 end def trail_slash(url) if url =~ /http:\/\/[^\/]*$/ url [ READ MORE ]
I’ve create my first github project Downloader. It’s a Ruby script for download files from file hosting services. You can download files from 4shared, rapidshare, przeklej, filesonic and wrzuta. You can download it from github or from here. You can use it: download.rb <url> or download.rb -f <file with urls> If you download files from [ READ MORE ]
Here are function writen in Python for downloading files from Rapidshare. Unfortunetly you must wait couple of seconds, you can’t skip this because it seems that counting is on server side too. from urllib2 import urlopen, Request from urllib import urlencode import os import re import time import base64 class DownloadLimitException(Exception): def __init__(self, *arg): Exception.__init__(self, [ READ MORE ]
Get every new post delivered to your Inbox.
Join 69 other followers