Hack Forums
[Python] Retrieving data using urllib2 - Connected Refused by host. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Retrieving data using urllib2 - Connected Refused by host. (/showthread.php?tid=5598648)



Retrieving data using urllib2 - Connected Refused by host. - Skidy - Apr 13, 2017

So writing a small program to analyse data from the web.

My program calls a function every 1-3 seconds to download the data and after 9-12 seconds it analyses that data I have taken at those intervals. My issue is that the host refuses the connection after a set period of time.

I cannot see anyway around this but increase the time it retrieves the data as the problem is with the host and not me.

Thought I would ask you clever clogs to see if you had a solution? I preferably want to get the data every second to make it as reliable as possible but can't see how I would do it.


* - .kr. - Apr 13, 2017

Source? Url?

Need more information. Think u have to analyze the page again.
Use Requests or sinethingblike that


* - Skidy - Apr 13, 2017

Found an alternative to how to do this.