new version
This commit is contained in:
@@ -4,7 +4,7 @@ module Danbooru
|
|||||||
class Configuration
|
class Configuration
|
||||||
# The version of this Danbooru.
|
# The version of this Danbooru.
|
||||||
def version
|
def version
|
||||||
"2.74.0"
|
"2.75.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
# The name of this Danbooru.
|
# The name of this Danbooru.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ http_interactions:
|
|||||||
string: ''
|
string: ''
|
||||||
headers:
|
headers:
|
||||||
Accept:
|
Accept:
|
||||||
- ! '*/*'
|
- "*/*"
|
||||||
User-Agent:
|
User-Agent:
|
||||||
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
|
- Mechanize/2.7.2 Ruby/1.9.3p327 (http://github.com/sparklemotion/mechanize/)
|
||||||
Accept-Encoding:
|
Accept-Encoding:
|
||||||
@@ -26,44 +26,27 @@ http_interactions:
|
|||||||
response:
|
response:
|
||||||
status:
|
status:
|
||||||
code: 200
|
code: 200
|
||||||
message: !binary |-
|
message: OK
|
||||||
T0s=
|
|
||||||
headers:
|
headers:
|
||||||
!binary "RGF0ZQ==":
|
Date:
|
||||||
- !binary |-
|
- Wed, 22 Oct 2014 23:36:18 GMT
|
||||||
V2VkLCAyMiBPY3QgMjAxNCAyMzozNjoxOCBHTVQ=
|
Server:
|
||||||
!binary "U2VydmVy":
|
- Apache
|
||||||
- !binary |-
|
Cache-Control:
|
||||||
QXBhY2hl
|
- private
|
||||||
!binary "Q2FjaGUtQ29udHJvbA==":
|
P3p:
|
||||||
- !binary |-
|
- policyref="/w3c/p3p.xml", CP="NOI DSP COR CURa OUR STP"
|
||||||
cHJpdmF0ZQ==
|
Set-Cookie:
|
||||||
!binary "UDNw":
|
- userinfo=__755c7d922c4fde37fc2f%3B%7B%22username%22%3A%22%22%2C%22uniqueid%22%3A%22e3f236af321c5abe76927e7622c37434%22%2C%22vd%22%3A%221414020978%2C1414020978%2C1414020978%2C1%2C157%2C%2C1%2C0%2C1%2C1414020978%2C1414020978%2C1%2C1%2C0%2C1414020978%2C4%2C0%22%7D;
|
||||||
- !binary |-
|
expires=Fri, 21-Nov-2014 23:36:19 GMT; path=/; domain=.deviantart.com
|
||||||
cG9saWN5cmVmPSIvdzNjL3AzcC54bWwiLCBDUD0iTk9JIERTUCBDT1IgQ1VS
|
Content-Encoding:
|
||||||
YSBPVVIgU1RQIg==
|
- gzip
|
||||||
!binary "U2V0LUNvb2tpZQ==":
|
Vary:
|
||||||
- !binary |-
|
- Accept-Encoding
|
||||||
dXNlcmluZm89X183NTVjN2Q5MjJjNGZkZTM3ZmMyZiUzQiU3QiUyMnVzZXJu
|
Transfer-Encoding:
|
||||||
YW1lJTIyJTNBJTIyJTIyJTJDJTIydW5pcXVlaWQlMjIlM0ElMjJlM2YyMzZh
|
- chunked
|
||||||
ZjMyMWM1YWJlNzY5MjdlNzYyMmMzNzQzNCUyMiUyQyUyMnZkJTIyJTNBJTIy
|
Content-Type:
|
||||||
MTQxNDAyMDk3OCUyQzE0MTQwMjA5NzglMkMxNDE0MDIwOTc4JTJDMSUyQzE1
|
- text/html
|
||||||
NyUyQyUyQzElMkMwJTJDMSUyQzE0MTQwMjA5NzglMkMxNDE0MDIwOTc4JTJD
|
|
||||||
MSUyQzElMkMwJTJDMTQxNDAyMDk3OCUyQzQlMkMwJTIyJTdEOyBleHBpcmVz
|
|
||||||
PUZyaSwgMjEtTm92LTIwMTQgMjM6MzY6MTkgR01UOyBwYXRoPS87IGRvbWFp
|
|
||||||
bj0uZGV2aWFudGFydC5jb20=
|
|
||||||
!binary "Q29udGVudC1FbmNvZGluZw==":
|
|
||||||
- !binary |-
|
|
||||||
Z3ppcA==
|
|
||||||
!binary "VmFyeQ==":
|
|
||||||
- !binary |-
|
|
||||||
QWNjZXB0LUVuY29kaW5n
|
|
||||||
!binary "VHJhbnNmZXItRW5jb2Rpbmc=":
|
|
||||||
- !binary |-
|
|
||||||
Y2h1bmtlZA==
|
|
||||||
!binary "Q29udGVudC1UeXBl":
|
|
||||||
- !binary |-
|
|
||||||
dGV4dC9odG1s
|
|
||||||
body:
|
body:
|
||||||
encoding: ASCII-8BIT
|
encoding: ASCII-8BIT
|
||||||
string: !binary |-
|
string: !binary |-
|
||||||
@@ -718,40 +701,30 @@ http_interactions:
|
|||||||
User-Agent:
|
User-Agent:
|
||||||
- _/2.61.0
|
- _/2.61.0
|
||||||
Accept:
|
Accept:
|
||||||
- ! '*/*'
|
- "*/*"
|
||||||
response:
|
response:
|
||||||
status:
|
status:
|
||||||
code: 200
|
code: 200
|
||||||
message: !binary |-
|
message: OK
|
||||||
T0s=
|
|
||||||
headers:
|
headers:
|
||||||
!binary "QWNjZXB0LVJhbmdlcw==":
|
Accept-Ranges:
|
||||||
- !binary |-
|
- bytes
|
||||||
Ynl0ZXM=
|
Cache-Control:
|
||||||
!binary "Q2FjaGUtQ29udHJvbA==":
|
- max-age=31536000
|
||||||
- !binary |-
|
Content-Type:
|
||||||
bWF4LWFnZT0zMTUzNjAwMA==
|
- image/jpeg
|
||||||
!binary "Q29udGVudC1UeXBl":
|
Date:
|
||||||
- !binary |-
|
- Wed, 22 Oct 2014 23:36:19 GMT
|
||||||
aW1hZ2UvanBlZw==
|
Expires:
|
||||||
!binary "RGF0ZQ==":
|
- Thu, 22 Oct 2015 23:36:19 GMT
|
||||||
- !binary |-
|
Last-Modified:
|
||||||
V2VkLCAyMiBPY3QgMjAxNCAyMzozNjoxOSBHTVQ=
|
- Sun, 25 Nov 2012 08:12:40 GMT
|
||||||
!binary "RXhwaXJlcw==":
|
Server:
|
||||||
- !binary |-
|
- ECAcc (cpm/F8B4)
|
||||||
VGh1LCAyMiBPY3QgMjAxNSAyMzozNjoxOSBHTVQ=
|
X-Cache:
|
||||||
!binary "TGFzdC1Nb2RpZmllZA==":
|
- HIT
|
||||||
- !binary |-
|
Content-Length:
|
||||||
U3VuLCAyNSBOb3YgMjAxMiAwODoxMjo0MCBHTVQ=
|
- '255683'
|
||||||
!binary "U2VydmVy":
|
|
||||||
- !binary |-
|
|
||||||
RUNBY2MgKGNwbS9GOEI0KQ==
|
|
||||||
!binary "WC1DYWNoZQ==":
|
|
||||||
- !binary |-
|
|
||||||
SElU
|
|
||||||
!binary "Q29udGVudC1MZW5ndGg=":
|
|
||||||
- !binary |-
|
|
||||||
MjU1Njgz
|
|
||||||
body:
|
body:
|
||||||
encoding: ASCII-8BIT
|
encoding: ASCII-8BIT
|
||||||
string: !binary |-
|
string: !binary |-
|
||||||
@@ -6439,4 +6412,112 @@ http_interactions:
|
|||||||
C6TpU8v8fD7tCo6T3Qk/jQ/HU7VTt3IEbbeI6/8AjqAoZYuv/9k=
|
C6TpU8v8fD7tCo6T3Qk/jQ/HU7VTt3IEbbeI6/8AjqAoZYuv/9k=
|
||||||
http_version:
|
http_version:
|
||||||
recorded_at: Wed, 22 Oct 2014 23:36:24 GMT
|
recorded_at: Wed, 22 Oct 2014 23:36:24 GMT
|
||||||
|
- request:
|
||||||
|
method: get
|
||||||
|
uri: http://www.deviantart.com/download/339610451/resolution_by_mochikko-d5m713n.jpg?token=f828643e6e86a658e80f362745a0b20e20880fc6&ts=1414021578
|
||||||
|
body:
|
||||||
|
encoding: US-ASCII
|
||||||
|
string: ''
|
||||||
|
headers:
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip,deflate,identity
|
||||||
|
Accept:
|
||||||
|
- "*/*"
|
||||||
|
User-Agent:
|
||||||
|
- Mechanize/2.7.2 Ruby/2.1.5p273 (http://github.com/sparklemotion/mechanize/)
|
||||||
|
Accept-Charset:
|
||||||
|
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
|
||||||
|
Accept-Language:
|
||||||
|
- en-us,en;q=0.5
|
||||||
|
Host:
|
||||||
|
- www.deviantart.com
|
||||||
|
Referer:
|
||||||
|
- !ruby/object:URI::HTTP
|
||||||
|
scheme: http
|
||||||
|
user:
|
||||||
|
password:
|
||||||
|
host: mochikko.deviantart.com
|
||||||
|
port: 80
|
||||||
|
path: "/art/RESOLUTION-339610451"
|
||||||
|
query:
|
||||||
|
opaque:
|
||||||
|
registry:
|
||||||
|
fragment:
|
||||||
|
parser:
|
||||||
|
Connection:
|
||||||
|
- keep-alive
|
||||||
|
Keep-Alive:
|
||||||
|
- 300
|
||||||
|
response:
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
headers:
|
||||||
|
Content-Encoding:
|
||||||
|
- gzip
|
||||||
|
Content-Type:
|
||||||
|
- text/html
|
||||||
|
Date:
|
||||||
|
- Sun, 15 Mar 2015 21:03:54 GMT
|
||||||
|
P3p:
|
||||||
|
- policyref="/w3c/p3p.xml", CP="NOI DSP COR CURa OUR STP"
|
||||||
|
Server:
|
||||||
|
- Apache
|
||||||
|
Set-Cookie:
|
||||||
|
- userinfo=__469f48a7e61048916c0c%3B%7B%22username%22%3A%22%22%2C%22uniqueid%22%3A%22196e94ff75a21043bfd7b9ae7eb68e09%22%2C%22vd%22%3A%221426453434%2C1426453434%2C0%2C1%2C0%2C%2C1%2C0%2C1%2C1426453434%2C1426453434%2C0%2C0%2C0%2C0%2C8%2C0%2C1%2C0%2C%2C0%2C0%22%7D;
|
||||||
|
expires=Tue, 14-Apr-2015 21:03:54 GMT; path=/; domain=.deviantart.com
|
||||||
|
Vary:
|
||||||
|
- Accept-Encoding
|
||||||
|
Content-Length:
|
||||||
|
- '210'
|
||||||
|
body:
|
||||||
|
encoding: ASCII-8BIT
|
||||||
|
string: !binary |-
|
||||||
|
H4sIAAAAAAAAA3XQwUoDQQwG4FcZ9u7E0lZoSeciHgpiodrbXsaZyMTdnSzT
|
||||||
|
2Nq3t+0getDbz0/4QoJJh95hIh8dKmtPbkuRCwVlyQi1QqgDrxJPDveh8KhG
|
||||||
|
TyOtGqVPhXd/8LVt3JFzlKPtJfgLYVOht1WTVMdlCy0MEhJ3ndhIB/ZZfVEb
|
||||||
|
ZGjhHFrYPjxvHncv683TzXS6uJvczuaTBqHaDrN8J29+ufCfekH/Nt19z6Ez
|
||||||
|
iQoZFRMkK+cPsgj+fO3PHqgnw/VNX+b/CdYtAQAA
|
||||||
|
http_version:
|
||||||
|
recorded_at: Sun, 15 Mar 2015 21:03:54 GMT
|
||||||
|
- request:
|
||||||
|
method: get
|
||||||
|
uri: http://www.deviantart.com/download/339610451/resolution_by_mochikko-d5m713n.jpg?token=f828643e6e86a658e80f362745a0b20e20880fc6&ts=1414021578
|
||||||
|
body:
|
||||||
|
encoding: US-ASCII
|
||||||
|
string: ''
|
||||||
|
headers:
|
||||||
|
User-Agent:
|
||||||
|
- Danbooru/2.74.0
|
||||||
|
Accept-Encoding:
|
||||||
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
||||||
|
Accept:
|
||||||
|
- "*/*"
|
||||||
|
response:
|
||||||
|
status:
|
||||||
|
code: 200
|
||||||
|
message: OK
|
||||||
|
headers:
|
||||||
|
Content-Type:
|
||||||
|
- text/html
|
||||||
|
Date:
|
||||||
|
- Sun, 15 Mar 2015 21:03:54 GMT
|
||||||
|
P3p:
|
||||||
|
- policyref="/w3c/p3p.xml", CP="NOI DSP COR CURa OUR STP"
|
||||||
|
Server:
|
||||||
|
- Apache
|
||||||
|
Set-Cookie:
|
||||||
|
- userinfo=__7a17ba46fc166f97abde%3B%7B%22username%22%3A%22%22%2C%22uniqueid%22%3A%2219479ea891a58534c643ccb9538256fd%22%2C%22vd%22%3A%221426453434%2C1426453434%2C0%2C1%2C0%2C%2C1%2C0%2C1%2C1426453434%2C1426453434%2C0%2C0%2C0%2C0%2C8%2C0%2C1%2C0%2C%2C0%2C0%22%7D;
|
||||||
|
expires=Tue, 14-Apr-2015 21:03:54 GMT; path=/; domain=.deviantart.com
|
||||||
|
Vary:
|
||||||
|
- Accept-Encoding
|
||||||
|
Content-Length:
|
||||||
|
- '210'
|
||||||
|
body:
|
||||||
|
encoding: UTF-8
|
||||||
|
string: <html><head><title>Redirection</title></head><body><script type="text/javascript">window.location.href="http:\/\/mochikko.deviantart.com\/art\/RESOLUTION-339610451"</script><noscript><a
|
||||||
|
href="http://mochikko.deviantart.com/art/RESOLUTION-339610451">Click here
|
||||||
|
to continue.</a></noscript></body></html>
|
||||||
|
http_version:
|
||||||
|
recorded_at: Sun, 15 Mar 2015 21:03:54 GMT
|
||||||
recorded_with: VCR 2.9.0
|
recorded_with: VCR 2.9.0
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ module Downloads
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "set the direct image link as the source" do
|
should "set the direct image link as the source" do
|
||||||
assert_equal("http://fc03.deviantart.net/fs71/f/2012/330/e/7/resolution_by_mochikko-d5m713n.jpg", @download.source)
|
assert_equal("http://www.deviantart.com/download/339610451/resolution_by_mochikko-d5m713n.jpg?token=f828643e6e86a658e80f362745a0b20e20880fc6&ts=1414021578", @download.source)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "work" do
|
should "work" do
|
||||||
@@ -26,7 +26,7 @@ module Downloads
|
|||||||
@source = "http://fc03.deviantart.net/fs71/200H/f/2012/330/e/7/resolution_by_mochikko-d5m713n.jpg"
|
@source = "http://fc03.deviantart.net/fs71/200H/f/2012/330/e/7/resolution_by_mochikko-d5m713n.jpg"
|
||||||
@tempfile = Tempfile.new("danbooru-test")
|
@tempfile = Tempfile.new("danbooru-test")
|
||||||
@download = Downloads::File.new(@source, @tempfile.path)
|
@download = Downloads::File.new(@source, @tempfile.path)
|
||||||
VCR.use_cassette("download-deviant-art-thumb", :record => :new_episodes) do
|
VCR.use_cassette("download-deviant-art-thumb", :record => :none) do
|
||||||
@download.download!
|
@download.download!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user