Abstract: Existing techniques for efficiently crawling social media sites rely on URL patterns, query logs, and human supervision. This paper describes SOUrCe, a structure-oriented unsupervised crawler that uses page structures to learn how to crawl a social media site efficiently. SOUrCe consists of two stages. During its unsupervised learning phase, SOUrCe constructs a sitemap that clusters pages based on their structural similarity and generates a navigation table that describes how the different types of pages in the site are linked together. During its harvesting phase, it uses the navigation table and a crawling policy to guide the choice of which links to crawl next. Experiments show that this architecture supports different styles of crawling efficiently, and does a better job of staying focused on user-created contents than baseline methods.
Introduction
Social media sites are massive yet structurally repetitive, as most pages are generated from a limited set of database-driven templates—such as thread pages, user profiles, or login screens. To crawl these sites efficiently, a crawler must determine which links are worth following.
Traditionally, crawlers rely on URL patterns to predict content. However, URLs are often unstable, messy, or intentionally obscured. Other state-of-the-art crawlers require human supervision to define traversal paths. SOUrCe (Structure-Oriented Unsupervised Crawler) addresses these challenges by creating a fully automated, unsupervised system that "understands" a site's layout by analyzing the underlying HTML Document Object Model (DOM) tree, making it more robust across different platforms.
Methodology
SOUrCe operates in two distinct phases: a learning phase and a crawling phase.
The Learning Phase (Unsupervised)
- Structural Representation: Pages are represented as a "Bag-of-Xpaths," where an Xpath is a path from the root of the HTML tree to a leaf. This captures the structural essence of a page rather than its textual content.
- Automated Clustering: The system uses the DBSCAN algorithm to group pages with similar structures. It automatically sets the distance threshold (
eps) by identifying the "valley point" in a distance histogram. - Navigation Table: SOUrCe builds a probabilistic map of the site by tracking which "Anchor paths" (Apaths) lead to which clusters. For example, it might learn that clicking a link in a specific sidebar on a "Profile" page has an 80% chance of leading to a "Post" page.
The Crawling Phase (Online)
During active crawling, SOUrCe classifies new pages into existing clusters using k-Nearest Neighbor (kNN). It weights uncrawled links based on a combination of Informativeness (using a HITS-like authority/hub algorithm), Structural Diversity (to prioritize user-generated content), and Balance (to ensure broad coverage).
Experimental Setup
The researchers evaluated SOUrCe on six diverse social media environments, including forums (ASP.NET, Stack Exchange), video platforms (YouTube), and review sites (Rotten Tomatoes, Douban). The crawler was trained on 1,000 pages per site and tested against mirrored corpora of 20,000 pages to ensure controlled, repeatable experiments.
Key Insights
- Structure Over URLs: While URLs can be deceptive, HTML structure is a high-fidelity signal. Pages sharing the same template almost always have identical Xpaths, regardless of URL differences.
- Diversity as a Proxy for Content: Clusters containing user-generated content (UCC) exhibit higher intra-cluster variance. Because users add varying elements like images and replies, UCC pages are structurally more diverse than rigid administrative pages (e.g., Terms of Service). SOUrCe leverages this variance to prioritize content-rich areas.
- Self-Correction: By treating the site as a graph of clusters, the crawler automatically discovers productive paths, such as identifying that "Next Page" buttons are the most efficient way to find new content.
Key Results
SOUrCe demonstrated significant improvements over baseline methods like iRobot:
- UCC Crawling: It achieved a Valid Ratio of 0.9989 on average, meaning nearly every downloaded page contained the desired user content.
- Target Crawling: When hunting for specific page types, SOUrCe maintained a high Harvest Rate and Recall (0.822), successfully navigating complex hierarchies to find hidden targets.
- Efficiency: The system reached high accuracy with as few as 200 training pages, facilitating rapid deployment.
Limitations and Future Work
While effective, SOUrCe introduces computational overhead due to high-dimensional Xpath vectors and kNN classification. Future work may involve pruning training data to accelerate classification. Additionally, sites heavily reliant on JavaScript-rendered content may require a pre-rendering step to expose the structural features SOUrCe requires for analysis.
Summary updated