English

AutoScraper: A Progressive Understanding Web Agent for Web Scraper Generation

Computation and Language 2024-09-27 v2 Artificial Intelligence

Abstract

Web scraping is a powerful technique that extracts data from websites, enabling automated data collection, enhancing data analysis capabilities, and minimizing manual data entry efforts. Existing methods, wrappers-based methods suffer from limited adaptability and scalability when faced with a new website, while language agents, empowered by large language models (LLMs), exhibit poor reusability in diverse web environments. In this work, we introduce the paradigm of generating web scrapers with LLMs and propose AutoScraper, a two-stage framework that can handle diverse and changing web environments more efficiently. AutoScraper leverages the hierarchical structure of HTML and similarity across different web pages for generating web scrapers. Besides, we propose a new executability metric for better measuring the performance of web scraper generation tasks. We conduct comprehensive experiments with multiple LLMs and demonstrate the effectiveness of our framework. Resources of this paper can be found at \url{https://github.com/EZ-hwh/AutoScraper}

Keywords

Cite

@article{arxiv.2404.12753,
  title  = {AutoScraper: A Progressive Understanding Web Agent for Web Scraper Generation},
  author = {Wenhao Huang and Zhouhong Gu and Chenghao Peng and Zhixu Li and Jiaqing Liang and Yanghua Xiao and Liqian Wen and Zulong Chen},
  journal= {arXiv preprint arXiv:2404.12753},
  year   = {2024}
}

Comments

19 pages, 4 figures, 18 tables. Accepted to EMNLP 2024

R2 v1 2026-06-28T15:59:37.502Z