hotukdeals-scraper

n8n custom node for scraping HotUKDeals

Package Information

Released: 14 mo ago
Downloads: 20 weeklyĀ /Ā 56 monthly
Latest Version: 1.0.6
Author: HotUKDeals Scraper

Documentation

n8n HotUKDeals Scraper Node

A custom n8n node for scraping deals from HotUKDeals. Extracts deal information including title, description, link, price, and image URL.

šŸš€ Features

  • Multi-page scraping: Scrape multiple pages in sequence
  • Rate limiting: Configurable delay between requests
  • Rich data extraction: Extract title, description, link, price, and image URL
  • Vue.js data parsing: Advanced parsing of embedded Vue.js data
  • n8n Cloud compatible: Works with n8n Cloud deployments

šŸ“¦ Installation

For n8n Cloud

  1. In n8n Cloud:
    • Go to Settings → Community Nodes
    • Click "Install a community node"
    • Enter the package name: n8n-nodes-hotukdeals-scraper
    • Click "Install"

For Local n8n

npm install n8n-nodes-hotukdeals-scraper

šŸ”§ Usage

Node Parameters

  • Start Page (number): The first page to scrape (default: 0)
  • End Page (number): The last page to scrape (default: 1)
  • Delay (ms) (number): Delay between requests in milliseconds (default: 1000)

Output Format

{
  "startPage": 0,
  "endPage": 1,
  "totalPages": 2,
  "totalDeals": 25,
  "scrapedAt": "2024-01-15T10:30:00.000Z",
  "deals": [
    {
      "title": "Deal Title",
      "link": "https://www.hotukdeals.com/deal/123",
      "description": "Deal description",
      "price": "Ā£19.99",
      "imageUrl": "https://images.hotukdeals.com/path/to/image.jpg"
    }
  ]
}

Example Workflow

  1. Add the HotUKDeals Scraper node
  2. Configure parameters:
    • Start Page: 0
    • End Page: 2
    • Delay: 1000
  3. Execute the workflow

šŸ—ļø Project Structure

n8n-nodes-hotukdeals-scraper/
ā”œā”€ā”€ nodes/
│   └── HotUKDealsScraper/
│       ā”œā”€ā”€ HotUKDealsScraper.node.js    # Main node implementation
│       └── hotukdeals.svg               # Node icon
ā”œā”€ā”€ package.json                         # Package configuration
└── README.md                           # This file

šŸ” Technical Details

Data Extraction

The node uses Cheerio for HTML parsing and extracts data from:

  1. Basic HTML elements: Title, link, and description from standard HTML
  2. Vue.js data attributes: Price and image URL from embedded data-vue3 attributes
  3. Image URL construction: Properly constructs image URLs using the correct domain

Rate Limiting

  • Configurable delay between requests to respect the target website
  • Default 1-second delay to avoid overwhelming the server

Error Handling

  • Graceful handling of network errors
  • Detailed error logging for debugging
  • Continues processing even if individual pages fail

🚨 Important Notes

Rate Limiting

  • Respect the website: Use appropriate delays between requests
  • Don't overload: Avoid scraping too many pages too quickly
  • Check terms of service: Ensure compliance with HotUKDeals terms

Data Accuracy

  • Dynamic content: The website may change its structure
  • Vue.js parsing: Relies on specific Vue.js data structure
  • Image URLs: Constructed from embedded data, may need updates if structure changes

šŸ”§ Troubleshooting

Node Not Appearing

  1. Check n8n logs for installation errors
  2. Restart n8n if needed

Scraping Errors

  1. Check network connectivity to HotUKDeals
  2. Verify page numbers are valid
  3. Increase delay if getting rate limited
  4. Check n8n execution logs for detailed error messages

Data Issues

  1. Missing price/image: Check if Vue.js structure has changed
  2. Empty results: Verify page numbers and website structure
  3. Incorrect URLs: May need to update image URL construction

šŸ“„ License

MIT License

āš ļø Disclaimer

This node is for educational and personal use. Please respect the terms of service of HotUKDeals and use responsibly.

Discussion