Skip to content

Commit 91fddfe

Browse files
committed
retialer 403 fix
1 parent 3aa71f8 commit 91fddfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

say/crawler/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ def __init__(self, url):
120120
def call_api(self, url):
121121
try:
122122
# Run the wget command and capture the output
123-
print("result")
124123
result = subprocess.run(['wget', '-qO-', url], capture_output=True, text=True, check=True)
125-
print(result)
126124
return result.stdout
127125
except subprocess.CalledProcessError as e:
128126
return f"An error occurred: {e}"
@@ -135,14 +133,16 @@ def parse_result(self, api_response):
135133
except json.JSONDecodeError as e:
136134
return f"An error occurred while parsing JSON: {e}"
137135

138-
def get_data(self, force=False):
136+
def get_data(self, force):
139137
result = None
140138
parsed_result = None
141139

142140
if self.dkp is None:
143141
return
144142

145143
url = self.API_URL_NOT_FRESH % self.dkp
144+
print("url:")
145+
print(url)
146146
api_response = self.call_api(url)
147147
parsed_result = self.parse_result(api_response)
148148

0 commit comments

Comments
 (0)