kertser commited on
Commit
8aafba3
1 Parent(s): 5f576b1

Upload WarOnline_Chat.py

Browse files

Improvements. Fixing "02" bug

Files changed (1) hide show
  1. WarOnline_Chat.py +4 -1
WarOnline_Chat.py CHANGED
@@ -200,7 +200,7 @@ def getMessages(thread_url=thread_url, quotedUser="", startingPage=1):
200
  allquotes.append({'reply': reply, 'messengerName': messengerName, 'messageID': messageID, 'quotedID': quotedID})
201
 
202
  except:
203
- continue # There was no text in quote, move next
204
 
205
  #check if that is not a last page
206
  if not compare_pages(thread_url + 'page-' + str(page), thread_url + 'page-' + str(page + 1)):
@@ -269,6 +269,9 @@ def WarOnlineBot():
269
  FailureCounter = 0 # In case there is a bug in the model
270
  while (not message) and (FailureCounter<3):
271
  message = WarClient.getReply(message=quote)
 
 
 
272
  FailureCounter+=1
273
 
274
  if FailureCounter == 3:
 
200
  allquotes.append({'reply': reply, 'messengerName': messengerName, 'messageID': messageID, 'quotedID': quotedID})
201
 
202
  except:
203
+ continue # There was no text in this quote, move to the next
204
 
205
  #check if that is not a last page
206
  if not compare_pages(thread_url + 'page-' + str(page), thread_url + 'page-' + str(page + 1)):
 
269
  FailureCounter = 0 # In case there is a bug in the model
270
  while (not message) and (FailureCounter<3):
271
  message = WarClient.getReply(message=quote)
272
+ # Strange error in message if there is '02' in the message text.
273
+ if '02' in message:
274
+ message = ""
275
  FailureCounter+=1
276
 
277
  if FailureCounter == 3: