Skip to content

Commit 382adc9

Browse files
committed
Updated request headers and other minor improvements
1 parent 89b1111 commit 382adc9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

NSE_Option_Chain_Analyzer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def __init__(self, window: Tk) -> None:
5050
self.url_update: str = "https://api.github.com/repos/VarunS2002/" \
5151
"Python-NSE-Option-Chain-Analyzer/releases/latest"
5252
self.headers: Dict[str, str] = {
53-
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, '
54-
'like Gecko) Chrome/80.0.3987.149 Safari/537.36',
53+
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
54+
'Chrome/130.0.0.0 Safari/537.36',
5555
'accept-language': 'en,gu;q=0.9,hi;q=0.8',
5656
'accept-encoding': 'gzip, deflate, br'}
5757
self.session: requests.Session = requests.Session()
@@ -143,7 +143,6 @@ def check_for_updates(self, auto: bool = True) -> None:
143143
try:
144144
release_data: requests.Response = requests.get(self.url_update, headers=self.headers, timeout=5)
145145
latest_version: str = release_data.json()['tag_name']
146-
float(latest_version)
147146
except Exception as err:
148147
print(err, sys.exc_info()[0], "21")
149148
if not auto:
@@ -919,6 +918,7 @@ def main_win(self) -> None:
919918
top_frame.columnconfigure(0, weight=1)
920919
top_frame.pack(fill="both", expand=True)
921920

921+
# noinspection PyTypeChecker
922922
self.sheet: tksheet.Sheet = tksheet.Sheet(top_frame, column_width=85, align="center",
923923
headers=self.output_columns, header_font=("TkDefaultFont", 9, "bold"),
924924
empty_horizontal=0, empty_vertical=20, header_height=35)

0 commit comments

Comments
 (0)