Web Scraping Weather Forecasts, Stock Data, and University Rankings into SQLite Databases

Task 1: Scraping and Storing Multi-City Weather Foreacsts This task involves scraping 7-day weather forecasts for a predefined set of cities from China Weather (http://www.weather.com.cn) and persisting the data into a local SQLite database. Implementation Code: import sqlite3 import urllib.request from bs4 import BeautifulSoup, UnicodeDammit ...

Posted on Thu, 25 Jun 2026 16:02:39 +0000 by billspeg

Python Requests Library for HTTP Operations

Installation Install the library via pip: pip install requests For unstable networks, specify a mirror source: pip install requests -i https://pypi.mirrors.ustc.edu.cn/simple/ Available mirrors include: Tsinghua University: https://pypi.tuna.tsinghua.edu.cn/simple Alibaba Cloud: http://mirrors.aliyun.com/pypi/simple/ University of Science an ...

Posted on Tue, 23 Jun 2026 16:28:07 +0000 by bobbfwed

Introduction to Scrapy Framework and Basic Usage

Overview This article covers an introduction to the Scrapy framework, installation instructions, and fundamental usage patterns. What is Scrapy? Scrapy is a powerful Python framework designed for extracting structured data from websites. It provides a complete solution for web crawling tasks, integrating features like asynchronous downloading, ...

Posted on Sun, 21 Jun 2026 17:18:44 +0000 by faizanno1

Ajax Data Scraping and MySQL Storage Implementation

Practical Ajax Data Scraping and MySQL Integration Target Data Extraction Extract movie details including title, categories, duration, release location/date, description, and rating from Scrape | Movie pages, then store in MySQL database. Ajax Request Analysis By inspecting network requests from the target website, we identify the structured da ...

Posted on Fri, 19 Jun 2026 18:01:01 +0000 by citricsquid

Scrapy Framework Setup and XPath Querying Techniques

Core Framwork Architecture Scrapy operates as an asynchronous web scraping framework built upon Twisted. The main components coordinating data flow are: Engine: Orchestrates triggers and overall data handling. Scheduler: Accepts requests, maintains a priority queue, and deduplicates URLs. Downloader: Retrieves page content via non-blocking I/O ...

Posted on Mon, 15 Jun 2026 17:21:19 +0000 by Buffas

Fetching Web Pages with Python's urllib Library for GET Requests

urllib Module Overview The urllib module is a built-in Python library designed for HTTP requests. In Python 3, the primary submodules are urllib.request for handling requests and urllib.parse for URL encoding. This module enables programmatic browser simulation for data extraction tasks. Practical Examples Example 1: Retrieving Baidu Homepage C ...

Posted on Sun, 14 Jun 2026 16:53:18 +0000 by kosmidd

Web Scraping for Practical Data Extraction Using Python

Install Required Dependencies To begin web scraping, install the necessary Python packages requests and beautifulsoup4. pip install requests beautifulsoup4 Construct a Simple Data Scraper This script demonstrates how to retrieve and parse content from a static webpage. import requests from bs4 import BeautifulSoup # Define the target web addr ...

Posted on Sat, 13 Jun 2026 17:08:30 +0000 by toyfruit

Practical Python Method for Batch Scraping WeChat Official Account Article Links

Modern large language models have streamlined post-scraping text processing, replacing manual tag stripping and formatting with fast, robust cleaning workflows. Beyond cleaning, these tools enable efficient core idea extraction and content rephrasing for legitimate use cases. Scraping web content requires identifying consistent, traversable res ...

Posted on Mon, 08 Jun 2026 16:31:28 +0000 by spfoonnewb

Music Comment Analysis and Visualization with Django

Data Collection Process Music streaming platforms contain valuable user feedback. We colleect this data using Python web scraping techniques. The following example demonstrtaes fetching comments from a music platform: import requests from bs4 import BeautifulSoup def get_song_comments(track_id): api_endpoint = f"https://api.music-serv ...

Posted on Sun, 07 Jun 2026 16:55:13 +0000 by Restless

Comprehensive Guide to HTML Agility Pack: A Flexible .NET HTML Parser

Introduction HTML Agility Pack (HAP) is a robust and flexible .NET library designed for parsing and manipulating HTML documents. This article provides an overview of its capabilities, loading mechanisms, selector usage, node manipulation, traversal, and attribute handling. Official Resources Official Website: http://html-agility-pack.net/ NuGe ...

Posted on Wed, 03 Jun 2026 18:03:10 +0000 by BobLennon