Home > Net >  How a piece of code that collection, I saw a Python is easy, why can't the rest of the c #.
How a piece of code that collection, I saw a Python is easy, why can't the rest of the c #.

Time:11-17

https://rate.tmall.com/list_detail_rate.htm? ItemId=588049695865 & amp; SpuId=1158864898 & amp; SellerId=2760516294 & amp; The order=3 & amp; CurrentPage=4 & amp; Append=0 & amp; The content=1 & amp; TagId=& amp; Posi=& amp; Picture=1

CodePudding user response:

In python has just started in China popular trend, someone once told me how great python, 3 lines of code to do collection
ShuiTie out I see, he is 3 words, launch a browser control, access to the address, and then get the results

Do you know how to reply us? We say, if this is great, then the vbscript as great, as he 3 lines of code, still is to launch a browser component, access the address, and then get the result,

C #, also a httpclient, an access url, a gain as a result, the three lines,

Code does not stick, do you know "c # httpclient" enough you baidu is out of the results

CodePudding user response:

reference 1st floor wanghui0380 response:
in python has just started in China popular trend, someone once told me how great python, 3 lines of code to do collection
ShuiTie out I see, he is 3 words, launch a browser control, access to the address, and then get the results

Do you know how to reply us? We say, if this is great, then the vbscript as great, as he 3 lines of code, still is to launch a browser component, access the address, and then get the result,

C #, also a httpclient, an access url, a gain as a result, the three lines,

Code does not stick, do you know "c # httpclient" enough you baidu results


Have a half-day is should be the need to use HTTP2.0 agreement, the default httpclient as if not,

CodePudding user response:

There is no time login cookie

After take cookies enc values

CodePudding user response:

The
big watermelon a WuYiJin reference 4 floor? Response:

when not logged in the cookie
After take cookies enc values

The need to use HTTP2.0 agreement, the problem is here,

CodePudding user response:

reference 1st floor wanghui0380 response:
in python has just started in China popular trend, someone once told me how great python, 3 lines of code to do collection
ShuiTie out I see, he is 3 words, launch a browser control, access to the address, and then get the results

Do you know how to reply us? We say, if this is great, then the vbscript as great, as he 3 lines of code, still is to launch a browser component, access the address, and then get the result,

C #, also a httpclient, an access url, a gain as a result, the three lines,

Code does not stick, do you know "c # httpclient" enough you baidu results


Ok, I admit I level is limited! From morning to now finally done, the problem is not the HTTP2.0 agreement, indeed PHYTHON can do c # can do it,
Not just httpcilent, httpwebrequest, can be, thanks to the warrior,

CodePudding user response:

Should be need to open the SSL

CodePudding user response:

I give you an example of our gathering, such as collecting the page http://quote.eastmoney.com/center/gridlist.html#hs_a_board on this page there is a Table, is asynchronous dynamic loading of data, but also to turn pages, when we assign a programmer to a collection task, he is required to use grckofx to load the page and the dynamic filling data Table top 10 pages in the Table of data in the cell in the tr, and in an interface method
 async Task Acquisition () {
.
}
returned directly in this way, that is to invoke other programmers to use a similar to synchronize access code for this acquisition as a result, rather than make what complex "event programming model,"

Can you understand this requirement? This requires a NPC half a day's work,

CodePudding user response:

Now many things need to asynchronous loading, even need to simulate a user on the page of a complex operation, can be collected as a result, this is the collection procedures, is not simply downloadstring can fix, to professional 1000 times, but also fast,

CodePudding user response:

I understand, easy to python acquisition, should be py library is rich, or what is the difference between language alone,

CodePudding user response:

If you say so, I put the python program package, just call in c #,
  •  Tags:  
  • C#
  • Related