Giter Club home page Giter Club logo

fineartdown's Introduction

Note: It seems that some folks from fineartamerica.com have seen the repo and made changes that affect the functionality of the reverse engineering approach used in this repository. Please be aware that the current code may not work as expected.

FineArtDown

Download full size images from Fine Art America, Conde Nast Store, Photos.com and Pixels.com. You can check results in the Results Gallery.

How to Use

  1. Download the executable from Releases.
  2. Open your terminal in the path where the executable file is located.
  3. Run the command: ./fineartdown-[your-os] <url>
> ./fineartdown-win https://fineartamerica.com/featured/dancing-octopus-barathieu-gabriel.html

Or from npm

npm install -g fineartdown

fineartdown <url or artworkid>

Or run locally:

gh repo clone agmmnn/fineartdown
cd fineartdown
pnpm i

pnpm fineartdown <url or artworkid>

How to Use (Non-technical users, Windows)

  1. Download the executable from Releases.
  2. Navigate to the folder where the executable file is located. Once you have located the folder, hold down the Shift key on your keyboard and right-click on an empty space within the folder. This will open a context menu.
  3. In the context menu, you should see an option that says "Open PowerShell window here" or "Open command window here" or "Open Terminal" depending on your Windows version. Select this option, and a new terminal window will open next to the exe file.

Note: If you don't see the these options you can install Windows Terminal from Microsoft Store.

  1. Run the command: ./fineartdown-[your-os] <url>

  1. Press enter to run the command, and the program will download the image to your current directory.

How it works?

The backend server sends a 10% smaller slice of the requested tile with 10% upscale.

  • User: Request: 600px.
  • Server: Send 10% less slice of the user's selection, upscaled by 10%. Response: 540px to 600px.

So we need 3 layers to fill most of the gaps between the tiles. [layer1, layer2, layer3]

A 4th layer can be added, but this requires more requests to the server. And the server does not return the image more than a certain number of requests in a certain period of time. This time we have to put a delay between each download, which makes the total process longer. Using different proxy ip's can be a solution.

  • [540, 600, 667] = [(600*0.9),600,(600/0.9)] : Disadvantages: Need to upscale 600px->667px. So much float numbers in backend and gap numbers. Advantages: Less tiles=less requests to the server.

  • [486, 540, 600] = [((600*0.9)*0.9),(600*0.9),600] : I've tried many combinations and this is the best one so far.

You can make calculations using the calculator project.

Known Problems:

Gaps Between Tiles:

There are still gaps between tiles. Because 3 layers cannot cover the whole picture. As I mentioned before, adding the 4th layer takes a lot of time. Different layer sizes or different image sizes create different patterns.

  1. The first type of gap is a rectangular gap caused by the layers not covering the entire surface.

ApplicationFrameHost_gi2wJ9xWLc

  1. The second type of gap is caused by downsizing the 600px layer to 599. Because the server is actually sending 1 pixel lower probably due to the decimal values widthmedium and heightmedium. (it took me a long time to figure it out)

ApplicationFrameHost_94IWLMzX2R

This can be solved with the Healing Brush Tool in Photoshop.

Limited Request to Server

The server sends the content "---" instead of the image after a certain number of requests within a certain period of time. Therefore, I added a rule to the download function that if it fails, it retries after a certain delay. That's why it takes longer to download an image.

Results

You can find more results in the Results Gallery.

fineartdown's People

Contributors

agmmnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fineartdown's Issues

Linux binary not working (Fedora Silverblue)

I downloaded the latest linux build and ran it but I get an error when running it (regardless of the image):

$ ./fineartdown-linux https://fineartamerica.com/featured/johann-sebastian-bach-playing-the-organ-french-school.html
pkg/prelude/bootstrap.js:1872
      throw error;
      ^

Error: /tmp/pkg/2da0d9158a9def60f4ba14472c3cf85a226cd5fedab2a217742732778d95ef20/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node: invalid ELF header
    at process.dlopen (pkg/prelude/bootstrap.js:2251:28)
    at Module._extensions..node (node:internal/modules/cjs/loader:1196:18)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at Module.require (pkg/prelude/bootstrap.js:1851:31)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snapshot/fineartdown/node_modules/.pnpm/[email protected]/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (pkg/prelude/bootstrap.js:1926:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.5.0
[fabriziov@fedora Downloads]$ ./fineartdown-linux https://fineartamerica.com/featured/dancing-octopus-barathieu-gabriel.html
pkg/prelude/bootstrap.js:1872
      throw error;
      ^

Error: /tmp/pkg/2da0d9158a9def60f4ba14472c3cf85a226cd5fedab2a217742732778d95ef20/.pnpm/[email protected]/node_modules/canvas/build/Release/canvas.node: invalid ELF header
    at process.dlopen (pkg/prelude/bootstrap.js:2251:28)
    at Module._extensions..node (node:internal/modules/cjs/loader:1196:18)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:834:12)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at Module.require (pkg/prelude/bootstrap.js:1851:31)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/snapshot/fineartdown/node_modules/.pnpm/[email protected]/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (pkg/prelude/bootstrap.js:1926:22)
    at Module._extensions..js (node:internal/modules/cjs/loader:1166:10) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.5.0

The npm package worked like a charm, I love this so much!

Missing Tiles?

There an issue where the script stops not sure if the data is not there or if there is a math error.

I start the process and it stops and keeps retrying and failing. I manually create the files below and restart and the it completes the file as intended. I can't find any issues with the file after doing this.

URL: https://fineartamerica.com/featured/after-douai-ii-jean-louis-forain.html
ID: 38999470
Manually created files:
600_600x0_38999470.jpg
...
600_600x400_38999470.jpg

Script no longer working

It looks like the script is no longer working. It looks like the site has been changed to prevent these types of requests. I have been able to get the artwork id by creating a local html of the page and running off the local server. The file requests are failing though. I can make direct curl requests with the correct headers to download the files. Also it looks like they plugged the bug to remove the watermark. Is it possible to create an offset layer to move around them or is this script pretty much defunct? Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.