Closed derekpierre closed 3 years ago
@mswilkison just to confirm that you wanted these two endpoints to return the value in the same way as http://chainz.cryptoid.info/grs/api.dws?q=totalcoins
...i.e. in plain text as opposed to json
...
Example
In [2]: response = requests.get('http://chainz.cryptoid.info/grs/api.dws?q=totalcoins')
In [3]: response.headers
Out[3]: {'Date': 'Wed, 11 Nov 2020 19:47:02 GMT', 'Content-Type': 'text/plain', 'Content-Length': '17', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=d7d1eddd6e152f81605f96e0fe8097f1b1605124022; expires=Fri, 11-Dec-20 19:47:02 GMT; path=/; domain=.cryptoid.info; HttpOnly; SameSite=Lax', 'Cache-Control': 'public,s-maxage=5,max-age=5', 'ETag': 'W/"30293e294239"', 'Access-Control-Allow-Origin': '*', 'CF-Cache-Status': 'DYNAMIC', 'cf-request-id': '065a71f6fb0000252034019000000001', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report?s=v2oTIP%2BQ386oNWL89RBBDP9lLNsqcpnt4Z2oqFxOs0BxArNfJDwfTCNk3moHzJ9WRGtxaDShqxXTljDPHIykR3PwckeDLzTSMRGth%2BjiI3oFKcCs9g%3D%3D"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"report_to":"cf-nel","max_age":604800}', 'Server': 'cloudflare', 'CF-RAY': '5f0a85d199f52520-IAD'}
In [4]: response.content
Out[4]: b'76286643.88736623'
In [5]: response.headers['Content-Type']
Out[5]: 'text/plain'
@mswilkison just to confirm that you wanted these two endpoints to return the value in the same way as
http://chainz.cryptoid.info/grs/api.dws?q=totalcoins
...i.e. in plain text as opposed tojson
...Example
In [2]: response = requests.get('http://chainz.cryptoid.info/grs/api.dws?q=totalcoins') In [3]: response.headers Out[3]: {'Date': 'Wed, 11 Nov 2020 19:47:02 GMT', 'Content-Type': 'text/plain', 'Content-Length': '17', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=d7d1eddd6e152f81605f96e0fe8097f1b1605124022; expires=Fri, 11-Dec-20 19:47:02 GMT; path=/; domain=.cryptoid.info; HttpOnly; SameSite=Lax', 'Cache-Control': 'public,s-maxage=5,max-age=5', 'ETag': 'W/"30293e294239"', 'Access-Control-Allow-Origin': '*', 'CF-Cache-Status': 'DYNAMIC', 'cf-request-id': '065a71f6fb0000252034019000000001', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report?s=v2oTIP%2BQ386oNWL89RBBDP9lLNsqcpnt4Z2oqFxOs0BxArNfJDwfTCNk3moHzJ9WRGtxaDShqxXTljDPHIykR3PwckeDLzTSMRGth%2BjiI3oFKcCs9g%3D%3D"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"report_to":"cf-nel","max_age":604800}', 'Server': 'cloudflare', 'CF-RAY': '5f0a85d199f52520-IAD'} In [4]: response.content Out[4]: b'76286643.88736623' In [5]: response.headers['Content-Type'] Out[5]: 'text/plain'
yes thanks!