backend / tests.py
vaibhavard
firstcommit
7a8853f
raw
history blame contribute delete
572 Bytes
import http.client
import json
conn = http.client.HTTPSConnection("scrapemaster-website-2-text.p.rapidapi.com")
headers = {
'x-rapidapi-key': "2a155d4498mshd52b7d6b7a2ff86p10cdd0jsn6252e0f2f529",
'x-rapidapi-host': "scrapemaster-website-2-text.p.rapidapi.com"
}
conn.request("GET", "/convert?target=https://timesofindia.indiatimes.com/technology/tech-news/deepseek-has-an-api-request-for-its-customers-please-understand/articleshow/117987906.cms", headers=headers)
res = conn.getresponse()
data = res.read()
print(json.loads(data))
# print(data.decode("utf-8"))