NEWScrapingAnt MCP for Claude Code, Cursor & Windsurf — try it free →
Skip to main content

245 posts tagged with "data extraction"

View All Tags

Parse HTML with Go

· 12 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Parse HTML with Go

In the ever-evolving landscape of web development, the ability to efficiently parse and manipulate HTML documents is crucial for tasks such as web scraping and data extraction.

Go, a statically typed, compiled language known for its simplicity and performance, offers robust tools for these tasks. Among these tools, the net/html package stands out as a powerful standard library component that provides developers with the means to parse HTML content in a structured and efficient manner.

This package is particularly useful for web scraping, offering both tokenization and tree-based node parsing to handle a variety of HTML structures (The net/html Package).

Complementing the net/html package is the goquery library, which brings a jQuery-like syntax to Go, making it easier for developers familiar with jQuery to transition to Go for web scraping tasks.

Built on top of the net/html package, goquery leverages the CSS Selector library, Cascadia, to provide a more intuitive and higher-level interface for HTML document traversal and manipulation (GitHub - PuerkitoBio/goquery).

This guide will explore the features, benefits, and practical applications of both the net/html package and the goquery library, providing code examples and best practices to help you harness the full potential of Go for your web scraping projects.

How to scrape dynamic websites with Scrapy Splash

· 8 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to scrape dynamic websites with Scrapy Splash

Handling dynamic websites with JavaScript-rendered content presents a significant challenge for traditional scraping tools. Scrapy Splash emerges as a powerful solution by combining the robust crawling capabilities of Scrapy with the JavaScript rendering prowess of the Splash headless browser. This comprehensive guide explores the integration and optimization of Scrapy Splash for effective dynamic website scraping.

Scrapy Splash has become an essential tool for developers and data scientists who need to extract data from JavaScript-heavy websites. The middleware (scrapy-plugins/scrapy-splash) seamlessly bridges Scrapy's asynchronous architecture with Splash's rendering engine, enabling the handling of complex web applications. This integration provides a robust foundation for handling modern web applications while maintaining high performance and reliability.

The system's architecture is specifically designed to handle the challenges of dynamic content rendering while ensuring efficient resource utilization.

Using Cookies with Wget

· 7 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Using Cookies with Wget

GNU Wget stands as a powerful command-line utility that has become increasingly essential for managing web interactions. This comprehensive guide explores the intricate aspects of using cookies with Wget, a crucial feature for maintaining session states and handling authenticated requests.

Cookie management in Wget has evolved significantly, offering robust mechanisms for both basic and advanced implementations (GNU Wget Manual). The ability to handle cookies effectively is particularly vital when dealing with modern web applications that rely heavily on session management and user authentication.

Recent developments in browser integration capabilities have further enhanced Wget's cookie handling capabilities, allowing seamless interaction with existing browser sessions. This research delves into the various aspects of cookie implementation in Wget, from basic session management to advanced security considerations, providing a thorough understanding of both theoretical concepts and practical applications.

Using Cookies with cURL

· 7 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Using Cookies with cURL

Managing cookies effectively is crucial for maintaining state and handling user sessions. cURL, a powerful command-line tool for transferring data, provides robust cookie handling capabilities that have become essential for developers and system administrators.

This comprehensive guide explores the intricacies of using cookies with cURL, from basic operations to advanced security implementations. According to (curl.se), cURL adopts the Netscape cookie file format, providing a standardized approach to cookie management that ensures compatibility across different platforms and use cases.

The tool's cookie handling capabilities have evolved significantly, incorporating security features and compliance with modern web standards (everything.curl.dev). As web applications become increasingly complex, understanding how to effectively manage cookies with cURL has become paramount for secure and efficient data transfer operations.

Using Wget with Proxies

· 6 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Using Wget with Proxies

In today's interconnected digital landscape, wget stands as a powerful command-line utility for retrieving content from web servers. When combined with proxy capabilities, it becomes an even more versatile tool for secure and efficient web content retrieval.

This comprehensive guide explores the implementation, configuration, and optimization of wget when working with proxies. As organizations increasingly rely on proxy servers for enhanced security and access control (GNU Wget Manual), understanding the proper configuration and usage of wget with proxies has become crucial for system administrators and developers alike.

The integration of wget with proxy servers enables features such as anonymous browsing, geographic restriction bypass, and improved security measures. This research delves into various aspects of wget proxy implementation, from basic configuration to advanced authentication mechanisms, while also addressing critical performance optimization and troubleshooting strategies.

How to download images with wget

· 6 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to download images with wget

wget stands as a powerful and versatile tool, particularly for retrieving images from websites. This comprehensive guide explores the intricacies of using wget for image downloads, a critical skill for system administrators, web developers, and digital content managers. Originally developed as part of the GNU Project (GNU Wget Manual), wget has evolved into an essential utility that combines robust functionality with flexible implementation options.

The tool's capability to handle recursive downloads, pattern matching, and authentication mechanisms makes it particularly valuable for bulk image retrieval tasks (Robots.net).

As websites become increasingly complex and security measures more sophisticated, understanding wget's advanced features and technical considerations becomes crucial for efficient and secure image downloading operations.

How to Send POST Requests With Wget: Form Data, JSON, Files, Redirects

· 15 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

How to Send POST Requests With Wget: Form Data, JSON, Files, Redirects

Updated 2026-09-16

Rewritten as a tested reference. Every command below was run by the example package against a local echo server that reports the method, headers and body it received, and the output is copied from that run (wget 1.25.0). The 2024 version's redirect table, copied from the manual, was wrong for this wget: 301 and 302 turn the POST into a GET, only 307 and 308 keep it. New: --method with --body-data/--body-file, the missing-error-body trap and --content-on-error, --keep-session-cookies, --retry-on-http-error, percent-encoding, exit codes.

The three commands most people are looking for:

wget -qO- --post-data 'user=foo&lang=en' http://127.0.0.1:8000/echo # a form
wget -qO- --header='Content-Type: application/json' --post-data='{"key":"value"}' http://127.0.0.1:8000/echo # JSON
wget -qO- --header='Content-Type: application/json' --post-file=fixtures/data.json http://127.0.0.1:8000/echo # a body from a file

--post-data makes the request a POST, sets Content-Type: application/x-www-form-urlencoded unless you set your own with --header, and sends the string as the body. -qO- writes the response to stdout and silences the progress output. Everything else on this page is what happens around that: the response you did not get on an error, the redirect that silently changed your method, the login cookie that was not saved, the retry that did not retry.

Managing Cookies in Python Web Scraping

· 7 min read
Oleg Kulyk
Co-Founder @ ScrapingAnt

Managing Cookies in Python Web Scraping

In the evolving landscape of web scraping, effective cookie management has become increasingly crucial for maintaining persistent sessions and handling authentication in Python-based web scraping applications. This comprehensive guide explores the intricacies of cookie management, from fundamental implementations to advanced security considerations. Cookie handling is essential for maintaining state across multiple requests, managing user sessions, and ensuring smooth interaction with web applications. The Python Requests library, particularly through its Session object, provides robust mechanisms for cookie management that enable developers to implement sophisticated scraping solutions. As web applications become more complex and security-conscious, understanding and implementing proper cookie management techniques is paramount for successful web scraping operations. This research delves into both basic and advanced approaches to cookie handling, security implementations, and best practices for maintaining reliable scraping operations while respecting website policies and rate limits.