Category "python-requests"

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

How can I get size of file while downloading it in Python

How can I get size of file while downloading it in Python so that I can show downloaded size and pending size of file to download? if file size is 2GB and 700mb

Passing quoted argument in json payload to shell script

I am working on a python script that passes arguments to a shell script that lives in a Docker container. I'm achieving this using this Go webhook tool (https:/

SSL error only in python command window with apify request

I am trying to use endpoint from apify.com. When I run my request in web browser with token everything is fine but if I run my request via requests library from

Querying deeply nested and complex JSON data with multiple levels

I am struggling to break down the method required to extract data from deeply nested complex JSON data. I have the following code to obtain the JSON. import req

Pagination not working in Python Session.put()

I am trying to upload a file to a website (that has an inbuilt API) using the following code. The code reads a list of medical codes/diagnoses codes etc. (1 col

JSONDecodeError while trying to post csv value via python's requests.put method

I am currently working in python's requests library and accessing Salesforce API. I have successfully Accessed the access_token from Salesforce API Obtained the