1
0
Fork
You've already forked preview_image_extractor
0
A simple tool to extract the url of the preview image from a product page, given its url.
  • Dart 100%
2025年09月18日 17:25:06 +01:00
bin First commit 2025年09月18日 17:25:06 +01:00
lib First commit 2025年09月18日 17:25:06 +01:00
LICENSES First commit 2025年09月18日 17:25:06 +01:00
.gitignore First commit 2025年09月18日 17:25:06 +01:00
analysis_options.yaml First commit 2025年09月18日 17:25:06 +01:00
CHANGELOG.md First commit 2025年09月18日 17:25:06 +01:00
pubspec.lock First commit 2025年09月18日 17:25:06 +01:00
pubspec.yaml First commit 2025年09月18日 17:25:06 +01:00
README.md First commit 2025年09月18日 17:25:06 +01:00
REUSE.toml First commit 2025年09月18日 17:25:06 +01:00

Preview Image Extractor

This is a simple server application that can be used as an endpoint to extract the url of the preview image out of a product page, given its link.

NOTE: Due to anti-bot detection mechanisms that many e-commerce websites adopt, this script may not work with certain stores. At the time of writing, it works on all the websites we tried that do not require a full browser to return the HTML of the requested page.

Example Request

curl -X GET "http://localhost:8080/preview?url=https://www.ikea.com/pt/en/p/poaeng-armchair-birch-veneer-knisa-black-s69240823/"

Example Response

{
 "pageUrl":"https://www.ikea.com/pt/en/p/poaeng-armchair-birch-veneer-knisa-black-s69240823/",
 "imageUrl":"https://www.ikea.com/pt/en/images/products/poaeng-armchair-birch-veneer-knisa-black__0571496_pe666929_s5.jpg"
}

Deployment Instructions

  1. Clone this repository on a machine with Dart installed
  2. Compile the project using
dart compile exe bin/preview_image_extractor.dart -o ./preview_image_extractor
  1. Set the port the service should listen to using the PORT environment variable (defaults to port 8080).
  2. Run the application using
./preview_image_extractor

Contributing Guidelines

This project has been developed as a companion component for the Presents app, and will be maintained as such. If you encounter an issue or you wish to improve it, feel free to open an Issue or Pull Request to discuss it.

This tool has been developed by LezSoft and it's distributed as free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.