ashok2216 commited on
Commit
17899fd
·
verified ·
1 Parent(s): 1c18727

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -5,8 +5,20 @@ import seaborn as sns
5
  from data_cleaning import preprocess
6
  from transformers import pipeline
7
  from data_integration import scrape_all_pages
 
 
 
8
 
 
 
9
 
 
 
 
 
 
 
 
10
 
11
  page_bg_img = """
12
  <style>
 
5
  from data_cleaning import preprocess
6
  from transformers import pipeline
7
  from data_integration import scrape_all_pages
8
+ import time
9
+ from itertools import cycle
10
+ import requests
11
 
12
+ proxy_list = ["http://proxy1.com", "http://proxy2.com", "http://proxy3.com"]
13
+ proxy_pool = cycle(proxy_list)
14
 
15
+ for i in range(10):
16
+ proxy = next(proxy_pool)
17
+ response = requests.get(url, proxies={"http": proxy, "https": proxy}, headers=headers)
18
+ print(response.status_code)
19
+ time.sleep(2) # Wait for 2 seconds between requests
20
+
21
+
22
 
23
  page_bg_img = """
24
  <style>