| bin | First commit | |
| lib | First commit | |
| LICENSES | First commit | |
| .gitignore | First commit | |
| analysis_options.yaml | First commit | |
| CHANGELOG.md | First commit | |
| pubspec.lock | First commit | |
| pubspec.yaml | First commit | |
| README.md | First commit | |
| REUSE.toml | First commit | |
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
- Clone this repository on a machine with Dart installed
- Compile the project using
dart compile exe bin/preview_image_extractor.dart -o ./preview_image_extractor
- Set the port the service should listen to using the
PORTenvironment variable (defaults to port8080). - 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.
Copyright and License
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.