C# walls

在学习C#的阶段中,我们一点一点的往前爬,

此代码需要添加selenium ,和 获取 引用。

using Ivony.Html.Parser;
using Ivony.Html;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
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.Windows.Forms;

namespace taobao
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public static Thread th;
        private void button1_Click(object sender, EventArgs e)
        {
            th = new Thread(new ThreadStart(JDData));
            th.Start();
        }
        void JDData()
        {
            IWebDriver driver = new FirefoxDriver();

            driver.Navigate().GoToUrl("http://list.jd.com/list.html?cat=9987%2C653%2C655&go=0");
            //driver.FindElement(By.Id("startShopping")).Click();
            //Thread.Sleep(5000);

            //IJavaScriptExecutor jse = (IJavaScriptExecutor)driver;
            //int height = 1000;
            //jse.ExecuteScript("document.documentElement.scrollTop=" + height);
            //Thread.Sleep(20000);

            string sc = driver.PageSource;

            //以上步骤是获取网页源码
            //var documentsc = new Jumon
            var documenthtmlThree = new JumonyParser().Parse(sc);
            driver.Quit();
        }
    }
}
时间: 2024-10-13 07:29:51

C# walls的相关文章

D - MUH and Cube Walls

D. MUH and Cube Walls Polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got hold of lots of wooden cubes somewhere. They started making cube towers by placing the cubes one on top of the other. T

【最短路】Walls

Description In a country, great walls have been built in such a way that every great wall connects exactly two towns. The great walls do not cross each other. Thus, the country is divided into such regions that to move from one region to another, it

Beautiful Walls

[1553] Beautiful Walls 时间限制: 1000 ms 内存限制: 65535 K 问题描述 To simplify the building process, XadillaX built some template on the ground. The template is a very big wall and the height of each unit may be different. 8Mao and Hungar have to choose any par

Codeforces Round #269 (Div. 2) D. MUH and Cube Walls KMP

D. MUH and Cube Walls Polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got hold of lots of wooden cubes somewhere. They started making cube towers by placing the cubes one on top of the other. T

BFS Codeforces Round #297 (Div. 2) D. Arthur and Walls

题目传送门 1 /* 2 题意:问最少替换'*'为'.',使得'.'连通的都是矩形 3 BFS:搜索想法很奇妙,先把'.'的入队,然后对于每个'.'八个方向寻找 4 在2*2的方格里,若只有一个是'*',那么它一定要被替换掉 5 */ 6 #include <cstdio> 7 #include <iostream> 8 #include <algorithm> 9 #include <cstring> 10 #include <queue> 1

NBUT 2014 B Beautiful Walls

题目链接:http://acm.nbut.edu.cn/Contest/view/id/70/problem/B.xhtml 题意:给出n(n≤100000 )个正整数,考虑这个序列的连续的子序列的个数,将含有两个以上相同数字的子序列排除在外,将不同位置的相同序列算作两种,问这样的序列有多少个?为了便于描述,将这种序列称为W序列. 输入格式:每个样例首先输入正整数的个数n,然后是n个正整数,有多组样例 输出所求序列的个数 样例输入 5 3 4 5 5 2 3 1 2 3 样例输出 9 6 分析:

[Locked] Walls and Gates

Walls and Gates You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or an obstacle. 0 - A gate. INF - Infinity means an empty room. We use the value 231 - 1 = 2147483647 to represent INF as you may assume that the

POJ 1161 Walls(最短路+枚举)

POJ 1161 Walls(最短路+枚举) 题目背景 题目大意:题意是说有 n个小镇,他们两两之间可能存在一些墙(不是每两个都有),把整个二维平面分成多个区域,当然这些区域都是一些封闭的多边形(除了最外面的一个),现在,如果某几个小镇上的人想要聚会,为选择哪个区域为聚会地点,可以使他们所有人总共需要穿过的墙数最小,题目上有说明,不在某个点上聚会(聚会点在某个多边形内部),行进过程中不穿过图中的点(也就是除出发点外的其他小镇). 输入第1行代表m(2<=M<=200)个区域 第2行代表n(3&

最短路(数据处理):HDU 5817 Ice Walls

Have you ever played DOTA? If so, you may know the hero, Invoker. As one of the few intelligence carries, Invoker has 10 powerful abilities. One of them is the Ice Wall: Invoker generates a wall of solid ice directly in front of him, and the bitter c

codeforces 525 D Arthur and Walls

题意: 给出一个n*m的表格,里面有'*'和'.',求把最少的'*'移除掉,使得'.'所在的连通块是矩形. 限制: 1 <= n,m <= 2000 思路: 2*2地考虑,如果2*2的格子里只有一个'*',说明这个'*'要去掉,其他情况都不用去掉.然后去掉这个'*'后,又会对其他四个格子有影响. 复杂度好难估计. /*codeforces 525 D Arthur and Walls 题意: 给出一个n*m的表格,里面有'*'和'.',求把最少的'*'移除掉,使得'.'所在的连通块是矩形. 限