diff --git a/test/complex/index.html b/test/complex/index.html index a70c179..aa62834 100644 --- a/test/complex/index.html +++ b/test/complex/index.html @@ -5,196 +5,7 @@ -
-

Check download order

- - - -
-
-

Data URI

- -
-
-

Test duplicate detection (1/2)

- - - -
-
-

Test duplicate detection (2/2)

- - -
-
-

Test remote link extraction with CORS

- jpg link -
-
-

Test page digging (deep=2, deep=3)

- - - -
-
-

Test width and height extraction from different image types

- -
-
-

Image inside Source Element

- - - -
-
-

Detect Image from unknown Extension

- Image Link | Big ISO Link -
-
-

No preview with the "referer" header

- -
-
-

Unicode filenames

- - -
-
-

Text Image

-
http://127.0.0.1:8000/text.png
-
-
-

Test Image Extraction from inputs

- - -
-
-

Detect SVG

- -
- -
-

Big Set

- 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 1 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - 3 - - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - 4 - - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 - 5 -

Remote Pages

diff --git a/test/complex/order.html b/test/complex/order.html deleted file mode 100644 index 082dec1..0000000 --- a/test/complex/order.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/test/simples/one/edit.svg b/test/simples/1/edit.svg similarity index 100% rename from test/simples/one/edit.svg rename to test/simples/1/edit.svg diff --git a/test/simples/one/index.css b/test/simples/1/index.css similarity index 100% rename from test/simples/one/index.css rename to test/simples/1/index.css diff --git a/test/simples/one/index.html b/test/simples/1/index.html similarity index 100% rename from test/simples/one/index.html rename to test/simples/1/index.html diff --git a/test/simples/10/index.html b/test/simples/10/index.html new file mode 100644 index 0000000..106e210 --- /dev/null +++ b/test/simples/10/index.html @@ -0,0 +1,15 @@ + + + + + + + + +
+

Unicode filenames

+ + +
+ + diff --git "a/test/complex/unicode/\330\265\331\210\330\261\330\251.png" "b/test/simples/10/unicode/\330\265\331\210\330\261\330\251.png" similarity index 100% rename from "test/complex/unicode/\330\265\331\210\330\261\330\251.png" rename to "test/simples/10/unicode/\330\265\331\210\330\261\330\251.png" diff --git "a/test/complex/unicode/\347\224\273\345\203\217.png" "b/test/simples/10/unicode/\347\224\273\345\203\217.png" similarity index 100% rename from "test/complex/unicode/\347\224\273\345\203\217.png" rename to "test/simples/10/unicode/\347\224\273\345\203\217.png" diff --git a/test/simples/11/index.html b/test/simples/11/index.html new file mode 100644 index 0000000..769dcf2 --- /dev/null +++ b/test/simples/11/index.html @@ -0,0 +1,20 @@ + + + + + + + + +
+

Image inside Source Element

+ + + + + + + +
+ + diff --git a/test/complex/source/source.png b/test/simples/11/source/one.png similarity index 100% rename from test/complex/source/source.png rename to test/simples/11/source/one.png diff --git a/test/simples/11/source/three.png b/test/simples/11/source/three.png new file mode 100644 index 0000000..77b8412 Binary files /dev/null and b/test/simples/11/source/three.png differ diff --git a/test/simples/11/source/two.png b/test/simples/11/source/two.png new file mode 100644 index 0000000..77b8412 Binary files /dev/null and b/test/simples/11/source/two.png differ diff --git a/test/complex/big/1/1.jpg b/test/simples/12/big/1/1.jpg similarity index 100% rename from test/complex/big/1/1.jpg rename to test/simples/12/big/1/1.jpg diff --git a/test/complex/big/1/10.jpg b/test/simples/12/big/1/10.jpg similarity index 100% rename from test/complex/big/1/10.jpg rename to test/simples/12/big/1/10.jpg diff --git a/test/complex/big/1/11.jpg b/test/simples/12/big/1/11.jpg similarity index 100% rename from test/complex/big/1/11.jpg rename to test/simples/12/big/1/11.jpg diff --git a/test/complex/big/1/12.jpg b/test/simples/12/big/1/12.jpg similarity index 100% rename from test/complex/big/1/12.jpg rename to test/simples/12/big/1/12.jpg diff --git a/test/complex/big/1/13.jpg b/test/simples/12/big/1/13.jpg similarity index 100% rename from test/complex/big/1/13.jpg rename to test/simples/12/big/1/13.jpg diff --git a/test/complex/big/1/14.jpg b/test/simples/12/big/1/14.jpg similarity index 100% rename from test/complex/big/1/14.jpg rename to test/simples/12/big/1/14.jpg diff --git a/test/complex/big/1/15.jpg b/test/simples/12/big/1/15.jpg similarity index 100% rename from test/complex/big/1/15.jpg rename to test/simples/12/big/1/15.jpg diff --git a/test/complex/big/1/16.jpg b/test/simples/12/big/1/16.jpg similarity index 100% rename from test/complex/big/1/16.jpg rename to test/simples/12/big/1/16.jpg diff --git a/test/complex/big/1/17.jpg b/test/simples/12/big/1/17.jpg similarity index 100% rename from test/complex/big/1/17.jpg rename to test/simples/12/big/1/17.jpg diff --git a/test/complex/big/1/18.jpg b/test/simples/12/big/1/18.jpg similarity index 100% rename from test/complex/big/1/18.jpg rename to test/simples/12/big/1/18.jpg diff --git a/test/complex/big/1/19.jpg b/test/simples/12/big/1/19.jpg similarity index 100% rename from test/complex/big/1/19.jpg rename to test/simples/12/big/1/19.jpg diff --git a/test/complex/big/1/2.jpg b/test/simples/12/big/1/2.jpg similarity index 100% rename from test/complex/big/1/2.jpg rename to test/simples/12/big/1/2.jpg diff --git a/test/complex/big/1/20.jpg b/test/simples/12/big/1/20.jpg similarity index 100% rename from test/complex/big/1/20.jpg rename to test/simples/12/big/1/20.jpg diff --git a/test/complex/big/1/3.jpg b/test/simples/12/big/1/3.jpg similarity index 100% rename from test/complex/big/1/3.jpg rename to test/simples/12/big/1/3.jpg diff --git a/test/complex/big/1/4.jpg b/test/simples/12/big/1/4.jpg similarity index 100% rename from test/complex/big/1/4.jpg rename to test/simples/12/big/1/4.jpg diff --git a/test/complex/big/1/5.jpg b/test/simples/12/big/1/5.jpg similarity index 100% rename from test/complex/big/1/5.jpg rename to test/simples/12/big/1/5.jpg diff --git a/test/complex/big/1/6.jpg b/test/simples/12/big/1/6.jpg similarity index 100% rename from test/complex/big/1/6.jpg rename to test/simples/12/big/1/6.jpg diff --git a/test/complex/big/1/7.jpg b/test/simples/12/big/1/7.jpg similarity index 100% rename from test/complex/big/1/7.jpg rename to test/simples/12/big/1/7.jpg diff --git a/test/complex/big/1/8.jpg b/test/simples/12/big/1/8.jpg similarity index 100% rename from test/complex/big/1/8.jpg rename to test/simples/12/big/1/8.jpg diff --git a/test/complex/big/1/9.jpg b/test/simples/12/big/1/9.jpg similarity index 100% rename from test/complex/big/1/9.jpg rename to test/simples/12/big/1/9.jpg diff --git a/test/complex/big/2/1.jpg b/test/simples/12/big/2/1.jpg similarity index 100% rename from test/complex/big/2/1.jpg rename to test/simples/12/big/2/1.jpg diff --git a/test/complex/big/2/10.jpg b/test/simples/12/big/2/10.jpg similarity index 100% rename from test/complex/big/2/10.jpg rename to test/simples/12/big/2/10.jpg diff --git a/test/complex/big/2/11.jpg b/test/simples/12/big/2/11.jpg similarity index 100% rename from test/complex/big/2/11.jpg rename to test/simples/12/big/2/11.jpg diff --git a/test/complex/big/2/12.jpg b/test/simples/12/big/2/12.jpg similarity index 100% rename from test/complex/big/2/12.jpg rename to test/simples/12/big/2/12.jpg diff --git a/test/complex/big/2/13.jpg b/test/simples/12/big/2/13.jpg similarity index 100% rename from test/complex/big/2/13.jpg rename to test/simples/12/big/2/13.jpg diff --git a/test/complex/big/2/14.jpg b/test/simples/12/big/2/14.jpg similarity index 100% rename from test/complex/big/2/14.jpg rename to test/simples/12/big/2/14.jpg diff --git a/test/complex/big/2/15.jpg b/test/simples/12/big/2/15.jpg similarity index 100% rename from test/complex/big/2/15.jpg rename to test/simples/12/big/2/15.jpg diff --git a/test/complex/big/2/16.jpg b/test/simples/12/big/2/16.jpg similarity index 100% rename from test/complex/big/2/16.jpg rename to test/simples/12/big/2/16.jpg diff --git a/test/complex/big/2/17.jpg b/test/simples/12/big/2/17.jpg similarity index 100% rename from test/complex/big/2/17.jpg rename to test/simples/12/big/2/17.jpg diff --git a/test/complex/big/2/18.jpg b/test/simples/12/big/2/18.jpg similarity index 100% rename from test/complex/big/2/18.jpg rename to test/simples/12/big/2/18.jpg diff --git a/test/complex/big/2/19.jpg b/test/simples/12/big/2/19.jpg similarity index 100% rename from test/complex/big/2/19.jpg rename to test/simples/12/big/2/19.jpg diff --git a/test/complex/big/2/2.jpg b/test/simples/12/big/2/2.jpg similarity index 100% rename from test/complex/big/2/2.jpg rename to test/simples/12/big/2/2.jpg diff --git a/test/complex/big/2/20.jpg b/test/simples/12/big/2/20.jpg similarity index 100% rename from test/complex/big/2/20.jpg rename to test/simples/12/big/2/20.jpg diff --git a/test/complex/big/2/3.jpg b/test/simples/12/big/2/3.jpg similarity index 100% rename from test/complex/big/2/3.jpg rename to test/simples/12/big/2/3.jpg diff --git a/test/complex/big/2/4.jpg b/test/simples/12/big/2/4.jpg similarity index 100% rename from test/complex/big/2/4.jpg rename to test/simples/12/big/2/4.jpg diff --git a/test/complex/big/2/5.jpg b/test/simples/12/big/2/5.jpg similarity index 100% rename from test/complex/big/2/5.jpg rename to test/simples/12/big/2/5.jpg diff --git a/test/complex/big/2/6.jpg b/test/simples/12/big/2/6.jpg similarity index 100% rename from test/complex/big/2/6.jpg rename to test/simples/12/big/2/6.jpg diff --git a/test/complex/big/2/7.jpg b/test/simples/12/big/2/7.jpg similarity index 100% rename from test/complex/big/2/7.jpg rename to test/simples/12/big/2/7.jpg diff --git a/test/complex/big/2/8.jpg b/test/simples/12/big/2/8.jpg similarity index 100% rename from test/complex/big/2/8.jpg rename to test/simples/12/big/2/8.jpg diff --git a/test/complex/big/2/9.jpg b/test/simples/12/big/2/9.jpg similarity index 100% rename from test/complex/big/2/9.jpg rename to test/simples/12/big/2/9.jpg diff --git a/test/complex/big/3/1.jpg b/test/simples/12/big/3/1.jpg similarity index 100% rename from test/complex/big/3/1.jpg rename to test/simples/12/big/3/1.jpg diff --git a/test/complex/big/3/10.jpg b/test/simples/12/big/3/10.jpg similarity index 100% rename from test/complex/big/3/10.jpg rename to test/simples/12/big/3/10.jpg diff --git a/test/complex/big/3/11.jpg b/test/simples/12/big/3/11.jpg similarity index 100% rename from test/complex/big/3/11.jpg rename to test/simples/12/big/3/11.jpg diff --git a/test/complex/big/3/12.jpg b/test/simples/12/big/3/12.jpg similarity index 100% rename from test/complex/big/3/12.jpg rename to test/simples/12/big/3/12.jpg diff --git a/test/complex/big/3/13.jpg b/test/simples/12/big/3/13.jpg similarity index 100% rename from test/complex/big/3/13.jpg rename to test/simples/12/big/3/13.jpg diff --git a/test/complex/big/3/14.jpg b/test/simples/12/big/3/14.jpg similarity index 100% rename from test/complex/big/3/14.jpg rename to test/simples/12/big/3/14.jpg diff --git a/test/complex/big/3/15.jpg b/test/simples/12/big/3/15.jpg similarity index 100% rename from test/complex/big/3/15.jpg rename to test/simples/12/big/3/15.jpg diff --git a/test/complex/big/3/16.jpg b/test/simples/12/big/3/16.jpg similarity index 100% rename from test/complex/big/3/16.jpg rename to test/simples/12/big/3/16.jpg diff --git a/test/complex/big/3/17.jpg b/test/simples/12/big/3/17.jpg similarity index 100% rename from test/complex/big/3/17.jpg rename to test/simples/12/big/3/17.jpg diff --git a/test/complex/big/3/18.jpg b/test/simples/12/big/3/18.jpg similarity index 100% rename from test/complex/big/3/18.jpg rename to test/simples/12/big/3/18.jpg diff --git a/test/complex/big/3/19.jpg b/test/simples/12/big/3/19.jpg similarity index 100% rename from test/complex/big/3/19.jpg rename to test/simples/12/big/3/19.jpg diff --git a/test/complex/big/3/2.jpg b/test/simples/12/big/3/2.jpg similarity index 100% rename from test/complex/big/3/2.jpg rename to test/simples/12/big/3/2.jpg diff --git a/test/complex/big/3/20.jpg b/test/simples/12/big/3/20.jpg similarity index 100% rename from test/complex/big/3/20.jpg rename to test/simples/12/big/3/20.jpg diff --git a/test/complex/big/3/3.jpg b/test/simples/12/big/3/3.jpg similarity index 100% rename from test/complex/big/3/3.jpg rename to test/simples/12/big/3/3.jpg diff --git a/test/complex/big/3/4.jpg b/test/simples/12/big/3/4.jpg similarity index 100% rename from test/complex/big/3/4.jpg rename to test/simples/12/big/3/4.jpg diff --git a/test/complex/big/3/5.jpg b/test/simples/12/big/3/5.jpg similarity index 100% rename from test/complex/big/3/5.jpg rename to test/simples/12/big/3/5.jpg diff --git a/test/complex/big/3/6.jpg b/test/simples/12/big/3/6.jpg similarity index 100% rename from test/complex/big/3/6.jpg rename to test/simples/12/big/3/6.jpg diff --git a/test/complex/big/3/7.jpg b/test/simples/12/big/3/7.jpg similarity index 100% rename from test/complex/big/3/7.jpg rename to test/simples/12/big/3/7.jpg diff --git a/test/complex/big/3/8.jpg b/test/simples/12/big/3/8.jpg similarity index 100% rename from test/complex/big/3/8.jpg rename to test/simples/12/big/3/8.jpg diff --git a/test/complex/big/3/9.jpg b/test/simples/12/big/3/9.jpg similarity index 100% rename from test/complex/big/3/9.jpg rename to test/simples/12/big/3/9.jpg diff --git a/test/complex/big/4/1.jpg b/test/simples/12/big/4/1.jpg similarity index 100% rename from test/complex/big/4/1.jpg rename to test/simples/12/big/4/1.jpg diff --git a/test/complex/big/4/10.jpg b/test/simples/12/big/4/10.jpg similarity index 100% rename from test/complex/big/4/10.jpg rename to test/simples/12/big/4/10.jpg diff --git a/test/complex/big/4/11.jpg b/test/simples/12/big/4/11.jpg similarity index 100% rename from test/complex/big/4/11.jpg rename to test/simples/12/big/4/11.jpg diff --git a/test/complex/big/4/12.jpg b/test/simples/12/big/4/12.jpg similarity index 100% rename from test/complex/big/4/12.jpg rename to test/simples/12/big/4/12.jpg diff --git a/test/complex/big/4/13.jpg b/test/simples/12/big/4/13.jpg similarity index 100% rename from test/complex/big/4/13.jpg rename to test/simples/12/big/4/13.jpg diff --git a/test/complex/big/4/14.jpg b/test/simples/12/big/4/14.jpg similarity index 100% rename from test/complex/big/4/14.jpg rename to test/simples/12/big/4/14.jpg diff --git a/test/complex/big/4/15.jpg b/test/simples/12/big/4/15.jpg similarity index 100% rename from test/complex/big/4/15.jpg rename to test/simples/12/big/4/15.jpg diff --git a/test/complex/big/4/16.jpg b/test/simples/12/big/4/16.jpg similarity index 100% rename from test/complex/big/4/16.jpg rename to test/simples/12/big/4/16.jpg diff --git a/test/complex/big/4/17.jpg b/test/simples/12/big/4/17.jpg similarity index 100% rename from test/complex/big/4/17.jpg rename to test/simples/12/big/4/17.jpg diff --git a/test/complex/big/4/18.jpg b/test/simples/12/big/4/18.jpg similarity index 100% rename from test/complex/big/4/18.jpg rename to test/simples/12/big/4/18.jpg diff --git a/test/complex/big/4/19.jpg b/test/simples/12/big/4/19.jpg similarity index 100% rename from test/complex/big/4/19.jpg rename to test/simples/12/big/4/19.jpg diff --git a/test/complex/big/4/2.jpg b/test/simples/12/big/4/2.jpg similarity index 100% rename from test/complex/big/4/2.jpg rename to test/simples/12/big/4/2.jpg diff --git a/test/complex/big/4/20.jpg b/test/simples/12/big/4/20.jpg similarity index 100% rename from test/complex/big/4/20.jpg rename to test/simples/12/big/4/20.jpg diff --git a/test/complex/big/4/3.jpg b/test/simples/12/big/4/3.jpg similarity index 100% rename from test/complex/big/4/3.jpg rename to test/simples/12/big/4/3.jpg diff --git a/test/complex/big/4/4.jpg b/test/simples/12/big/4/4.jpg similarity index 100% rename from test/complex/big/4/4.jpg rename to test/simples/12/big/4/4.jpg diff --git a/test/complex/big/4/5.jpg b/test/simples/12/big/4/5.jpg similarity index 100% rename from test/complex/big/4/5.jpg rename to test/simples/12/big/4/5.jpg diff --git a/test/complex/big/4/6.jpg b/test/simples/12/big/4/6.jpg similarity index 100% rename from test/complex/big/4/6.jpg rename to test/simples/12/big/4/6.jpg diff --git a/test/complex/big/4/7.jpg b/test/simples/12/big/4/7.jpg similarity index 100% rename from test/complex/big/4/7.jpg rename to test/simples/12/big/4/7.jpg diff --git a/test/complex/big/4/8.jpg b/test/simples/12/big/4/8.jpg similarity index 100% rename from test/complex/big/4/8.jpg rename to test/simples/12/big/4/8.jpg diff --git a/test/complex/big/4/9.jpg b/test/simples/12/big/4/9.jpg similarity index 100% rename from test/complex/big/4/9.jpg rename to test/simples/12/big/4/9.jpg diff --git a/test/complex/big/5/1.jpg b/test/simples/12/big/5/1.jpg similarity index 100% rename from test/complex/big/5/1.jpg rename to test/simples/12/big/5/1.jpg diff --git a/test/complex/big/5/10.jpg b/test/simples/12/big/5/10.jpg similarity index 100% rename from test/complex/big/5/10.jpg rename to test/simples/12/big/5/10.jpg diff --git a/test/complex/big/5/11.jpg b/test/simples/12/big/5/11.jpg similarity index 100% rename from test/complex/big/5/11.jpg rename to test/simples/12/big/5/11.jpg diff --git a/test/complex/big/5/12.jpg b/test/simples/12/big/5/12.jpg similarity index 100% rename from test/complex/big/5/12.jpg rename to test/simples/12/big/5/12.jpg diff --git a/test/complex/big/5/13.jpg b/test/simples/12/big/5/13.jpg similarity index 100% rename from test/complex/big/5/13.jpg rename to test/simples/12/big/5/13.jpg diff --git a/test/complex/big/5/14.jpg b/test/simples/12/big/5/14.jpg similarity index 100% rename from test/complex/big/5/14.jpg rename to test/simples/12/big/5/14.jpg diff --git a/test/complex/big/5/15.jpg b/test/simples/12/big/5/15.jpg similarity index 100% rename from test/complex/big/5/15.jpg rename to test/simples/12/big/5/15.jpg diff --git a/test/complex/big/5/16.jpg b/test/simples/12/big/5/16.jpg similarity index 100% rename from test/complex/big/5/16.jpg rename to test/simples/12/big/5/16.jpg diff --git a/test/complex/big/5/17.jpg b/test/simples/12/big/5/17.jpg similarity index 100% rename from test/complex/big/5/17.jpg rename to test/simples/12/big/5/17.jpg diff --git a/test/complex/big/5/18.jpg b/test/simples/12/big/5/18.jpg similarity index 100% rename from test/complex/big/5/18.jpg rename to test/simples/12/big/5/18.jpg diff --git a/test/complex/big/5/19.jpg b/test/simples/12/big/5/19.jpg similarity index 100% rename from test/complex/big/5/19.jpg rename to test/simples/12/big/5/19.jpg diff --git a/test/complex/big/5/2.jpg b/test/simples/12/big/5/2.jpg similarity index 100% rename from test/complex/big/5/2.jpg rename to test/simples/12/big/5/2.jpg diff --git a/test/complex/big/5/20.jpg b/test/simples/12/big/5/20.jpg similarity index 100% rename from test/complex/big/5/20.jpg rename to test/simples/12/big/5/20.jpg diff --git a/test/complex/big/5/3.jpg b/test/simples/12/big/5/3.jpg similarity index 100% rename from test/complex/big/5/3.jpg rename to test/simples/12/big/5/3.jpg diff --git a/test/complex/big/5/4.jpg b/test/simples/12/big/5/4.jpg similarity index 100% rename from test/complex/big/5/4.jpg rename to test/simples/12/big/5/4.jpg diff --git a/test/complex/big/5/5.jpg b/test/simples/12/big/5/5.jpg similarity index 100% rename from test/complex/big/5/5.jpg rename to test/simples/12/big/5/5.jpg diff --git a/test/complex/big/5/6.jpg b/test/simples/12/big/5/6.jpg similarity index 100% rename from test/complex/big/5/6.jpg rename to test/simples/12/big/5/6.jpg diff --git a/test/complex/big/5/7.jpg b/test/simples/12/big/5/7.jpg similarity index 100% rename from test/complex/big/5/7.jpg rename to test/simples/12/big/5/7.jpg diff --git a/test/complex/big/5/8.jpg b/test/simples/12/big/5/8.jpg similarity index 100% rename from test/complex/big/5/8.jpg rename to test/simples/12/big/5/8.jpg diff --git a/test/complex/big/5/9.jpg b/test/simples/12/big/5/9.jpg similarity index 100% rename from test/complex/big/5/9.jpg rename to test/simples/12/big/5/9.jpg diff --git a/test/simples/12/index.html b/test/simples/12/index.html new file mode 100644 index 0000000..14d50b1 --- /dev/null +++ b/test/simples/12/index.html @@ -0,0 +1,118 @@ + + + + + + + + +
+

Big Set

+ 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + 3 + + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 + 5 +
+
+ + diff --git a/test/complex/dup/image_test.png b/test/simples/13/dup/image_test.png similarity index 100% rename from test/complex/dup/image_test.png rename to test/simples/13/dup/image_test.png diff --git a/test/complex/image_test.png b/test/simples/13/image_test.png similarity index 100% rename from test/complex/image_test.png rename to test/simples/13/image_test.png diff --git a/test/simples/13/index.html b/test/simples/13/index.html new file mode 100644 index 0000000..025d892 --- /dev/null +++ b/test/simples/13/index.html @@ -0,0 +1,21 @@ + + + + + + + + +
+

Test duplicate detection (1/2)

+ + + +
+
+

Test duplicate detection (2/2)

+ + +
+ + diff --git a/test/simples/14/index.html b/test/simples/14/index.html new file mode 100644 index 0000000..6edc9f5 --- /dev/null +++ b/test/simples/14/index.html @@ -0,0 +1,29 @@ + + + + + + + + +
+

Check download order

+
+ img-1.png + +
+
+ img-3.png + +
+
+ + + diff --git a/test/simples/14/order.html b/test/simples/14/order.html new file mode 100644 index 0000000..860d979 --- /dev/null +++ b/test/simples/14/order.html @@ -0,0 +1,28 @@ + + + + + + + + +
+ img-1.png + +
+ +
+ img-3.png + +
+
+ img-40.png + +
+ + diff --git a/test/complex/ordered/img-1.png b/test/simples/14/ordered/img-1.png similarity index 100% rename from test/complex/ordered/img-1.png rename to test/simples/14/ordered/img-1.png diff --git a/test/complex/ordered/img-2.png b/test/simples/14/ordered/img-2.png similarity index 100% rename from test/complex/ordered/img-2.png rename to test/simples/14/ordered/img-2.png diff --git a/test/complex/ordered/img-3.png b/test/simples/14/ordered/img-3.png similarity index 100% rename from test/complex/ordered/img-3.png rename to test/simples/14/ordered/img-3.png diff --git a/test/complex/ordered/img-4.png b/test/simples/14/ordered/img-4.png similarity index 100% rename from test/complex/ordered/img-4.png rename to test/simples/14/ordered/img-4.png diff --git a/test/simples/15/index.html b/test/simples/15/index.html new file mode 100644 index 0000000..b9c92c4 --- /dev/null +++ b/test/simples/15/index.html @@ -0,0 +1,17 @@ + + + + + + + + +
+

Test page digging (deep=2, deep=3)

+ + + +
+ + + diff --git a/test/complex/preview/index.html b/test/simples/15/preview/index.html similarity index 100% rename from test/complex/preview/index.html rename to test/simples/15/preview/index.html diff --git a/test/complex/preview/original.jpeg b/test/simples/15/preview/original.jpeg similarity index 100% rename from test/complex/preview/original.jpeg rename to test/simples/15/preview/original.jpeg diff --git a/test/complex/preview/thumbnail.jpeg b/test/simples/15/preview/thumbnail.jpeg similarity index 100% rename from test/complex/preview/thumbnail.jpeg rename to test/simples/15/preview/thumbnail.jpeg diff --git a/test/simples/2/index.html b/test/simples/2/index.html new file mode 100644 index 0000000..15018a5 --- /dev/null +++ b/test/simples/2/index.html @@ -0,0 +1,14 @@ + + + + + + + + +
+

Text Image

+
http://127.0.0.1:8000/simples/2/text.png
+
+ + diff --git a/test/complex/text.png b/test/simples/2/text.png similarity index 100% rename from test/complex/text.png rename to test/simples/2/text.png diff --git a/test/simples/3/index.html b/test/simples/3/index.html new file mode 100644 index 0000000..0e41bd9 --- /dev/null +++ b/test/simples/3/index.html @@ -0,0 +1,14 @@ + + + + + + + + +
+

Detect SVG

+ +
+ + diff --git a/test/simples/4/index.html b/test/simples/4/index.html new file mode 100644 index 0000000..d224615 --- /dev/null +++ b/test/simples/4/index.html @@ -0,0 +1,15 @@ + + + + + + + + +
+

Test Image Extraction from inputs

+ + +
+ + diff --git a/test/simples/5/index.html b/test/simples/5/index.html new file mode 100644 index 0000000..d3409f5 --- /dev/null +++ b/test/simples/5/index.html @@ -0,0 +1,14 @@ + + + + + + + + +
+

No preview with the "referer" header

+ +
+ + diff --git a/test/simples/6/index.html b/test/simples/6/index.html new file mode 100644 index 0000000..9bb2bcf --- /dev/null +++ b/test/simples/6/index.html @@ -0,0 +1,14 @@ + + + + + + + + +
+

Detect Image from unknown Extension

+ Image Link | Big ISO Link +
+ + diff --git a/test/complex/noextension b/test/simples/6/noextension similarity index 100% rename from test/complex/noextension rename to test/simples/6/noextension diff --git a/test/simples/7/index.html b/test/simples/7/index.html new file mode 100644 index 0000000..071942c --- /dev/null +++ b/test/simples/7/index.html @@ -0,0 +1,26 @@ + + + + + + + + +
+

Test width and height extraction from different image types

+ +
+ + diff --git a/test/complex/types/one-lossless.webp b/test/simples/7/types/one-lossless.webp similarity index 100% rename from test/complex/types/one-lossless.webp rename to test/simples/7/types/one-lossless.webp diff --git a/test/complex/types/one.bmp b/test/simples/7/types/one.bmp similarity index 100% rename from test/complex/types/one.bmp rename to test/simples/7/types/one.bmp diff --git a/test/complex/types/one.ico b/test/simples/7/types/one.ico similarity index 100% rename from test/complex/types/one.ico rename to test/simples/7/types/one.ico diff --git a/test/complex/types/one.jpg b/test/simples/7/types/one.jpg similarity index 100% rename from test/complex/types/one.jpg rename to test/simples/7/types/one.jpg diff --git a/test/complex/types/one.png b/test/simples/7/types/one.png similarity index 100% rename from test/complex/types/one.png rename to test/simples/7/types/one.png diff --git a/test/complex/types/one.webp b/test/simples/7/types/one.webp similarity index 100% rename from test/complex/types/one.webp rename to test/simples/7/types/one.webp diff --git a/test/complex/types/webp/1.webp b/test/simples/7/types/webp/1.webp similarity index 100% rename from test/complex/types/webp/1.webp rename to test/simples/7/types/webp/1.webp diff --git a/test/complex/types/webp/2.webp b/test/simples/7/types/webp/2.webp similarity index 100% rename from test/complex/types/webp/2.webp rename to test/simples/7/types/webp/2.webp diff --git a/test/complex/types/webp/3.webp b/test/simples/7/types/webp/3.webp similarity index 100% rename from test/complex/types/webp/3.webp rename to test/simples/7/types/webp/3.webp diff --git a/test/complex/types/webp/4.webp b/test/simples/7/types/webp/4.webp similarity index 100% rename from test/complex/types/webp/4.webp rename to test/simples/7/types/webp/4.webp diff --git a/test/complex/types/webp/5.webp b/test/simples/7/types/webp/5.webp similarity index 100% rename from test/complex/types/webp/5.webp rename to test/simples/7/types/webp/5.webp diff --git a/test/simples/8/index.html b/test/simples/8/index.html new file mode 100644 index 0000000..bea399c --- /dev/null +++ b/test/simples/8/index.html @@ -0,0 +1,17 @@ + + + + + + + + +
+

Data URI

+ +
+ + diff --git a/test/simples/9/index.html b/test/simples/9/index.html new file mode 100644 index 0000000..ede334f --- /dev/null +++ b/test/simples/9/index.html @@ -0,0 +1,14 @@ + + + + + + + + +
+

Test remote link extraction with CORS

+ jpg link +
+ + diff --git a/v2/data/collector.js b/v2/data/collector.js index 498fd8b..47e2121 100644 --- a/v2/data/collector.js +++ b/v2/data/collector.js @@ -165,13 +165,25 @@ var collector = { let images = [...document.images].map(img => ({ width: img.width, height: img.height, - src: img.src, + src: img.currentSrc || img.src, alt: img.alt, custom: img.getAttribute(window.custom) || '', verified: true, // this is an image even if content-type cannot be resolved, page: location.href })); // find images; part 1/2 + for (const source of document.querySelectorAll('source')) { + try { + const href = (source.srcset || '').split(' ')[0]; + images.push({ + src: (new URL(href, location.href)).href, + page: location.href + }); + } + catch (e) { + console.warn('Cannot collect source images', e); + } + } images.push(...[...document.querySelectorAll('source')].filter(i => i.srcset).map(i => ({ src: i.srcset.split(' ')[0], page: location.href @@ -179,7 +191,12 @@ var collector = { // find background images; part 2 try { [...document.querySelectorAll('*')] - .map(e => window.getComputedStyle(e).backgroundImage) + .map(e => [ + getComputedStyle(e).backgroundImage, + getComputedStyle(e, ':before').backgroundImage, + getComputedStyle(e, ':after').backgroundImage + ]) + .flat() .map(i => { const e = /url\(['"]([^)]+)["']\)/.exec(i); return e && e.length ? e[1] : null; @@ -199,6 +216,22 @@ var collector = { catch (e) { console.warn('Cannot collect background images', e); } + // find SVGs + try { + for (const svg of document.querySelectorAll('svg')) { + const e = svg.cloneNode(true); + e.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + + images.push({ + src: 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(e.outerHTML), + page: location.href + }); + } + } + catch (e) { + console.warn('Cannot collect SVG images', e); + } + // find linked images; part 3 if (window.deep > 0) { [...document.querySelectorAll('a')].map(a => a.href) @@ -209,9 +242,11 @@ var collector = { } // find hard-coded links; part 4 if (window.deep > 0) { - const r = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gi; + const r = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/ig; + const content = document.documentElement.innerHTML + '\n' + document.body.textContent; + // decode html special characters; & - (document.documentElement.innerHTML.match(r) || []) + (content.match(r) || []) .map(s => s.replace(/&/g, '&')) .forEach(src => images.push({ src, diff --git a/v2/data/gallery/index.html b/v2/data/gallery/index.html index 805bc55..07de6b3 100644 --- a/v2/data/gallery/index.html +++ b/v2/data/gallery/index.html @@ -14,7 +14,7 @@ - +
diff --git a/v2/manifest.json b/v2/manifest.json index 47b9ce2..165213d 100644 --- a/v2/manifest.json +++ b/v2/manifest.json @@ -10,8 +10,7 @@ "notifications", "", "downloads", - "unlimitedStorage", - "declarativeNetRequest" + "unlimitedStorage" ], "optional_permissions": [ "clipboardWrite" diff --git a/v3/data/collector.js b/v3/data/collector.js index fa6e3c6..60f58e2 100644 --- a/v3/data/collector.js +++ b/v3/data/collector.js @@ -125,7 +125,7 @@ collector.inspect = function(doc, loc, name, policies) { collector.push({ width: img.naturalWidth, height: img.naturalHeight, - src: img.src, + src: img.currentSrc || img.src, alt: img.alt, custom: img.getAttribute(window.custom) || '', // if image is verified, we dont have the image size. on accurate mode set it to false