Skip to content

Commit f77d1c1

Browse files
committed
user agent
1 parent 502b821 commit f77d1c1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/inferencesh/sdk.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class File(BaseModel):
3939
def __init__(self, **data):
4040
super().__init__(**data)
4141
if self._is_url(self.path):
42-
print(f"Downloading URL: {self.path}")
4342
self._download_url()
4443
elif not os.path.isabs(self.path):
4544
self.path = os.path.abspath(self.path)
@@ -60,7 +59,11 @@ def _download_url(self) -> None:
6059

6160
# Set up request with user agent
6261
headers = {
63-
'User-Agent': 'inference.sh'
62+
'User-Agent': (
63+
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
64+
'AppleWebKit/537.36 (KHTML, like Gecko) '
65+
'Chrome/91.0.4472.124 Safari/537.36'
66+
)
6467
}
6568
req = urllib.request.Request(original_url, headers=headers)
6669

0 commit comments

Comments
 (0)