temu客户端程序

This commit is contained in:
wule committed 2025-06-29 19:38:31 +08:00
commit 4aaf264e89
694 files changed
+263780

No files matched your search

@@ -0,0 +1,598 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class CaiNiXiHuanCollectForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtRateMax = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtRateMin = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtCommentCountMax = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtCommentCountMin = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtSellCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSellCountMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImage = new System.Windows.Forms.DataGridViewImageColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCommentCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 377;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 325);
this.splitContainer2.SplitterDistance = 296;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(720, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(222, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集商品 请输入商品ID或为空";
//
// txtKeyWords
//
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(202, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的商品id或链接\r\n一行一个\r\n\r\n为空采集默认猜你喜欢商品";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(720, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Visible = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(720, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.label3);
this.ucGroupBoxEx2.Controls.Add(this.txtRateMax);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.txtRateMin);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMax);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(231, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(409, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(183, 58);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(19, 17);
this.label4.TabIndex = 401;
this.label4.Text = "%";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(115, 58);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(19, 17);
this.label3.TabIndex = 400;
this.label3.Text = "%";
//
// txtRateMax
//
this.txtRateMax.Location = new System.Drawing.Point(139, 54);
this.txtRateMax.Name = "txtRateMax";
this.txtRateMax.Size = new System.Drawing.Size(40, 23);
this.txtRateMax.TabIndex = 399;
this.txtRateMax.Text = "100";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(127, 57);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(13, 17);
this.label1.TabIndex = 398;
this.label1.Text = "-";
//
// txtRateMin
//
this.txtRateMin.Location = new System.Drawing.Point(71, 54);
this.txtRateMin.Name = "txtRateMin";
this.txtRateMin.Size = new System.Drawing.Size(40, 23);
this.txtRateMin.TabIndex = 396;
this.txtRateMin.Text = "0";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 58);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 397;
this.label2.Text = "好评率";
//
// txtCommentCountMax
//
this.txtCommentCountMax.Location = new System.Drawing.Point(335, 86);
this.txtCommentCountMax.Name = "txtCommentCountMax";
this.txtCommentCountMax.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMax.TabIndex = 391;
this.txtCommentCountMax.Text = "99999999";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(323, 89);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(13, 17);
this.label9.TabIndex = 390;
this.label9.Text = "-";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(71, 22);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(123, 23);
this.txtTotalPage.TabIndex = 376;
this.txtTotalPage.Text = "5";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(210, 90);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "评论数量";
//
// txtCommentCountMin
//
this.txtCommentCountMin.Location = new System.Drawing.Point(267, 86);
this.txtCommentCountMin.Name = "txtCommentCountMin";
this.txtCommentCountMin.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMin.TabIndex = 388;
this.txtCommentCountMin.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(13, 26);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(56, 17);
this.label12.TabIndex = 378;
this.label12.Text = "采集页数";
//
// txtSellCountMax
//
this.txtSellCountMax.Location = new System.Drawing.Point(335, 54);
this.txtSellCountMax.Name = "txtSellCountMax";
this.txtSellCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMax.TabIndex = 387;
this.txtSellCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(335, 22);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(323, 57);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(267, 22);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(210, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "宝贝销量";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(210, 26);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝价格";
//
// txtSellCountMin
//
this.txtSellCountMin.Location = new System.Drawing.Point(267, 54);
this.txtSellCountMin.Name = "txtSellCountMin";
this.txtSellCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMin.TabIndex = 384;
this.txtSellCountMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(323, 25);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colImage,
this.colPrice,
this.colSaleCount,
this.colCommentCount,
this.colRate,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(790, 296);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 350;
//
// colImage
//
this.colImage.HeaderText = "图片";
this.colImage.Name = "colImage";
this.colImage.ReadOnly = true;
this.colImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImage.Visible = false;
this.colImage.Width = 70;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
//
// colCommentCount
//
this.colCommentCount.HeaderText = "评论数量";
this.colCommentCount.Name = "colCommentCount";
this.colCommentCount.ReadOnly = true;
//
// colRate
//
this.colRate.HeaderText = "好评率";
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
this.colRate.Width = 80;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 28);
this.statusBar.TabIndex = 3;
//
// CaiNiXiHuanCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "CaiNiXiHuanCollectForm";
this.Text = "CaiNiXiHuanCollectForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtRateMax;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtRateMin;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtCommentCountMax;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtCommentCountMin;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtSellCountMax;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtSellCountMin;
private System.Windows.Forms.Label label16;
private UserComponent.DataGridViewEx dgvCollect;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewImageColumn colImage;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colCommentCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,326 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class CaiNiXiHuanCollectForm : Form
{
decimal priceMin = 0;
decimal priceMax = 99999999;
long sellCountMin = 0;
long sellCountMax = 99999999;
long commentCountMin = 0;
long commentCountMax = 99999999;
int rateMin = 0;
int rateMax = 100;
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
CancellationTokenSource cancellationTokenSource = null;
public CaiNiXiHuanCollectForm()
{
InitializeComponent();
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text != "开始采集")
{
cancellationTokenSource.Cancel();
}
else
{
var cookieShop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.LoginStatus == "登录成功");
if (cookieShop == null)
{
BaseForms.BaseMsgForm.ShowError("请登录店铺账号后搜索");
return;
}
priceMin = this.txtPriceMin.Text.ParseToDecimal();
priceMax = this.txtPriceMax.Text.ParseToDecimal();
sellCountMin = this.txtSellCountMin.Text.ParseToLong();
sellCountMax = this.txtSellCountMax.Text.ParseToLong();
commentCountMin = this.txtCommentCountMin.Text.ParseToLong();
commentCountMax = this.txtCommentCountMax.Text.ParseToLong();
rateMin = this.txtRateMin.Text.ParseToInt();
rateMax = this.txtRateMax.Text.ParseToInt();
int pageTotal = txtTotalPage.Text.ParseToInt();
if (pageTotal < 1)
{
BaseForms.BaseMsgForm.ShowError("请至少查询一页以上数据");
return;
}
var searchTextArr = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", ",", " " }, StringSplitOptions.RemoveEmptyEntries);
if (searchTextArr.Length == 0)
{
searchTextArr = new string[] { "" };
//BaseForms.BaseMsgForm.ShowError("请至少输入一个商品");
//return;
}
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
cancellationTokenSource = new CancellationTokenSource();
int n = 0;
int total = searchTextArr.Count() * pageTotal;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
btnCollect.Text = "停止采集";
Task.Run(() =>
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
var exportFileName = "采集导出\\猜你喜欢采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
StreamWriter writer = new StreamWriter(exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray1 = new object[] { "商品ID,", "商品名称,", "价格,", "销量,", "评论数,", "好评率" };
writer.WriteLine(string.Concat(objArray1));
writer.Close();
foreach (var searchText in searchTextArr)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var text = searchText;
if (text.ParseToLong() == 0)
text = BaseRegex.GetMatchRegexString(ref text, "(\\d{10,22})");
for (int i = 1; i < pageTotal + 1; i++)
{
n++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集商品" + text + "猜你喜欢,当前采集到第 " + i + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
Thread.Sleep(Randomx.GetId(100, 500));
int pageNum = i;
var cnxhResult = CollectCaiNiXiHuan(cookieShop.Cookies, text, pageNum.ToString());
if (!string.IsNullOrEmpty(cnxhResult) && cnxhResult.Contains("\"status_code\":0"))
{
JObject jObj = JObject.Parse(cnxhResult);
if (jObj["item_cards"] == null)
return;
foreach (JObject pObj in jObj["item_cards"])
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var pStr = JsonHelper.SerializeObject(pObj);
var pId = BaseRegex.GetStringJson(ref pStr, "product_id");
if (!string.IsNullOrEmpty(pId))
{
DouGoodsCollectInfo prod = new DouGoodsCollectInfo();
prod.Id = pId;
prod.GoodsName = BaseRegex.GetStringJson(ref pStr, "title");
if (string.IsNullOrEmpty(prod.GoodsName))
{
}
prod.Price = (BaseRegex.GetDecimalJson(ref pStr, "min_price") / 100).ToString();
prod.Sales = BaseRegex.GetIntJson(ref pStr, "sales").ToString();
// 筛选条件
if (prod.Price.ParseToDecimal() < this.priceMin || prod.Price.ParseToDecimal() > this.priceMax
|| prod.Sales.ParseToDecimal() < this.sellCountMin || prod.Sales.ParseToDecimal() > this.sellCountMax)
continue;
Thread.Sleep(Randomx.GetId(500, 1000));
var commentResult = GetComments(GlobalConfig.DouUserCookies, prod.Id);
if (!string.IsNullOrEmpty(commentResult) && commentResult.Contains("\"status_code\":0"))
{
prod.CommentsCount = BaseRegex.GetIntJson(ref commentResult, "total_comments_num");
prod.CommentsRate = BaseRegex.GetDecimalJson(ref commentResult, "good_comment_ratio").ParseToDouble() / 100;
}
// 筛选条件
if (prod.CommentsRate < this.rateMin || prod.CommentsRate > this.rateMax
|| prod.CommentsCount < this.commentCountMin || prod.CommentsCount > this.commentCountMax)
continue;
this.lstProduct.Add(prod);
try
{
StreamWriter writer1 = new StreamWriter(exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray2 = new object[15];
objArray2[1] = "https://haohuo.jinritemai.com/views/product/item2?id=" + prod.Id;
objArray2[2] = ",";
objArray2[3] = prod.GoodsName;
objArray2[4] = ",";
objArray2[5] = prod.Price;
objArray2[6] = ",";
objArray2[7] = prod.Sales;
objArray2[8] = ",";
objArray2[9] = prod.CommentsCount;
objArray2[10] = ",";
objArray2[11] = prod.CommentsRate;
writer1.WriteLine(string.Concat(objArray2));
writer1.Close();
}
catch (Exception ex)
{
}
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, prod.Id, prod.GoodsName, null, prod.Price, prod.Sales, prod.CommentsCount,
prod.CommentsRate, "删除");
}));
}
}
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
}
private string CollectCaiNiXiHuan(string cookies, string productId, string pageNum = "1", string cursor = "20")
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://api5-normal-c-lf.amemv.com/aweme/v2/commerce/favorite/feed?app_name=aweme&channel=App%20Store&slide_guide_has_shown=1&minor_status=0&product_id=" +
productId + "&page_num=" + pageNum + "&cursor=" + cursor + "&page_name=product_detail&feedbacks=&count=20&filters=&filter_type=";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
public static string GetComments(string cookies, string productId)
{
HttpWebResponse response = null;
string result;
try
{
string url = "http://lianmengapi.snssdk.com/ies/v2/decision/getProductComments?product_id=" + productId + "&aid=1128";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.177";
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "猜你喜欢采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品ID," + "商品名称," + "价格," + "销量," + "评论数," + "好评率");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine("https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.GoodsName + ","
+ goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.CommentsCount + "," + goodsInfo.CommentsRate);
}
System.IO.File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
}
}
@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCommentCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
+180
View File
@@ -0,0 +1,180 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class CollectForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("好物采集");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("同行采集");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("整店采集");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("猜你喜欢采集");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("关键词采集");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("采集商品", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.lblName = new System.Windows.Forms.Label();
this.tv = new LittleRabbit.UserComponent.UcTreeView();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(659, 450);
this.panel1.TabIndex = 4;
//
// panel3
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 28);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(659, 422);
this.panel3.TabIndex = 1;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
this.panel2.Controls.Add(this.lblName);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(659, 28);
this.panel2.TabIndex = 0;
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.Location = new System.Drawing.Point(5, 6);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(57, 17);
this.lblName.TabIndex = 0;
this.lblName.Text = "lblName";
//
// tv
//
this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251)))));
this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.tv.Cursor = System.Windows.Forms.Cursors.Hand;
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll;
this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.tv.FullRowSelect = true;
this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.tv.HideCollapsedGroup = false;
this.tv.ItemHeight = 32;
this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tv.Name = "tv";
treeNode1.Name = "好物采集";
treeNode1.Text = "好物采集";
treeNode2.Name = "同行采集";
treeNode2.Text = "同行采集";
treeNode3.Name = "整店采集";
treeNode3.Text = "整店采集";
treeNode4.Name = "猜你喜欢采集";
treeNode4.Text = "猜你喜欢采集";
treeNode5.Name = "关键词采集";
treeNode5.Text = "关键词采集";
treeNode6.Name = "采集商品";
treeNode6.Text = "采集商品";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode6});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 450);
this.tv.TabIndex = 3;
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tv);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.panel1);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 5;
//
// CollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "CollectForm";
this.Text = "CollectForm";
this.Load += new System.EventHandler(this.CollectForm_Load);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblName;
private UserComponent.UcTreeView tv;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}
@@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class CollectForm : Form
{
public Lazy<HaoWuCollectForm> haoWuCollectForm = new Lazy<HaoWuCollectForm>();
public Lazy<FriendShopCollectForm> friendShopCollectForm = new Lazy<FriendShopCollectForm>();
public Lazy<KeywordCollectForm> keywordCollectForm = new Lazy<KeywordCollectForm>();
public Lazy<CaiNiXiHuanCollectForm> caiNiXiHuanCollectForm = new Lazy<CaiNiXiHuanCollectForm>();
public Lazy<ShopProductCollectForm> shopProductCollectForm = new Lazy<ShopProductCollectForm>();
public CollectForm()
{
InitializeComponent();
}
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
{
MainForm.sCurrentModule = e.Node.Name;
this.lblName.Text = e.Node.Text;
//如果是一级菜单,不做任何动作
if (e.Node.Parent == null) return;
new Thread(() =>
{
Thread.Sleep(200);
Invoke(new Action(() =>
{
switch (e.Node.Name)
{
case "好物采集":
SetForm(haoWuCollectForm.Value);
break;
case "同行采集":
SetForm(friendShopCollectForm.Value);
break;
case "整店采集":
SetForm(shopProductCollectForm.Value);
break;
case "关键词采集":
SetForm(keywordCollectForm.Value);
break;
case "猜你喜欢采集":
SetForm(caiNiXiHuanCollectForm.Value);
break;
}
}));
}).Start();
}
/// <summary>
/// 显示隐藏层
/// </summary>
/// <param name="f"></param>
private void SetForm(Form f)
{
if (f == null)
{
foreach (Control form in panel3.Controls)
{
form.Visible = false;
if (form is Form)
{
panel3.Controls.Remove(form as Form);
}
}
return;
}
bool had = false;
string sCurrentFormName = f.Name;
for (int i = 0; i < panel3.Controls.Count; i++)
{
if (sCurrentFormName == panel3.Controls[i].Name)
{
had = true;
panel3.Controls[i].Visible = true;
}
else
{
panel3.Controls[i].Visible = false;
}
}
if (had)
{
f = null;
return;
}
f.TopLevel = false;
f.Left = 0;
f.Top = 0;
f.FormBorderStyle = FormBorderStyle.None;
panel3.Controls.Add(f);
f.AutoSize = true;
f.Dock = DockStyle.Fill;
f.Show();
}
private void CollectForm_Load(object sender, EventArgs e)
{
try
{
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
}
catch { }
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,566 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class FriendShopCollectForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.cmbSort = new System.Windows.Forms.ComboBox();
this.txtScoreRateMax = new System.Windows.Forms.TextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label9 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.txtScoreRateMin = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtShopSalesMax = new System.Windows.Forms.TextBox();
this.txtProductCountMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtProductCountMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtShopSalesMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colKeyword = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 376;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(720, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(192, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集关键词";
//
// txtKeyWords
//
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(171, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的商品名称\r\n如垃圾桶,连衣裙等\r\n一行一个";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(720, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(720, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.cmbSort);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreRateMax);
this.ucGroupBoxEx2.Controls.Add(this.checkBox1);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.label11);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreRateMin);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.txtShopSalesMax);
this.ucGroupBoxEx2.Controls.Add(this.txtProductCountMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtProductCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtShopSalesMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(196, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(357, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// cmbSort
//
this.cmbSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSort.FormattingEnabled = true;
this.cmbSort.Items.AddRange(new object[] {
"综合",
"销量"});
this.cmbSort.Location = new System.Drawing.Point(68, 22);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(85, 25);
this.cmbSort.TabIndex = 375;
//
// txtScoreRateMax
//
this.txtScoreRateMax.Location = new System.Drawing.Point(287, 86);
this.txtScoreRateMax.Name = "txtScoreRateMax";
this.txtScoreRateMax.Size = new System.Drawing.Size(55, 23);
this.txtScoreRateMax.TabIndex = 391;
this.txtScoreRateMax.Text = "5";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(13, 87);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(99, 21);
this.checkBox1.TabIndex = 392;
this.checkBox1.Text = "显示商品图片";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.Visible = false;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(275, 89);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(13, 17);
this.label9.TabIndex = 390;
this.label9.Text = "-";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(68, 54);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(85, 23);
this.txtTotalPage.TabIndex = 376;
this.txtTotalPage.Text = "5";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(162, 90);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "体验分数";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(11, 26);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(56, 17);
this.label11.TabIndex = 377;
this.label11.Text = "排  序";
//
// txtScoreRateMin
//
this.txtScoreRateMin.Location = new System.Drawing.Point(219, 86);
this.txtScoreRateMin.Name = "txtScoreRateMin";
this.txtScoreRateMin.Size = new System.Drawing.Size(55, 23);
this.txtScoreRateMin.TabIndex = 388;
this.txtScoreRateMin.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(10, 58);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(56, 17);
this.label12.TabIndex = 378;
this.label12.Text = "采集页数";
//
// txtShopSalesMax
//
this.txtShopSalesMax.Location = new System.Drawing.Point(287, 54);
this.txtShopSalesMax.Name = "txtShopSalesMax";
this.txtShopSalesMax.Size = new System.Drawing.Size(55, 23);
this.txtShopSalesMax.TabIndex = 387;
this.txtShopSalesMax.Text = "99999999";
//
// txtProductCountMax
//
this.txtProductCountMax.Location = new System.Drawing.Point(287, 22);
this.txtProductCountMax.Name = "txtProductCountMax";
this.txtProductCountMax.Size = new System.Drawing.Size(55, 23);
this.txtProductCountMax.TabIndex = 383;
this.txtProductCountMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(275, 57);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtProductCountMin
//
this.txtProductCountMin.Location = new System.Drawing.Point(219, 22);
this.txtProductCountMin.Name = "txtProductCountMin";
this.txtProductCountMin.Size = new System.Drawing.Size(55, 23);
this.txtProductCountMin.TabIndex = 379;
this.txtProductCountMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(162, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "店铺月销";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(162, 26);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝数量";
//
// txtShopSalesMin
//
this.txtShopSalesMin.Location = new System.Drawing.Point(219, 54);
this.txtShopSalesMin.Name = "txtShopSalesMin";
this.txtShopSalesMin.Size = new System.Drawing.Size(55, 23);
this.txtShopSalesMin.TabIndex = 384;
this.txtShopSalesMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(275, 25);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 325);
this.splitContainer2.SplitterDistance = 299;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colKeyword,
this.colShopId,
this.colShopName,
this.colRate,
this.colSaleCount,
this.colShopCount,
this.colProductId,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(790, 299);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colKeyword
//
this.colKeyword.HeaderText = "关键词";
this.colKeyword.Name = "colKeyword";
this.colKeyword.ReadOnly = true;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 150;
//
// colRate
//
this.colRate.HeaderText = "体验分数";
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
this.colRate.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "店铺销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
this.colSaleCount.Width = 80;
//
// colShopCount
//
this.colShopCount.FillWeight = 150F;
this.colShopCount.HeaderText = "店铺宝贝数量";
this.colShopCount.Name = "colShopCount";
this.colShopCount.ReadOnly = true;
//
// colProductId
//
this.colProductId.HeaderText = "商品链接";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 300;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 25);
this.statusBar.TabIndex = 4;
//
// FriendShopCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "FriendShopCollectForm";
this.Text = "同行采集";
this.Load += new System.EventHandler(this.FriendShopCollectForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.DataGridViewEx dgvCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.ComboBox cmbSort;
private System.Windows.Forms.TextBox txtScoreRateMax;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtScoreRateMin;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtShopSalesMax;
private System.Windows.Forms.TextBox txtProductCountMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtProductCountMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtShopSalesMin;
private System.Windows.Forms.Label label16;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colKeyword;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,357 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.BaseForms;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class FriendShopCollectForm : Form
{
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
CancellationTokenSource cancellationTokenSource = null;
long productCountMin = 0;
long productCountMax = 99999999;
long shopSaleCountMin = 0;
long shopSaleCountMax = 99999999;
/// <summary>
/// 体验分数最小值
/// </summary>
decimal scoreMin = 0;
/// <summary>
/// 体验分数最大值
/// </summary>
decimal scoreMax = 100;
public FriendShopCollectForm()
{
InitializeComponent();
}
/// <summary>
///
/// </summary>
/// <param name="cookies"></param>
/// <param name="searchText">搜索关键字</param>
/// <param name="cursor">当前搜索的游标</param>
/// <param name="count">要搜索的总数</param>
/// <param name="sort">排序依据 0:综合 2:销量</param>
/// <returns></returns>
private string GetFriendShops(string cookies, string searchText, string cursor = "0", string count = "50", string sort = "0")
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://lianmengapi-lf.snssdk.com/selection/search/shop?channel=App%20Store&slide_guide_has_shown=1&minor_status=0"
+ "&cursor=" + cursor + "&count=" + count + "&search_text=" + GetHtml.UrlEncodeUtf8(searchText) + "&request_tag_from=m&order_by=&sort=" + sort;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
//https://lianmengapi-lf.snssdk.com/selection/search/shop?channel=App%20Store&slide_guide_has_shown=1&minor_status=0&cursor=0&count=50&search_text=%e8%bf%9e%e8%a1%a3%e8%a3%99&request_tag_from=m&order_by=&sort=0
//https://lianmengapi-lf.snssdk.com/selection/search/shop?channel=App%20Store&slide_guide_has_shown=1&minor_status=0&cursor=80&count=100&search_text=%E8%BF%9E%E8%A1%A3%E8%A3%99&request_tag_from=m&order_by=&sort=0");
//gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gftoken=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDAGBgYGBgY; Hm_lvt_b6520b076191ab4b36812da4c90f7a5e=1626076426; MONITOR_WEB_ID=ff46fe79-c1bd-4d03-b18d-39e78c59e3cf; passport_csrf_token_default=7565758120670bc073d791d6c2516599; passport_csrf_token=7565758120670bc073d791d6c2516599; ttcid=84ce6ad7a7c54817876bc354ce50e63998; ttwid=1%7C6M4WENwiVxCUI00v2KqThQe4VmQM34O0AXRdgU3S7ns%7C1626076427%7C6238c10c68cd01bf99c1a8fa834c4250f32a8b2ccc2adc1029ef451cab53cd60; n_mh=7LrrRmeUceh3vjPZWa4C3h7B_APxodsUr7zuYy75V90; sso_uid_tt=2ef4d6078ca6ad08e04251ff869d1454; sso_uid_tt_ss=2ef4d6078ca6ad08e04251ff869d1454; toutiao_sso_user=1f5ff878e13850a8a76d1c5002053dbb; toutiao_sso_user_ss=1f5ff878e13850a8a76d1c5002053dbb; odin_tt=fa6e9e56199abc6fe54781e77c689540450d6e2513913a8b02ae5b1253072129714f9118b1da0c09bfb9397d4dc5c318604bae278e4cf15e9845340f22d65e69; uidpasaddaehruigqreajf=0; tt_scid=rx5XfMYxzTA66ZKDdmoMcC4qrQQzNeZh-wTo-K3sfH8pDdVFgiS9pBpGCcVx2ORX5bdd; ucas_sso_c0_ss=CkEKBTEuMC4wEJ6Ihe7Jof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIU5OPHMBH5sjM45bXzqY54qXYF2OY; ucas_sso_c0=CkEKBTEuMC4wEJ6Ihe7Jof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIU5OPHMBH5sjM45bXzqY54qXYF2OY; ucas_c0_ss=CkEKBTEuMC4wEKSIhsLaof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIUpAxRIGvlmWnW3egoiY9Qkn_jA-M; sid_guard=0f3e1676339ab15de4697e624ff85b58%7C1626076435%7C5184000%7CFri%2C+10-Sep-2021+07%3A53%3A55+GMT; uid_tt=40ce5c67070509846fb296d5d132a38a; uid_tt_ss=40ce5c67070509846fb296d5d132a38a; sid_tt=0f3e1676339ab15de4697e624ff85b58; sessionid=0f3e1676339ab15de4697e624ff85b58; sessionid_ss=0f3e1676339ab15de4697e624ff85b58; ucas_c0=CkEKBTEuMC4wEKSIhsLaof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIUpAxRIGvlmWnW3egoiY9Qkn_jA-M; PHPSESSID=ff529a6f01eaf19e6a00245e676d1fa0; PHPSESSID_SS=ff529a6f01eaf19e6a00245e676d1fa0; need_choose_shop=0; Hm_lpvt_b6520b076191ab4b36812da4c90f7a5e=1626076436; login_info=%7B%22for_im_reply%22%3A%22ff529a6f01eaf19e6a00245e676d1fa0%22%7D
//passport_csrf_token_default=b45f8a5deab82f55ee0a9b2452c78a2d; passport_csrf_token=b45f8a5deab82f55ee0a9b2452c78a2d; n_mh=7LrrRmeUceh3vjPZWa4C3h7B_APxodsUr7zuYy75V90; sso_uid_tt=77d4f2eb5023c34a6a9a7cebb2b382db; sso_uid_tt_ss=77d4f2eb5023c34a6a9a7cebb2b382db; toutiao_sso_user=a884ccbcc49dad835d33cdc613c62438; toutiao_sso_user_ss=a884ccbcc49dad835d33cdc613c62438; odin_tt=ef6c903d84d840d6849ac89bba2da6f261fd3ae8b722c34f3e85ac154b69709e145deb2aef4fa2dbb777d1d6c53146dcc3ade71ffb17f315e410d911b0eff5db; ucas_sso_c0_ss=CkEKBTEuMC4wEKSIiN6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIUtfYvQwb4NE052EdbcrL95yHsFrs; ucas_sso_c0=CkEKBTEuMC4wEKSIiN6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIUtfYvQwb4NE052EdbcrL95yHsFrs; ucas_c0_ss=CkEKBTEuMC4wEKSIid6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIU-APRWpBUAsOmIf4repethZ5coPw; sid_guard=630400240480860367e63fa726e7238f%7C1626089734%7C5184000%7CFri%2C+10-Sep-2021+11%3A35%3A34+GMT; uid_tt=1b1612b50857532656f4f623275adb40; uid_tt_ss=1b1612b50857532656f4f623275adb40; sid_tt=630400240480860367e63fa726e7238f; sessionid=630400240480860367e63fa726e7238f; sessionid_ss=630400240480860367e63fa726e7238f; ucas_c0=CkEKBTEuMC4wEKSIid6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIU-APRWpBUAsOmIf4repethZ5coPw; PHPSESSID=840c94272b784072021cecf2aefccb30; PHPSESSID_SS=840c94272b784072021cecf2aefccb30; MONITOR_WEB_ID=e8b18a1d-c085-4692-bba2-3972f9dc16e7; buyin_shop_type=24; ttwid=1%7CuycbM01qMO-TgJUFec3jiZ_znHlSLKDYKGuzE_vWz90%7C1626242695%7C4bccbd38df4bd7ff3265ca69959cdc6a6dd7df547437ab4e891149ff37a464cf; SASID=SID2_3492329951615696327; BUYIN_SASID=SID2_3492329951615696327");
request.ContentType = "application/x-www-form-urlencoded";
//request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
return result;
}
private string GetShopDetail(string productId)
{
HttpWebResponse response = null;
string result;
try
{
string url = "http://ec.snssdk.com/product/ajaxitem?b_type_new=0&device_id=0&is_outside=1&id=" + productId + "&abParams=0";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.Referer = "https://haohuo.jinritemai.com/";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.509";
request.Headers.Add("origin", @"https://haohuo.jinritemai.com");
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
return result;
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text != "开始采集")
{
cancellationTokenSource.Cancel();
return;
}
var cookieShop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.LoginStatus == "登录成功");
if (cookieShop == null)
{
BaseForms.BaseMsgForm.ShowError("请登录店铺账号后搜索");
return;
}
var searchTextArr = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", ",", " " }, StringSplitOptions.RemoveEmptyEntries);
if (searchTextArr.Length == 0)
{
BaseForms.BaseMsgForm.ShowError("请至少输入一个关键词");
return;
}
productCountMin = txtProductCountMin.Text.ParseToLong();
productCountMax = txtProductCountMax.Text.ParseToLong();
shopSaleCountMin = txtShopSalesMin.Text.ParseToLong();
shopSaleCountMax = txtShopSalesMax.Text.ParseToLong();
scoreMin = txtScoreRateMin.Text.ParseToDecimal();
scoreMax = txtScoreRateMax.Text.ParseToDecimal();
int totalPage = txtTotalPage.Text.ParseToInt();
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
var sortType = cmbSort.SelectedIndex <= 0 ? "0" : "2";
cancellationTokenSource = new CancellationTokenSource();
int n = 0;
int total = searchTextArr.Count() * totalPage;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
btnCollect.Text = "停止采集";
Task.Run(() =>
{
foreach (var searchText in searchTextArr)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var exportFileName = "采集导出\\抖音同行采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,店铺编号,店铺名称,体验分数,店铺销量,店铺商品总数,商品链接");
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
for (int page = 0; page < totalPage; page++)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
n++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集同行商品:" + searchText + ",当前采集到第 " + (page + 1) + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
//var friendProductResult = GetFriendShops(cookieShop.Cookies, searchText, (page * 10).ToString(), (totalPage * 10).ToString(), sortType);
var friendProductResult = GetFriendShops(GlobalConfig.DouUserCookies, searchText, (page * 10).ToString(), (totalPage * 10).ToString(), sortType);
if (friendProductResult.Contains("用户未登录"))
{
Invoke(new Action(() =>
{
ToolForms.DouUserLoginForm dForm = new ToolForms.DouUserLoginForm();
dForm.ShowDialog();
}));
}
friendProductResult = GetFriendShops(GlobalConfig.DouUserCookies, searchText, (page * 10).ToString(), (totalPage * 10).ToString(), sortType);
if (friendProductResult.Contains("用户未登录"))
{
BaseMsgForm.ShowError("用户登录失败,请登录抖音账号后再试!");
break;
}
else if (!string.IsNullOrEmpty(friendProductResult) && friendProductResult.Contains("\"status_code\":0"))
{
JObject jObj = JObject.Parse(friendProductResult);
if (jObj["shops"] == null)
continue;
foreach (var shop in jObj["shops"])
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shopStr = JsonHelper.SerializeObject(shop);
DouGoodsCollectInfo good = new DouGoodsCollectInfo();
good.Keyword = searchText;
good.Id = BaseRegex.GetStringJson(ref shopStr, "product_id");
good.ShopName = BaseRegex.GetStringJson(ref shopStr, "name");
//good.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id");
good.CommentsRate = BaseRegex.GetStringJson(ref shopStr, "score").ParseToDouble();
good.Sales = BaseRegex.GetStringJson(ref shopStr, "sales");
// 筛选条件
if (good.Sales.ParseToLong() < this.shopSaleCountMin || good.Sales.ParseToLong() > this.shopSaleCountMax
|| good.CommentsRate.ParseToDecimal() < scoreMin || good.CommentsRate.ParseToDecimal() > scoreMax)
{
continue;
}
Thread.Sleep(Randomx.GetId(500, 1000));
string detailResult = GetShopDetail(good.Id);
if (string.IsNullOrEmpty(detailResult) || !detailResult.Contains("\"st\":0"))
{
Thread.Sleep(Randomx.GetId(500, 1000));
detailResult = GetShopDetail(good.Id);
}
if (!string.IsNullOrEmpty(detailResult) && detailResult.Contains("\"st\":0"))
{
good.ShopProductCount = BaseRegex.GetStringJson(ref detailResult, "shop_product_count").ParseToInt();
// 筛选条件
if (good.ShopProductCount < this.productCountMin || good.ShopProductCount > this.productCountMax)
{
continue;
}
}
// 获取可用于店铺查询的店铺ID
Thread.Sleep(Randomx.GetId(300, 600));
string shopResult = Work.BLL.Collect.HaoWuCollectBLL.getHtml("https://ec.snssdk.com/product/fxgajaxstaticitem?" +
"b_type_new=0&device_id=0&is_outside=1&id=" + good.Id + "&preview=0", "", "utf8");
if (!string.IsNullOrEmpty(shopResult))
good.ShopId = BaseRegex.GetStringJson(ref shopResult, "shop_id");
try
{
this.lstProduct.Add(good);
StringBuilder sb = new StringBuilder();
sb.AppendLine(good.Keyword + "," + good.ShopId + ","
+ good.ShopName + "," + good.CommentsRate + "," + good.Sales + "," + good.ShopProductCount + ","
+ "https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id);
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex)
{
}
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, good.Keyword, good.ShopId, good.ShopName, good.CommentsRate, good.Sales,
good.ShopProductCount, "https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id, "删除");
}));
}
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
private void FriendShopCollectForm_Load(object sender, EventArgs e)
{
this.cmbSort.SelectedIndex = 0;
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductId")
{
string url = goodsId;
GetHtml.OpenUrl(url);
}
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "抖音同行采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,店铺编号,店铺名称,体验分数,店铺销量,店铺商品总数,商品链接");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine(goodsInfo.Keyword + "," + goodsInfo.ShopId + ","
+ goodsInfo.ShopName + "," + goodsInfo.CommentsRate + "," + goodsInfo.Sales + "," + goodsInfo.ShopProductCount + ","
+ "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id);
}
File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
}
}
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colKeyword.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
+556
View File
@@ -0,0 +1,556 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class HaoWuCollectForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.cmbCategory = new System.Windows.Forms.ComboBox();
this.txtRateMax = new System.Windows.Forms.TextBox();
this.chkShowImage = new System.Windows.Forms.CheckBox();
this.label7 = new System.Windows.Forms.Label();
this.txtCollectPage = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtRateMin = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtSaleCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtSaleCountMin = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImage = new System.Windows.Forms.DataGridViewImageColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(878, 472);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 375;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(798, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.cmbCategory);
this.ucGroupBoxEx1.Controls.Add(this.txtRateMax);
this.ucGroupBoxEx1.Controls.Add(this.chkShowImage);
this.ucGroupBoxEx1.Controls.Add(this.label7);
this.ucGroupBoxEx1.Controls.Add(this.txtCollectPage);
this.ucGroupBoxEx1.Controls.Add(this.label8);
this.ucGroupBoxEx1.Controls.Add(this.label1);
this.ucGroupBoxEx1.Controls.Add(this.txtRateMin);
this.ucGroupBoxEx1.Controls.Add(this.label2);
this.ucGroupBoxEx1.Controls.Add(this.txtSaleCountMax);
this.ucGroupBoxEx1.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx1.Controls.Add(this.label5);
this.ucGroupBoxEx1.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx1.Controls.Add(this.label6);
this.ucGroupBoxEx1.Controls.Add(this.label3);
this.ucGroupBoxEx1.Controls.Add(this.txtSaleCountMin);
this.ucGroupBoxEx1.Controls.Add(this.label4);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(426, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集参数";
//
// cmbCategory
//
this.cmbCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCategory.FormattingEnabled = true;
this.cmbCategory.Location = new System.Drawing.Point(76, 21);
this.cmbCategory.Name = "cmbCategory";
this.cmbCategory.Size = new System.Drawing.Size(105, 25);
this.cmbCategory.TabIndex = 375;
//
// txtRateMax
//
this.txtRateMax.Location = new System.Drawing.Point(330, 86);
this.txtRateMax.Name = "txtRateMax";
this.txtRateMax.Size = new System.Drawing.Size(55, 23);
this.txtRateMax.TabIndex = 391;
this.txtRateMax.Text = "100";
//
// chkShowImage
//
this.chkShowImage.AutoSize = true;
this.chkShowImage.Location = new System.Drawing.Point(76, 87);
this.chkShowImage.Name = "chkShowImage";
this.chkShowImage.Size = new System.Drawing.Size(99, 21);
this.chkShowImage.TabIndex = 392;
this.chkShowImage.Text = "显示商品图片";
this.chkShowImage.UseVisualStyleBackColor = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(314, 89);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(13, 17);
this.label7.TabIndex = 390;
this.label7.Text = "-";
//
// txtCollectPage
//
this.txtCollectPage.Location = new System.Drawing.Point(76, 54);
this.txtCollectPage.Name = "txtCollectPage";
this.txtCollectPage.Size = new System.Drawing.Size(105, 23);
this.txtCollectPage.TabIndex = 376;
this.txtCollectPage.Text = "5";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(205, 89);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 17);
this.label8.TabIndex = 389;
this.label8.Text = "好评率";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 377;
this.label1.Text = "采集类目";
//
// txtRateMin
//
this.txtRateMin.Location = new System.Drawing.Point(256, 86);
this.txtRateMin.Name = "txtRateMin";
this.txtRateMin.Size = new System.Drawing.Size(55, 23);
this.txtRateMin.TabIndex = 388;
this.txtRateMin.Text = "0";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 57);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 378;
this.label2.Text = "采集页数";
//
// txtSaleCountMax
//
this.txtSaleCountMax.Location = new System.Drawing.Point(330, 54);
this.txtSaleCountMax.Name = "txtSaleCountMax";
this.txtSaleCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSaleCountMax.TabIndex = 387;
this.txtSaleCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(330, 22);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(314, 57);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(13, 17);
this.label5.TabIndex = 386;
this.label5.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(256, 22);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(217, 57);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 17);
this.label6.TabIndex = 385;
this.label6.Text = "销量";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(217, 25);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(32, 17);
this.label3.TabIndex = 380;
this.label3.Text = "价格";
//
// txtSaleCountMin
//
this.txtSaleCountMin.Location = new System.Drawing.Point(256, 54);
this.txtSaleCountMin.Name = "txtSaleCountMin";
this.txtSaleCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSaleCountMin.TabIndex = 384;
this.txtSaleCountMin.Text = "0";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(314, 25);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(13, 17);
this.label4.TabIndex = 382;
this.label4.Text = "-";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(798, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(798, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(878, 347);
this.splitContainer2.SplitterDistance = 318;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colImage,
this.colPrice,
this.colSaleCount,
this.colRate,
this.colShopId,
this.colShopName,
this.colShopCount,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(868, 318);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 240;
//
// colImage
//
this.colImage.HeaderText = "图片";
this.colImage.Name = "colImage";
this.colImage.ReadOnly = true;
this.colImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImage.Visible = false;
this.colImage.Width = 70;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
this.colSaleCount.Width = 80;
//
// colRate
//
this.colRate.HeaderText = "好评率";
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
this.colRate.Width = 80;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 150;
//
// colShopCount
//
this.colShopCount.FillWeight = 150F;
this.colShopCount.HeaderText = "店铺商品总数";
this.colShopCount.Name = "colShopCount";
this.colShopCount.ReadOnly = true;
this.colShopCount.Width = 80;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(878, 28);
this.statusBar.TabIndex = 4;
//
// HaoWuCollectForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(878, 472);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "HaoWuCollectForm";
this.Text = "好物采集";
this.Load += new System.EventHandler(this.HaoWuCollectForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx1.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private System.Windows.Forms.SplitContainer splitContainer1;
private UserComponent.DataGridViewEx dgvCollect;
private System.Windows.Forms.ComboBox cmbCategory;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtCollectPage;
private System.Windows.Forms.TextBox txtRateMax;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtRateMin;
private System.Windows.Forms.TextBox txtSaleCountMax;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtSaleCountMin;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.CheckBox chkShowImage;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private UserControls.ButtonEx btnExport;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewImageColumn colImage;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopCount;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,436 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Work.BLL.Collect;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class HaoWuCollectForm : Form
{
CancellationTokenSource cancellationTokenSource = null;
/// <summary>
/// 商品标题不包含的关键词列表
/// </summary>
private List<string> lstBanKeyText = new List<string>();
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
/// <summary>
/// 商品过滤的最低销量
/// </summary>
private string minSaleCount = "0";
private string maxSaleCount = "99999999";
private string minPrice = "0";
private string maxPrice = "99999999";
/// <summary>
/// 好评率
/// </summary>
private double hplMin = -1;
private double hplMax = 100;
/// <summary>
/// 采集详情推荐中的商品
/// </summary>
private bool isXqtj = false;
/// <summary>
/// 是否显示图片
/// </summary>
private bool isShowImg = false;
private string exportFileName = "douyinhaowu_collect.csv";
private string[] cates = new string[] { "精选", "食品饮料", "生鲜", "女装", "鞋靴", "彩妆", "护肤", "珠宝文玩", "家电", "数码办公", "男装",
"家纺", "家装", "厨具", "图书", "配饰", "母婴", "运动", "百货", "洗护", "票务卡券", "车品", "绿植农资" };
public HaoWuCollectForm()
{
InitializeComponent();
}
private void HaoWuCollectForm_Load(object sender, EventArgs e)
{
foreach (var item in cates)
{
this.cmbCategory.Items.Add(item);
}
this.cmbCategory.SelectedIndex = 0;
this.splitContainer2.SplitterWidth = 1;
}
public void Collect(string dyCookies, int totalPage, string cateName, string cateIndex, ref List<DouGoodsCollectInfo> lstGoods, ref int currentPage)
{
int total = totalPage;
string str = "";
try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
exportFileName = "采集导出\\抖音好物采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
StreamWriter writer = new StreamWriter(this.exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray1 = new object[] { "商品名称,", "价格,", "销量,", "好评率,", "商品ID,", "店铺ID,", "店铺名称,", "店铺商品总数" };
writer.WriteLine(string.Concat(objArray1));
writer.Close();
int num = 0;
while (num < totalPage)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
currentPage = num + 1;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集类目:" + cateName + ",当前采集到第 " + (num + 1) + " 页";
this.statusBar.pgbTaskProgress.Value = (num + 1);
this.statusBar.pgbTaskProgress.Text = (num + 1) + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
str = $"[{DateTime.Now.ToString("MM-dd HH:mm:ss")}] 正在采集类目:{cateName} 第{num + 1}页,成功采集{lstGoods.Count}条。";
object[] objArray2 = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), objArray2);
int num2 = num * 10;
string str2 = "";
object[] objArray3 = new object[] { "https://aweme.snssdk.com/aweme/v2/commerce/favorite/feed?feature_version=new_operate_resource&tab_id=", cateIndex, "&entrances&cursor=", num2, "&request_tag_from=lynx&with_tabs=false&filters=2_3481030053603741229%2C2_3484212195024324357%2C1_6971768879194327844%2C2_3479930499084982767%2C2_3470779358002703750%2C1_6971770338224982791%2C2_3476553583086965127%2C2_3478793526744103385%2C1_6971747541322976035%2C2_3480664549739395118&page_num=2&feedbacks&page_name=order_homepage&only_entrance=false&os_api=22&device_type=TAS-AN00&ssmix=a&manifest_version_code=160002&dpi=240&uuid=865166029839340&app_name=aweme&version_name=16.0.1&ts=1623252303&cpu_support64=false&app_type=normal&appTheme=dark&ac=wifi&host_abi=armeabi-v7a&update_version_code=16019900&channel=aweGW&_rticket=1623252304036&device_platform=android&iid=1935603863652935&version_code=160001&cdid=61a31b75-b28a-448f-b688-2803bf62456b&openudid=2292f1eb6ba5f1c1&device_id=68214623104&resolution=1600*900&os_version=5.1.1&language=zh&device_brand=HUAWEI&aid=1128&minor_status=0&mcc_mnc=46000" };
string url = string.Concat(objArray3);
object[] objArray4 = new object[0x13];
objArray4[0] = "https://aweme.snssdk.com/aweme/v2/commerce/favorite/feed?feature_version=new_operate_resource&tab_id=";
objArray4[1] = cateIndex;
objArray4[2] = "&render_purchase=0&entrances&cursor=";
objArray4[3] = num2;
objArray4[4] = "&request_tag_from=lynx&with_tabs=false&filters&page_num=";
objArray4[5] = num + 1;
objArray4[6] = "&feedbacks&page_name=order_homepage&only_entrance=false&os_api=22&device_type=TAS-AN00&ssmix=a&manifest_version_code=160002&dpi=240&uuid=8651";
objArray4[7] = DateTime.Now.ToString("ff");
objArray4[8] = "02983";
objArray4[9] = DateTime.Now.ToString("ss");
objArray4[10] = "40&app_name=aweme&version_name=16.0.1&ts=";
objArray4[11] = ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000L) / 10000000L).ToString(); // Base.ConvertDateTimeToInt();
objArray4[12] = "&cpu_support64=false&app_type=normal&appTheme=dark&ac=wifi&host_abi=armeabi-v7a&update_version_code=16019900&channel=aweGW&_rticket=1623515082669&device_platform=android&iid=1935603863652935&version_code=160001&cdid=61a31b75-b28a-448f-b6";
objArray4[13] = DateTime.Now.ToString("ss");
objArray4[14] = "-2803bf62456b&openudid=22";
objArray4[15] = DateTime.Now.ToString("ss");
objArray4[16] = "f1eb6ba5f1c1&device_id=682";
objArray4[17] = DateTime.Now.ToString("ff");
objArray4[18] = "623104&resolution=1600*900&os_version=5.1.1&language=zh&device_brand=HUAWEI&aid=1128&minor_status=0&mcc_mnc=46000";
url = string.Concat(objArray4);
if (string.IsNullOrWhiteSpace(dyCookies))
{
dyCookies = "sid_guard=f7fbff5199b1bfe9de6eacb334368979|||";
}
str2 = GetHtml.GetUtf8(url, AllBase.BaseClass.ChromeUserAgent, dyCookies);
int num3 = 0;
if (str2.IndexOf("用户未登录") != -1)
{
DateTime now = DateTime.Now;
str = $"[{now.ToString("MM-dd HH:mm:ss")}] 请重新登入抖音.";
object[] objArray7 = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), objArray7);
//this.int_6 = 0x1_869f;
break;
}
while (true)
{
if (!(((str2.IndexOf("服务器打瞌睡了") != -1) || ((str2.IndexOf("你搜得太多啦") != -1) || (str2.Trim() == ""))) ? (num3 < 20) : false))
{
char[] separator = new char[] { 'ㄨ' };
string[] strArray = str2.Replace("\"product\":", "ㄨ\"product\":").Split(separator);
if (str2.Contains("\"item_cards\":"))
{
var jobj = Newtonsoft.Json.Linq.JObject.Parse(str2);
var sObj = jobj["item_cards"];
var sList = new List<string>();
foreach (var s in sObj)
{
sList.Add(JsonHelper.SerializeObject(s));
}
strArray = sList.ToArray();
}
int index = 0;
while (true)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
if (index >= strArray.Length)
{
Thread.Sleep(1000);
num++;
break;
}
try
{
string goodStr = strArray[index];
DouGoodsCollectInfo item = new DouGoodsCollectInfo();
item.Id = AllBase.BaseRegex.GetStringJson(ref goodStr, "product_id");
if (!string.IsNullOrEmpty(item.Id) && !lstGoods.Any(g => g.Id == item.Id))
{
item.GoodsName = AllBase.BaseRegex.GetStringJson(ref goodStr, "title")?.Trim();
if (!string.IsNullOrEmpty(item.GoodsName))
{
if (lstBanKeyText.Count == 0 || !lstBanKeyText.Any(t => item.GoodsName.Contains(t)))
{
// 销量数据
item.Sales = AllBase.BaseRegex.GetStringJson(ref goodStr, "sales");
if (string.IsNullOrEmpty(item.Sales))
item.Sales = "0";
// 销量符合筛选条件
if (Convert.ToInt32(item.Sales) >= Convert.ToInt32(this.minSaleCount) && Convert.ToInt32(item.Sales) <= Convert.ToInt32(this.maxSaleCount))
{
string price = BaseRegex.GetStringJson(ref goodStr, "min_price");
if (string.IsNullOrEmpty(price))
price = "0";
item.Price = ((Convert.ToDouble(price) * 1.0) / 100.0).ToString("f2");
if (Convert.ToDouble(item.Price) >= Convert.ToDouble(this.minPrice) && Convert.ToDouble(item.Price) <= Convert.ToDouble(this.maxPrice))
{
var img = BaseRegex.GetStringJson(ref goodStr, "url_list");
if (item.img == null)
img = BaseRegex.GetMatchRegexString(ref goodStr, "\"cover\":[^\\[\\]]+?\"url_list\":\\[([^\\[\\]]+?)\\]");
if (!string.IsNullOrEmpty(img))
{
item.img = img.Split(',')[0].Trim('"');
}
// 获取商品评价
item.CommentsCount = this.GetRate(item.Id, ref item.ShopProductCount, ref item.CommentsRate);
if (item.CommentsRate >= this.hplMin && item.CommentsRate <= hplMax)
{
//Application.DoEvents();
Thread.Sleep(1000);
string content = HaoWuCollectBLL.getHtml(
"https://ec.snssdk.com/product/fxgajaxstaticitem?b_type_new=0&device_id=0&is_outside=1&id=" + item.Id + "&preview=0",
"", "utf8");
item.ShopId = BaseRegex.GetStringJson(ref content, "shop_id");
item.ShopName = BaseRegex.GetStringJson(ref content, "shop_name");
lstGoods.Add(item);
this.ShowData(lstGoods.Count, item);
if (this.isXqtj)
{
//this.method_3(spid);
}
if (((index % 2) == 0) && (index > 0))
Thread.Sleep(1000);
}
}
}
}
}
}
}
catch (Exception ex)
{
}
index++;
}
break;
}
str = $"[{DateTime.Now.ToString("MM-dd HH:mm:ss")}] 服务器打瞌睡了,重试...";
object[] objArray5 = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), objArray5);
//Application.DoEvents();
Thread.Sleep(3000);
num3++;
}
}
}
catch
{
}
str = $"[{DateTime.Now.ToString("MM-dd HH:mm:ss")}] 采集结束,成功采集{lstGoods.Count}个.";
object[] args = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), args);
}
private int GetRate(string productId, ref int productCount, ref double rate)
{
int num = 0;
string url = "https://ec.snssdk.com/product/ajaxitem?b_type_new=0&device_id=0&is_outside=1&id=" + productId + "&abParams=0";
string content = HaoWuCollectBLL.getHtml_fxg_20201220(url, "", "");
int num2 = 0;
string ip = "";
while ((num2 < 10) && (content.Trim().Length < 10))
{
//Application.DoEvents(); // 刷新界面
Thread.Sleep(500);
num2++;
content = HaoWuCollectBLL.getHtml_fxg_20201220(url, "", ip);
}
num = BaseRegex.GetIntJson(ref content, "count");
productCount = BaseRegex.GetIntJson(ref content, "shop_product_count");
rate = (double)BaseRegex.GetDecimalJson(ref content, "value");
return num;
}
private void ShowData(int totalCount, DouGoodsCollectInfo goodsInfo)
{
try
{
StreamWriter writer = new StreamWriter(this.exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray1 = new object[15];
objArray1[0] = goodsInfo.GoodsName;
objArray1[1] = ",";
objArray1[2] = goodsInfo.Price;
objArray1[3] = ",";
objArray1[4] = goodsInfo.Sales;
objArray1[5] = ",";
objArray1[6] = goodsInfo.CommentsRate;
objArray1[7] = ",";
objArray1[8] = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id;
objArray1[9] = ",";
objArray1[10] = goodsInfo.ShopId;
objArray1[11] = ",";
objArray1[12] = goodsInfo.ShopName;
objArray1[13] = ",";
objArray1[14] = goodsInfo.ShopProductCount;
writer.WriteLine(string.Concat(objArray1));
writer.Close();
}
catch
{
}
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, goodsInfo.Id, goodsInfo.GoodsName, null, goodsInfo.Price, goodsInfo.Sales, goodsInfo.CommentsRate,
goodsInfo.ShopId, goodsInfo.ShopName, goodsInfo.ShopProductCount, "删除");
if (this.isShowImg)
{
this.dgvCollect.Columns["colImage"].Visible = true;
var row = dgvCollect.Rows[index];
row.Cells["colImage"].Value = this.GetImage2(goodsInfo.img, 60);
row.Height = 70;
}
else
this.dgvCollect.Columns["colImage"].Visible = false;
}));
}
public Image GetImage2(string path, int size = 130)
{
try
{
return new Bitmap(Image.FromStream(WebRequest.Create(path).GetResponse().GetResponseStream()), size, size);
}
catch
{
return null;
}
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text == "开始采集")
{
var cookie = GlobalConfig.DouUserCookies;
var cate = this.cmbCategory.Text;
var cid = this.cmbCategory.SelectedIndex.ToString();
var collectPage = this.txtCollectPage.Text.Trim().ParseToInt();
minSaleCount = this.txtSaleCountMin.Text.ParseToInt().ToString();
maxSaleCount = this.txtSaleCountMax.Text.ParseToInt().ToString();
minPrice = this.txtPriceMin.Text.ParseToDecimal().ToString();
maxPrice = this.txtPriceMax.Text.ParseToDecimal().ToString();
hplMin = this.txtRateMin.Text.ParseToDouble();
hplMax = this.txtRateMax.Text.ParseToDouble();
isShowImg = this.chkShowImage.Checked;
this.dgvCollect.Rows.Clear();
this.lstProduct.Clear();
cancellationTokenSource = new CancellationTokenSource();
btnCollect.Text = "停止采集";
int n = 0;
int total = collectPage;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
Task.Run(() =>
{
Collect(cookie, collectPage, cate, cid, ref lstProduct, ref n);
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
else
{
cancellationTokenSource.Cancel();
}
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "好物采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品名称," + "价格," + "销量," + "好评率," + "商品ID," + "店铺ID," + "店铺名称," + "店铺商品总数");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine(goodsInfo.GoodsName + "," + goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.CommentsRate + ","
+ "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.ShopId + ","
+ goodsInfo.ShopName + "," + goodsInfo.ShopProductCount);
}
File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
}
}
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,734 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class KeywordCollectForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.cmbCategory = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.txtCommentRateMax = new System.Windows.Forms.TextBox();
this.txtCommentRateMin = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtCommentCountMax = new System.Windows.Forms.TextBox();
this.txtCommentCountMin = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.txtScoreMax = new System.Windows.Forms.TextBox();
this.txtScoreMin = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.txtYongJinMax = new System.Windows.Forms.TextBox();
this.txtYongJinMin = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.txtSellCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSellCountMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colKeyword = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colYongJin = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colYongJinLv = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCommentCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCommentRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colScore = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNmae = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(852, 468);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 379;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(772, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(277, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集关键字";
//
// txtKeyWords
//
this.txtKeyWords.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(257, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的关键词\r\n一行一个";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(772, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Visible = false;
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(772, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.cmbCategory);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentRateMax);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentRateMin);
this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.label8);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label5);
this.ucGroupBoxEx2.Controls.Add(this.label6);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreMax);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreMin);
this.ucGroupBoxEx2.Controls.Add(this.label3);
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.txtYongJinMax);
this.ucGroupBoxEx2.Controls.Add(this.txtYongJinMin);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(281, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(409, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// cmbCategory
//
this.cmbCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCategory.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbCategory.FormattingEnabled = true;
this.cmbCategory.Items.AddRange(new object[] {
"综合",
"佣金排序",
"销量排序",
"价格降序",
"价格升序"});
this.cmbCategory.Location = new System.Drawing.Point(73, 14);
this.cmbCategory.Name = "cmbCategory";
this.cmbCategory.Size = new System.Drawing.Size(123, 24);
this.cmbCategory.TabIndex = 406;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(16, 18);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 407;
this.label9.Text = "排  序";
//
// txtCommentRateMax
//
this.txtCommentRateMax.Location = new System.Drawing.Point(337, 90);
this.txtCommentRateMax.Name = "txtCommentRateMax";
this.txtCommentRateMax.Size = new System.Drawing.Size(55, 23);
this.txtCommentRateMax.TabIndex = 405;
this.txtCommentRateMax.Text = "100";
//
// txtCommentRateMin
//
this.txtCommentRateMin.Location = new System.Drawing.Point(269, 90);
this.txtCommentRateMin.Name = "txtCommentRateMin";
this.txtCommentRateMin.Size = new System.Drawing.Size(55, 23);
this.txtCommentRateMin.TabIndex = 402;
this.txtCommentRateMin.Text = "0";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(224, 93);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 17);
this.label7.TabIndex = 403;
this.label7.Text = "好评率";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(325, 93);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(13, 17);
this.label8.TabIndex = 404;
this.label8.Text = "-";
//
// txtCommentCountMax
//
this.txtCommentCountMax.Location = new System.Drawing.Point(337, 65);
this.txtCommentCountMax.Name = "txtCommentCountMax";
this.txtCommentCountMax.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMax.TabIndex = 401;
this.txtCommentCountMax.Text = "99999999";
//
// txtCommentCountMin
//
this.txtCommentCountMin.Location = new System.Drawing.Point(269, 65);
this.txtCommentCountMin.Name = "txtCommentCountMin";
this.txtCommentCountMin.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMin.TabIndex = 398;
this.txtCommentCountMin.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(224, 68);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 17);
this.label5.TabIndex = 399;
this.label5.Text = "评论数";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(325, 68);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(13, 17);
this.label6.TabIndex = 400;
this.label6.Text = "-";
//
// txtScoreMax
//
this.txtScoreMax.Location = new System.Drawing.Point(337, 40);
this.txtScoreMax.Name = "txtScoreMax";
this.txtScoreMax.Size = new System.Drawing.Size(55, 23);
this.txtScoreMax.TabIndex = 397;
this.txtScoreMax.Text = "5";
//
// txtScoreMin
//
this.txtScoreMin.Location = new System.Drawing.Point(269, 40);
this.txtScoreMin.Name = "txtScoreMin";
this.txtScoreMin.Size = new System.Drawing.Size(55, 23);
this.txtScoreMin.TabIndex = 394;
this.txtScoreMin.Text = "0";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(212, 43);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 395;
this.label3.Text = "体验分数";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(325, 43);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(13, 17);
this.label4.TabIndex = 396;
this.label4.Text = "-";
//
// txtYongJinMax
//
this.txtYongJinMax.Location = new System.Drawing.Point(337, 15);
this.txtYongJinMax.Name = "txtYongJinMax";
this.txtYongJinMax.Size = new System.Drawing.Size(55, 23);
this.txtYongJinMax.TabIndex = 393;
this.txtYongJinMax.Text = "99999999";
//
// txtYongJinMin
//
this.txtYongJinMin.Location = new System.Drawing.Point(269, 15);
this.txtYongJinMin.Name = "txtYongJinMin";
this.txtYongJinMin.Size = new System.Drawing.Size(55, 23);
this.txtYongJinMin.TabIndex = 390;
this.txtYongJinMin.Text = "0";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(212, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 391;
this.label1.Text = "宝贝佣金";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(325, 18);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(13, 17);
this.label2.TabIndex = 392;
this.label2.Text = "-";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(16, 93);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "采集页数";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(73, 90);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(123, 23);
this.txtTotalPage.TabIndex = 388;
this.txtTotalPage.Text = "5";
//
// txtSellCountMax
//
this.txtSellCountMax.Location = new System.Drawing.Point(141, 65);
this.txtSellCountMax.Name = "txtSellCountMax";
this.txtSellCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMax.TabIndex = 387;
this.txtSellCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(141, 40);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(129, 68);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(73, 40);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(16, 68);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "宝贝销量";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(16, 43);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝价格";
//
// txtSellCountMin
//
this.txtSellCountMin.Location = new System.Drawing.Point(73, 65);
this.txtSellCountMin.Name = "txtSellCountMin";
this.txtSellCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMin.TabIndex = 384;
this.txtSellCountMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(129, 43);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(852, 343);
this.splitContainer2.SplitterDistance = 314;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colKeyword,
this.colProductId,
this.colProductName,
this.colPrice,
this.colSaleCount,
this.colYongJin,
this.colYongJinLv,
this.colCommentCount,
this.colCommentRate,
this.colScore,
this.colShopNmae,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(842, 314);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colKeyword
//
this.colKeyword.HeaderText = "关键词";
this.colKeyword.Name = "colKeyword";
this.colKeyword.ReadOnly = true;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 350;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
//
// colYongJin
//
this.colYongJin.HeaderText = "佣金";
this.colYongJin.Name = "colYongJin";
this.colYongJin.ReadOnly = true;
//
// colYongJinLv
//
this.colYongJinLv.HeaderText = "佣金率";
this.colYongJinLv.Name = "colYongJinLv";
this.colYongJinLv.ReadOnly = true;
//
// colCommentCount
//
this.colCommentCount.HeaderText = "评论数";
this.colCommentCount.Name = "colCommentCount";
this.colCommentCount.ReadOnly = true;
//
// colCommentRate
//
this.colCommentRate.HeaderText = "好评率";
this.colCommentRate.Name = "colCommentRate";
this.colCommentRate.ReadOnly = true;
//
// colScore
//
this.colScore.HeaderText = "体验分数";
this.colScore.Name = "colScore";
this.colScore.ReadOnly = true;
//
// colShopNmae
//
this.colShopNmae.HeaderText = "店铺名称";
this.colShopNmae.Name = "colShopNmae";
this.colShopNmae.ReadOnly = true;
this.colShopNmae.Width = 150;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(852, 28);
this.statusBar.TabIndex = 5;
//
// KeywordCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(852, 468);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "KeywordCollectForm";
this.Text = "关键词采集";
this.Load += new System.EventHandler(this.KeywordCollectForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.TextBox txtSellCountMax;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtSellCountMin;
private System.Windows.Forms.Label label16;
private UserComponent.DataGridViewEx dgvCollect;
private System.Windows.Forms.TextBox txtCommentRateMax;
private System.Windows.Forms.TextBox txtCommentRateMin;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtCommentCountMax;
private System.Windows.Forms.TextBox txtCommentCountMin;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtScoreMax;
private System.Windows.Forms.TextBox txtScoreMin;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtYongJinMax;
private System.Windows.Forms.TextBox txtYongJinMin;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbCategory;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colKeyword;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colYongJin;
private System.Windows.Forms.DataGridViewTextBoxColumn colYongJinLv;
private System.Windows.Forms.DataGridViewTextBoxColumn colCommentCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colCommentRate;
private System.Windows.Forms.DataGridViewTextBoxColumn colScore;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNmae;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,327 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class KeywordCollectForm : Form
{
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
CancellationTokenSource cancellationTokenSource = null;
decimal priceMin = 0;
decimal priceMax = 99999999;
long salesMin = 0;
long salesMax = 99999999;
decimal yongjinMin = 0;
decimal yongjinMax = 99999999;
decimal scoreMin = 0;
decimal scoreMax = 5;
long commentCountMin = 0;
long commentCountMax = 99999999;
decimal commentRateMin = 0;
decimal commentRateMax = 100;
public KeywordCollectForm()
{
InitializeComponent();
}
private string Collect(string cookies, string collectKeyword, string pageNum = "1", string sortText = "", string sortId = "0")
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://lianmengapi.snssdk.com/selection_api/search/pmt?app_name=aweme&channel=App%20Store" +
"&slide_guide_has_shown=1&minor_status=0&cursor=" + (pageNum.ParseToInt() * 20 - 20) + "&count=20" +
"&search_text=" + AllBase.HttpUtility.UrlEncode(collectKeyword, Encoding.UTF8) + "&request_tag_from=m" +
"&aid=1128&order_by=" + sortText + "&sort=" + sortId;
url = "https://buyin.jinritemai.com/pc/selection/search/pmt?page=" + pageNum
+ "&page_size=20&search_text=" + HttpUtility.UrlEncode(collectKeyword, Encoding.UTF8)
+ "&order_by=" + sortText + "&sort=" + sortId;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
//request.Headers.Set(HttpRequestHeader.Cookie, @"sid_tt=e21290832ad2b7efaeceb9cdc6c20935");
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (this.btnCollect.Text == "停止采集")
{
cancellationTokenSource.Cancel();
return;
}
var cookieShop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.LoginStatus == "登录成功");
if (cookieShop == null)
{
BaseForms.BaseMsgForm.ShowError("请登录店铺账号后搜索");
return;
}
priceMin = this.txtPriceMin.Text.ParseToDecimal();
priceMax = this.txtPriceMax.Text.ParseToDecimal();
salesMin = this.txtSellCountMin.Text.ParseToLong();
salesMax = this.txtSellCountMax.Text.ParseToLong();
yongjinMin = this.txtYongJinMin.Text.ParseToDecimal();
yongjinMax = this.txtYongJinMax.Text.ParseToDecimal();
scoreMin = this.txtScoreMin.Text.ParseToDecimal();
scoreMax = this.txtScoreMax.Text.ParseToDecimal();
commentCountMin = this.txtCommentCountMin.Text.ParseToLong();
commentCountMax = this.txtCommentCountMax.Text.ParseToLong();
commentRateMin = this.txtCommentRateMin.Text.ParseToDecimal();
commentRateMax = this.txtCommentRateMax.Text.ParseToDecimal();
var totalPage = this.txtTotalPage.Text.ParseToInt();
var keywords = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", " ", "," }, StringSplitOptions.RemoveEmptyEntries);
string sortText = "";
string sort = "0";
if (this.cmbCategory.SelectedItem.ToString() == "佣金排序")
{
sortText = "cos_ratio";
sort = "2";
}
else if (this.cmbCategory.SelectedItem.ToString() == "销量排序")
{
sortText = "sales";
sort = "2";
}
else if (this.cmbCategory.SelectedItem.ToString() == "价格降序")
{
sortText = "price";
sort = "2";
}
else if (this.cmbCategory.SelectedItem.ToString() == "价格升序")
{
sortText = "price";
sort = "1";
}
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
cancellationTokenSource = new CancellationTokenSource();
btnCollect.Text = "停止采集";
int n = 0;
int total = totalPage * keywords.Count();
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
Task.Run(() =>
{
var exportFileName = "采集导出\\爆款关键词采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv"; try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,商品ID,商品标题,价格,销量,佣金,佣金率,评论数,好评率,体验分数,店铺名称");
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex)
{
};
foreach (var keyword in keywords)
{
for (int i = 0; i < totalPage; i++)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
n++;
int page = i + 1;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集关键词:\"" + keyword + "\",当前采集到第 " + page + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
var listCollectResult = Collect(GlobalConfig.DouBuyinCookies, keyword, page.ToString(), sortText, sort);
if (listCollectResult.Contains("用户未登录") || listCollectResult.Contains("当前网络不稳定") || listCollectResult.Contains("操作异常"))
{
Invoke(new Action(() =>
{
DouUserLoginForm douLoginForm = new DouUserLoginForm("https://buyin.jinritemai.com/mpa/account/login?log_out=1&type=24");
//DouUserLoginForm douLoginForm = new DouUserLoginForm("https://buyin.jinritemai.com/dashboard/servicehall/daren-square");
douLoginForm.ShowDialog();
}));
cancellationTokenSource.Cancel();
break;
}
Thread.Sleep(Randomx.GetId(1000, 3000));
if (listCollectResult.Contains("\"code\":0"))
{
// todo
JObject jObj = JObject.Parse(listCollectResult);
if (jObj["data"] != null && jObj["data"]["promotions"] != null)
{
foreach (JObject obj in jObj["data"]["promotions"])
{
DouGoodsCollectInfo goodsInfo = new DouGoodsCollectInfo();
string goodStr = JsonHelper.SerializeObject(obj);
goodsInfo.Keyword = keyword;
goodsInfo.GoodsName = BaseRegex.GetStringJson(ref goodStr, "title");
goodsInfo.Id = BaseRegex.GetStringJson(ref goodStr, "product_id");
goodsInfo.Price = (BaseRegex.GetDecimalJson(ref goodStr, "price") / 100).ToString();
goodsInfo.yj = (BaseRegex.GetDecimalJson(ref goodStr, "cos_fee") / 100).ToString();
goodsInfo.yjl = (BaseRegex.GetDecimalJson(ref goodStr, "cos_ratio") / 100).ToString();
goodsInfo.Sales = BaseRegex.GetStringJson(ref goodStr, "month_sales"); // 月销量
goodsInfo.ShopId = BaseRegex.GetStringJson(ref goodStr, "shop_id");
goodsInfo.ShopName = BaseRegex.GetStringJson(ref goodStr, "shop_name");
goodsInfo.Score = BaseRegex.GetDecimalJson(ref goodStr, "exp_score").ParseToDouble();
if (goodsInfo.Price.ParseToDecimal() < priceMin || goodsInfo.Price.ParseToDecimal() > priceMax)
continue;
if (goodsInfo.yj.ParseToDecimal() < yongjinMin || goodsInfo.yj.ParseToDecimal() > yongjinMax)
continue;
if (goodsInfo.Sales.ParseToDecimal() < salesMin || goodsInfo.Sales.ParseToDecimal() > salesMax)
continue;
if (goodsInfo.Score.ParseToDecimal() < scoreMin || goodsInfo.Score.ParseToDecimal() > scoreMax)
continue;
var commentResult = CaiNiXiHuanCollectForm.GetComments(GlobalConfig.DouBuyinCookies, goodsInfo.Id);
Thread.Sleep(Randomx.GetId(400, 600));
if (!string.IsNullOrEmpty(commentResult) && commentResult.Contains("\"status_code\":0"))
{
goodsInfo.CommentsCount = BaseRegex.GetIntJson(ref commentResult, "total_comments_num");
goodsInfo.CommentsRate = BaseRegex.GetDecimalJson(ref commentResult, "good_comment_ratio").ParseToDouble() / 100;
}
// 筛选条件
if (goodsInfo.CommentsRate < this.commentRateMin.ParseToDouble() || goodsInfo.CommentsRate > this.commentRateMax.ParseToDouble()
|| goodsInfo.CommentsCount < this.commentCountMin || goodsInfo.CommentsCount > this.commentCountMax)
continue;
Invoke(new Action(() =>
{
this.dgvCollect.Rows.Add(false, keyword, goodsInfo.Id, goodsInfo.GoodsName, goodsInfo.Price, goodsInfo.Sales, goodsInfo.yj, goodsInfo.yjl,
goodsInfo.CommentsCount, goodsInfo.CommentsRate, goodsInfo.Score, goodsInfo.ShopName);
}));
try
{
lstProduct.Add(goodsInfo);
StringBuilder sb = new StringBuilder();
sb.AppendLine(goodsInfo.Keyword + ",https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.GoodsName + ","
+ goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.yj + "," + goodsInfo.yjl + "," + goodsInfo.CommentsCount + ","
+ goodsInfo.CommentsRate + "," + goodsInfo.Score + "," + goodsInfo.ShopName);
System.IO.File.WriteAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
}
}
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "爆款关键词采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,商品ID,商品标题,价格,销量,佣金,佣金率,评论数,好评率,体验分数,店铺名称");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine(goodsInfo.Keyword + ",https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.GoodsName + ","
+ goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.yj + "," + goodsInfo.yjl + "," + goodsInfo.CommentsCount + ","
+ goodsInfo.CommentsRate + "," + goodsInfo.Score + "," + goodsInfo.ShopName);
}
System.IO.File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
private void KeywordCollectForm_Load(object sender, EventArgs e)
{
this.cmbCategory.SelectedIndex = 0;
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
}
}
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colKeyword.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colYongJin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colYongJinLv.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCommentCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCommentRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colScore.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopNmae.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,506 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class ShopProductCollectForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtFilter = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label10 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtSellCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSellCountMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImage = new System.Windows.Forms.DataGridViewImageColumn();
this.colShopNmae = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 378;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(720, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(277, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集店铺";
//
// txtKeyWords
//
this.txtKeyWords.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(257, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的店铺id或链接\r\n一行一个";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(720, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(720, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.txtFilter);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(281, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(409, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// txtFilter
//
//
//
//
this.txtFilter.Border.Class = "TextBoxBorder";
this.txtFilter.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtFilter.Location = new System.Drawing.Point(16, 47);
this.txtFilter.Multiline = true;
this.txtFilter.Name = "txtFilter";
this.txtFilter.PreventEnterBeep = true;
this.txtFilter.Size = new System.Drawing.Size(176, 62);
this.txtFilter.TabIndex = 392;
this.txtFilter.WatermarkText = "请输入关键字,输入多个请用逗号隔开";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(210, 90);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "采集页数";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(267, 86);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(123, 23);
this.txtTotalPage.TabIndex = 388;
this.txtTotalPage.Text = "5";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(13, 26);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(104, 17);
this.label12.TabIndex = 378;
this.label12.Text = "包含以下关键字:";
//
// txtSellCountMax
//
this.txtSellCountMax.Location = new System.Drawing.Point(335, 54);
this.txtSellCountMax.Name = "txtSellCountMax";
this.txtSellCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMax.TabIndex = 387;
this.txtSellCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(335, 22);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(323, 57);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(267, 22);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(210, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "宝贝销量";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(210, 26);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝价格";
//
// txtSellCountMin
//
this.txtSellCountMin.Location = new System.Drawing.Point(267, 54);
this.txtSellCountMin.Name = "txtSellCountMin";
this.txtSellCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMin.TabIndex = 384;
this.txtSellCountMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(323, 25);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 325);
this.splitContainer2.SplitterDistance = 299;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
this.dgvCollect.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colImage,
this.colShopNmae,
this.colSaleCount,
this.colPrice,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(790, 299);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 350;
//
// colImage
//
this.colImage.HeaderText = "图片";
this.colImage.Name = "colImage";
this.colImage.ReadOnly = true;
this.colImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImage.Visible = false;
this.colImage.Width = 70;
//
// colShopNmae
//
this.colShopNmae.HeaderText = "店铺名称";
this.colShopNmae.Name = "colShopNmae";
this.colShopNmae.ReadOnly = true;
this.colShopNmae.Width = 150;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 25);
this.statusBar.TabIndex = 6;
//
// ShopProductCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "ShopProductCollectForm";
this.Text = "抖音整店采集";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtSellCountMax;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtSellCountMin;
private System.Windows.Forms.Label label16;
private UserComponent.DataGridViewEx dgvCollect;
private DevComponents.DotNetBar.Controls.TextBoxX txtFilter;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewImageColumn colImage;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNmae;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,358 @@
using AllBase;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Work.BLL.Collect;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class ShopProductCollectForm : Form
{
List<string> lstFilterKeyword = new List<string>();
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
decimal priceMin = 0;
decimal priceMax = 99999999;
long salesMin = 0;
long salesMax = 99999999;
int totalPage = 5;
CancellationTokenSource cancellationTokenSource = null;
public ShopProductCollectForm()
{
InitializeComponent();
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text != "开始采集")
{
cancellationTokenSource.Cancel();
return;
}
priceMin = this.txtPriceMin.Text.ParseToDecimal();
priceMax = this.txtPriceMax.Text.ParseToDecimal();
salesMin = this.txtSellCountMin.Text.ParseToLong();
salesMax = this.txtSellCountMax.Text.ParseToLong();
totalPage = this.txtTotalPage.Text.ParseToInt();
lstFilterKeyword = this.txtFilter.Text.Trim().Split(new string[] { "\r", "\n", " ", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
if (string.IsNullOrWhiteSpace(txtKeyWords.Text))
{
BaseForms.BaseMsgForm.ShowError("请输入要搜索的Id或链接");
return;
}
if (totalPage < 1)
{
BaseForms.BaseMsgForm.ShowError("请至少查询一页以上数据");
return;
}
var searchTextArr = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", ",", " " }, StringSplitOptions.RemoveEmptyEntries);
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
cancellationTokenSource = new CancellationTokenSource();
btnCollect.Text = "停止采集";
int n = 0;
int total = searchTextArr.Count() * totalPage;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
Task.Run(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
return;
var exportFileName = "采集导出\\抖音整店采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品Id,商品名称,店铺名称,商品销量,商品价格");
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
foreach (var searchText in searchTextArr)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
DouGoodsCollectInfo goodShop = new DouGoodsCollectInfo();
var text = searchText;
var goodId = BaseRegex.GetMatchRegexString(ref text, "(\\d{15,25})");
if (goodId != null && goodId.ParseToLong() > 0)
goodShop.Id = goodId;
else
{
var shopId = searchText;
if (searchText.Contains("shop/index?id="))
{
shopId = searchText.Substring(shopId.IndexOf("shop/index?id=") + "shop/index?id=".Length);
}
goodShop.ShopId = shopId;
}
if (goodShop.Id != null && goodShop.Id.ParseToLong() > 0)
{
string douShopResult = CollectDouShopDetailByProduct(goodShop.Id);
goodShop.ShopId = BaseRegex.GetStringJson(ref douShopResult, "shop_id");
goodShop.ShopName = BaseRegex.GetStringJson(ref douShopResult, "shop_name");
}
else
{
string douShopResult = CollectDouShopDetail(goodShop.ShopId);
goodShop.ShopName = BaseRegex.GetStringJson(ref douShopResult, "shop_name");
}
if (!string.IsNullOrEmpty(goodShop.ShopName) && !string.IsNullOrEmpty(goodShop.ShopId))
{
for (int i = 0; i < this.totalPage; i++)
{
if (i >= 19)
{
}
try
{
if (cancellationTokenSource.IsCancellationRequested)
break;
n++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集店铺:" + goodShop.ShopId + ",当前采集到第 " + (i + 1) + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
var goodsListResult = CollectShopGoodsList(goodShop.ShopId, i.ToString());
if (!string.IsNullOrEmpty(goodsListResult) && goodsListResult.Contains("用户未登录"))
{
BaseForms.BaseMsgForm.ShowError("请先未登录!");
break;
}
if (!string.IsNullOrEmpty(goodsListResult) && goodsListResult.Contains("\"st\":0"))
{
if (goodsListResult.Contains("\"list\":[]"))
break;
JObject jObj = JObject.Parse(goodsListResult);
if (jObj["data"]?["list"] != null)
{
foreach (JObject pObj in jObj["data"]?["list"])
{
string pStr = JsonHelper.SerializeObject(pObj);
DouGoodsCollectInfo good = new DouGoodsCollectInfo();
good.GoodsName = BaseRegex.GetStringJson(ref pStr, "goods_name");
good.Id = BaseRegex.GetStringJson(ref pStr, "product_id");
good.ShopName = goodShop.ShopName;
good.Sales = BaseRegex.GetStringJson(ref pStr, "sell_num");
good.Price = BaseRegex.GetDecimalJson(ref pStr, "goods_price").ToString();
var salesLong = good.Sales.Replace("+", "").Replace("万", "").ParseToDecimal();
if (good.Sales.Contains("万"))
salesLong = salesLong * 10000;
if (good.Price.ParseToDecimal() < priceMin || good.Price.ParseToDecimal() > priceMax
|| salesLong < salesMin || salesLong > salesMax)
{
continue;
}
if (lstFilterKeyword.Count > 0 && !lstFilterKeyword.Any(k => good.GoodsName.Contains(k)))
{
continue;
}
try
{
this.lstProduct.Add(good);
StringBuilder sb = new StringBuilder();
sb.AppendLine("https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id + "," + good.GoodsName + "," + good.ShopName + ","
+ good.Sales + "," + good.Price);
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, good.Id, good.GoodsName, null, good.ShopName, good.Sales, good.Price, "删除");
}));
}
}
}
}
catch (Exception ex)
{
}
Thread.Sleep(Randomx.GetId(3000, 4000));
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
});
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "抖音整店采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品Id,商品名称,店铺名称,商品销量,商品价格");
foreach (var good in lstProduct)
{
sb.AppendLine("https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id + "," + good.GoodsName + "," + good.ShopName + ","
+ good.Sales + "," + good.Price);
}
File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
/// <summary>
/// 获取店铺名称等信息
/// </summary>
/// <param name="shopId"></param>
/// <returns></returns>
private string CollectDouShopDetail(string shopId)
{
HttpWebResponse response = null;
string result;
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://ec.snssdk.com/shop/getInfo?id=" + shopId + "&b_type_new=0&device_id=0&is_outside=1");
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
/// <summary>
/// 根据店铺商品获取店铺名称等信息
/// </summary>
/// <param name="shopId"></param>
/// <returns></returns>
private string CollectDouShopDetailByProduct(string productId)
{
return HaoWuCollectBLL.getHtml("https://ec.snssdk.com/product/fxgajaxstaticitem?b_type_new=0&device_id=0&is_outside=1&id=" + productId + "&preview=0", "", "utf8");
}
private string CollectShopGoodsList(string shopId, string page)
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://ec.snssdk.com/shop/goodsList?shop_id=" + shopId + "&pageSize=20&page=" + page;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
request.Headers.Add("Cookie", AllBase.Helper.GlobalConfig.DouUserCookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductId" || columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
}
}
@@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopNmae.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>