Data Loading class

Source: Internet
Author: User
Tags regular expression

Network data loading system (WEBCUTPURSE)

System Version: Version 1.0

Instructions for use

function: Intercept network Data Universal class, use this class can intercept the network text, picture, Flash, music and so on


Properties of the class


URL Properties: Loaded URLs

FileURL Properties: Files on the network (such as pictures, flash, etc.) address

Savefilepath property: Save to Local Path

BSTR property: Processing the starting point of the fetch string

Estr property: Handles the end point of the fetch string

Char property: String used to extract Chinese pinyin

Webfolderpath: Subdirectories on the network (such as Http:// so BBS/JS is the network subdirectory)

REGSTR: Is the content extracted by regular expressions

Pattern attribute: Regular expression


Methods of the class


SaveFile method: Extracts the files on the network to the native, and their corresponding properties Fileurl,filepath

Dehttpdata method: Regular fetch content, its corresponding property Regstr,pattern

Getwebbody method: Extracts the content of the Web page, its corresponding property URL

Getpychar method: Extracts the first pinyin of the Chinese character, its corresponding attribute Char (Note: This attribute can only be one Chinese character, two or more than two will error)

Getstr (Wyd_body) Method: Extracts a string function from the left, and the corresponding property of the parameter to be extracted BSTR,ESTR

Getrstr (Wyd_body) method: The string function is extracted from the right, and the corresponding property of the parameter is the content to be extracted bstr,estr

Makenewfolder method: Creates a folder with its corresponding property Webfolderpath (note: The generated directory is to be under the current directory)

Iserr Method: Handling Errors

Showerrmsg method: Apparent error reason

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.