Skip to content

Commit

Permalink
Update scrapebotv3.py
Browse files Browse the repository at this point in the history
Realised that the save function opens files without closing them.

After 200 cases, the program stops working. Now fixed.
  • Loading branch information
backup000 committed Mar 12, 2016
1 parent 2960f83 commit 334dfdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scrapebotv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def sleepabit():
def save_object(obj, filename):
with open(filename, 'wb') as output:
pickle.dump(obj, output, pickle.HIGHEST_PROTOCOL)
output.close

#Handles the security certificate by lawnet. this part is to set the TLS certficate to v1.0. I found the solution at: http://stackoverflow.com/questions/14102416/python-requests-requests-exceptions-sslerror-errno-8-ssl-c504-eof-occurred

Expand Down

0 comments on commit 334dfdb

Please sign in to comment.