Neurolingua commited on
Commit
b8f64be
1 Parent(s): 06eb261

Update other_function.py

Browse files
Files changed (1) hide show
  1. other_function.py +5 -12
other_function.py CHANGED
@@ -106,19 +106,12 @@ def get_weather(city):
106
 
107
  def get_rates():
108
 
109
- headers = {
110
- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36',
111
- 'Accept-Language': 'en-IN,en;q=0.9',
112
- 'Referer': 'https://www.google.co.in/',
113
- 'Connection': 'keep-alive',
114
- }
115
-
116
-
117
- # URL for fetching mandi prices for all states in India
118
- url = 'https://www.kisandeals.com/mandiprices/ALL/ALL/ALL'
119
 
120
- # Sending the GET request with headers
121
- r = requests.get(url, headers=headers)
122
  soup = BeautifulSoup(r.text, 'html.parser')
123
 
124
  # Finding the table in the HTML
 
106
 
107
  def get_rates():
108
 
109
+ proxies = {
110
+ "http": "http://160.86.242.23:8080",
111
+ "https": "http://160.86.242.23:8080",
112
+ }
 
 
 
 
 
 
113
 
114
+ r = requests.get('https://www.kisandeals.com/mandiprices/ALL/TAMIL-NADU/ALL', proxies=proxies)
 
115
  soup = BeautifulSoup(r.text, 'html.parser')
116
 
117
  # Finding the table in the HTML