Starchik1 commited on
Commit
60f4ac5
·
verified ·
1 Parent(s): f066ee3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -114,8 +114,9 @@ def proxy(path):
114
  if re.match(r'^[A-Z0-9 ]+$', part_number):
115
  # Create a Google search URL for this part number with avto.pro
116
  google_search_url = f"https://www.google.com/search?q={part_number} avto.pro"
117
- # Update the link's href attribute
118
  link['href'] = google_search_url
 
119
 
120
  # Update image sources to use our proxy
121
  for img in soup.find_all('img'):
 
114
  if re.match(r'^[A-Z0-9 ]+$', part_number):
115
  # Create a Google search URL for this part number with avto.pro
116
  google_search_url = f"https://www.google.com/search?q={part_number} avto.pro"
117
+ # Update the link's href attribute and add target="_blank" to open in new tab
118
  link['href'] = google_search_url
119
+ link['target'] = '_blank'
120
 
121
  # Update image sources to use our proxy
122
  for img in soup.find_all('img'):