Category "python-requests"

Getting a 400 Response Spotify API Python

I am trying to use requests.get with the Spotify API and I can't figure out why I keep getting a 400 response. I am working in an .ipynb file in Jupyter Lab run

Invalid syntax error using Requests library with Python 2.7

I'm using the Requests library with Python 2.7 and get the following error: Traceback (most recent call last): File "/home/user/Documents/workspaces/controlle

What exactly causes the "unable to get local issuer certificate" error when accessing an otherwise accessible (via browser) website URL?

I'm on macOS Monterey 12.3 running Python 3.9.7 installed via brew. Given this minimal replication of my production code: import requests try: response = r

POST request to FastAPI using Python Requests with a file and query parameters

I am using FastAPI to serve some ML models and I have a Streamlit basic UI using Python Requests module. One of my service is getting an image through a POST re

Django PDF parser on POST request

I hope for your help. Because I have been struggling with this problem for a long time. A POST request comes from the frontend with one PDF file, after which I

How to send multiple files with Python requests to FastAPI server?

I have the following endpoint in my FastAPI server: @app.post("/submit") async def submit(file1: List[UploadFile] = File(...), file2: List[UploadFile] = File(..

Unable to connect to a url with python request module

I'm unable to connect to the URL using requests module, but it works fine when browsed in a browser. Could it be some robots.txt issue Allowed/Disallowed issue

Loading Captcha image form a site does not work

I am trying to collect Captcha images using the Python requests module and save them to file or load in memory for further processing, but nothing works as belo

scrapy post request not updating data in airtable

I need to create records in an airtable base and have the following code in scrapy: url = "https://api.airtable.com/v0/appuhKmlhLIIEszLm/Table%201" payload = j

Unzipping the zipfiles within a url zipfile python

I can unzip a url zip file of csvs using the below code: import requests from zipfile import ZipFile from io import BytesIO import pandas as pd z = 'www.someur

How to import other Python files

I have this file, abc.py: def asb(): print("Hello, ") def xyz(): print("World!") In my main.py file, from abc import asb from abc import xyz I want

How to bypass Cloudflare with Python on GET requests?

I want to bypass Cloudflare on a GET request I have tried using Cloudscraper which worked for me in the past but now seems decreped. I tried: import cloudscrape

Proper syntax of parameters using function run_in_executor()

To make a POST call to the API, I use the following script: r = requests.post( url, headers={ "Content-Type": "application/json" }, json

Why is the Python Requests Module not returning links?

So I had created a python web scraper for my college capstone project that scraped around the web and followed links based on a random selection from the page.

How Do I Upload A File To As A multipart/form-data using requests Library?

I Want To Upload A File To A Remote Server Through REST API, using python requests Library. The Server Has Provided The Below Form. <form enctype="multipart/

What is the exact Tiktok API endpoint to get list of video ids (aweme_ids) using user id (uid)?

TikTok API to fetch the list of video ids corresponding to a particular username I have been getting the USER_ID using /aweme/v1/discover/search/?keyword=USERNA

Access Popup Source code - Python requests

I'm trying to scrape some data from a website. Adress: https://park4night.com/carte_lieux?lat=41.25807499996962&lng=9.426118999656891&zoom=38 I would li

Locust - Python - ssl.SSLError: [SSL] PEM lib (_ssl.c:4065)

I am new to python and locust, trying to run my first locust perf script to test an API However, I am getting error as ssl.SSLError: [SSL] PEM lib (_ssl.c:4065

Scraping the English Vivino.com reviews from the website

I have two questions about web scraping information from Vivino.com: 1.) With the code below I can scrape information and reviews from the Vivino website, howev

How to use variable's value as HTTP POST parameter?

I am trying to send HTTP post request to an API, but instead of using preset text values as POST data, I am trying to use the variables, but can't seems to figu