BraydenMoore commited on
Commit
c620f9f
·
1 Parent(s): e676aa7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -21,7 +21,7 @@ with open('active_urls.pkl', 'rb') as f:
21
  from io import BytesIO
22
  url = 'https://storage.googleapis.com/bmllc-data-bucket/exceptions.pkl'
23
  response = requests.get(url)
24
- exceptions = pickle.loads(BytesIO(response.content).read())
25
 
26
  live_urls = [i for i in live_urls if i not in exceptions]
27
 
@@ -71,7 +71,7 @@ def proxy(url):
71
  print(f'Redirecting')
72
  exceptions.append(url)
73
  byte_stream = BytesIO()
74
- pickle.dump(exceptions, byte_stream)
75
  byte_stream.seek(0)
76
  url = 'https://storage.googleapis.com/bmllc-data-bucket/exceptions.pkl'
77
  response = requests.put(url, data=byte_stream.read())
 
21
  from io import BytesIO
22
  url = 'https://storage.googleapis.com/bmllc-data-bucket/exceptions.pkl'
23
  response = requests.get(url)
24
+ exceptions = pkl.loads(BytesIO(response.content).read())
25
 
26
  live_urls = [i for i in live_urls if i not in exceptions]
27
 
 
71
  print(f'Redirecting')
72
  exceptions.append(url)
73
  byte_stream = BytesIO()
74
+ pkl.dump(exceptions, byte_stream)
75
  byte_stream.seek(0)
76
  url = 'https://storage.googleapis.com/bmllc-data-bucket/exceptions.pkl'
77
  response = requests.put(url, data=byte_stream.read())