checksums
This commit is contained in:
		
							parent
							
								
									f146708b7c
								
							
						
					
					
						commit
						57a17342ed
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -91,6 +91,7 @@ import pytz | |||
| import re | ||||
| from urllib.parse import urlparse | ||||
| import requests | ||||
| from hashlib import sha3_256 | ||||
| 
 | ||||
| pdt = pytz.timezone("Us/Pacific") | ||||
| 
 | ||||
|  | @ -103,7 +104,10 @@ def parse_trs(trs): | |||
|         to_name = tds[1].text | ||||
|         date = datetime.strptime(tds[2].text, '%b %d, %Y @ %I:%M%p PDT').replace(tzinfo=pdt) | ||||
|         text = tds[3].text | ||||
|         print(f'({date}) {from_name} -> {to_name}: {text}') | ||||
|         checksum = sha3_256( | ||||
|             (from_url + to_url + str(date.timestamp()) + text).encode() | ||||
|         ).hexdigest() | ||||
|         print(f'(#{checksum}@{date}) {from_name} -> {to_name}: {text}') | ||||
| 
 | ||||
|         # download steamuserimages | ||||
|         for url_string in re.findall(r'(https?://\S+)', text): | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 mwiegand
						mwiegand