reformat most things
This commit is contained in:
parent
bd7c781adb
commit
835494d29f
7 changed files with 85 additions and 50 deletions
|
|
@ -2,8 +2,7 @@
|
|||
import enum
|
||||
from typing import List
|
||||
import requests
|
||||
# from rec.db import RightmoveListing
|
||||
|
||||
from rec.db import RightmoveListing
|
||||
import urllib3
|
||||
|
||||
urllib3.disable_warnings()
|
||||
|
|
@ -36,7 +35,10 @@ def detail_query(detail_id: int):
|
|||
url = f"https://api.rightmove.co.uk/api/property/{detail_id}"
|
||||
response = requests.get(url, params=params, headers=headers, verify=False)
|
||||
if response.status_code != 200:
|
||||
raise Exception(f"id: {detail_id}. Status Code: {response.status_code}. Failed due to: {response.text}")
|
||||
raise Exception(
|
||||
f"""id: {detail_id}. Status Code: {response.status_code}."""
|
||||
f"""Failed due to: {response.text}"""
|
||||
)
|
||||
|
||||
return response.json()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue