python-requests

Why is beautifulsoup not returning data elements?

Why is beautifulsoup not returning data elements? Question: I’ve tried many things to return the data on this page: https://www.hebban.nl/rank . For some reason it’s not returning any data point, after many tries. Can someone point me in the right direction and tell me what I’m doing wrong. I’m learning but I seem to be …

Total answers: 1

How to parse and show info in template with requests_cache

How to parse and show info in template with requests_cache Question: I have several general questions about requests_cache and how is it working and how can i use that How can i get json from 3rd party and parse that in my template? I have some information from api that i dont need to write …

Total answers: 1

curl to python requests conversion for solr query

curl to python requests conversion for solr query Question: I have a bit of a bizzare problem. I have a solr index, which I query using curl like so: curl ‘http://localhost:8984/solr/my_index/select?indent=on&q="galvin%20life%20sciences"~0&wt=json&sort=_docid_%20desc&rows=5’ and I get (note the q string and the tilde operator which I use for proximity search): { "responseHeader":{ "status":0, "QTime":1, "params":{ "q":""galvin life …

Total answers: 1

How can I POST a JSON to an Express server with python module "requests"?

How can I POST a JSON to an Express server with python module "requests"? Question: So, I’m trying to post a JSON to a Node.JS server running Express with Python using the "requests" module. I’ve made a lot of tries, all of them failed. Closest I got was this: Server code: const fs = require(‘fs’); …

Total answers: 2

FastAPI StreamingResponse not streaming with generator function

FastAPI StreamingResponse not streaming with generator function Question: I have a relatively simple FastAPI app that accepts a query and streams back the response from ChatGPT’s API. ChatGPT is streaming back the result and I can see this being printed to console as it comes in. What’s not working is the StreamingResponse back via FastAPI. …

Total answers: 4

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')), Python

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')), Python Question: I made a telegram bot and deployed it on Render. All works fine for like 3 hours then the bot gets down and throws this error: `raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))` Worth mentioning that the server keeps being Live …

Total answers: 1

Python: How to get index from an Array of JSON?

Python: How to get index from an Array of JSON? Question: So, I was able to answer my question before on how to get the value of a JSON from an array of JSON. But now I’m trying to convert it in Python(for selenium). Here is the Array of JSON: [ { "id": 3328367679, "inbox_id": …

Total answers: 2

Scraping data off Morningstar – Portfolio Screen

Scraping data off Morningstar – Portfolio Screen Question: I am trying to scrape data from this link https://www.morningstar.com/funds/xnas/gibix/portfolio — basically all the data I can get, but particularly the Fixed Income Style Table and the Exposure, Bond Breakdown table. Here is my code: import requests from selenium import webdriver import pandas as pd link = …

Total answers: 1

GraphQL API Querying

GraphQL API Querying Question: I am new to API’s and am struggling to query it. I managed to get the below to work, but that is all. query = """{ player(slug:"nico-schlotterbeck") { firstName lastName position cardPositions id slug activeClub { name } age so5Scores(last:5) { score } } }""" The below does not seem to …

Total answers: 1