Fizzler Plug-in
References are required:
Using Fizzler;
Using Fizzler.Systems.HtmlAgilityPack;
Using Htmlagilitypack;
public class Fizzlerhelper {//<summary>////</summary>//&L T;param name= "url" > Address link </param>//<param name= "cssload" >css path </param>//<returns ></returns> public static ienumerable
Implementation of data capture (transparent sales network), Fizzler: mainly through the HTML tag style to obtain data, shielding the complex regular expression.
Using system;using system.collections;using system.collections.generic;using system.linq;using System.Web;using System.web.services;using system.web.ui;using system.web.ui.webcontrols;using Fizzler;using Fizzler.systems.htmlagilitypack;using htmlagilitypack;using newtonsoft.json;using DataCollectionCommon;using System.text;using datacollectiondal;using datacollectionmodel;using System.text.regularexpressions;namespace datacollectiondemo{public partial class WebForm1:System.Web.UI.Page {public static fizzlerhelper Fizzlerh Elper = new Fizzlerhelper (); public string resulthtml = string. Empty; protected void Page_Load (object sender, EventArgs e) {if (! IsPostBack) {//Hangzhou resulthtml = startdatacollection ("http://www.tmsf.com/daily.ht M "); }}///<summary> Start data fetching///</summary>//<param name= "<span St Yle= "Font-family:arial, Helvetica, Sans-serif; " >url</span><span style= "font-family:arial, Helvetica, Sans-serif;" > > Website address path </param></span>//<returns></returns> [WebMethod] public STA Tic string startdatacollection (string url) {StringBuilder temp_table = new StringBuilder (); Temp_table. Append ("<table width=\" 100%\ "border=\" 0\ "cellspacing=\" 0\ "cellpadding=\" 0\ ">"); Temp_table. Append ("<tr><td> Property name </td><td> urban Area </td><td> contracted units </td><td> scheduled </ Td><td> Contract Area </td><td> Contract price </td></tr> "); list
Data Capture Fizzler