c# - HttpWebRequest to avito.ru -> error -


need html add out of these: https://www.avito.ru/moskva/kvartiry?user=1

i have following code:

httpwebrequest request = (httpwebrequest)webrequest.create(url);         request.protocolversion = httpversion.version11;         request.useragent = "mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/43.0.2357.134 safari/537.36";         request.accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*;q=0.8";         request.headers.add(httprequestheader.acceptlanguage, "ru-ru,ru;q=0.8,en-us;q=0.6,en;q=0.4");         request.method = "get";         request.timeout = 10000;         using (httpwebresponse response = (httpwebresponse)request.getresponse()) { ...;} 

it used work fine untill today. apparently have changed @ web-site , last line of code throw error, says:

system.net.webexception: base connection closed: inexpected error @ transfer. ---> system.io.ioexception: connection error because of inexpected packet format.

the thing is, still have response link @ top.

but throws exception @ response https://www.avito.ru/moskva/kvartiry/2-k_kvartira_54_m_1617_et._555913941

  • browser requests responded should. disabled cookies , js.

any ideas?

ps. error message can inexact it's translated. excuses grammar..

the server droped requests because forgot add "www." domain-name composed url's.. guys, keep eye on details.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -