Most voted "python-requests" questions
88 questions
Sort by count of
-
0
votes1
answer180
viewsRequests not being sent with payload in Python - Moodle
Good afternoon, I’m having a problem that’s already giving me a headache. The blessed request payload is not being sent to the webservice, only the url. My code is like this: class Curso: '''Resgata…
-
0
votes0
answers41
viewsProblem with webscrapping (requests)
Precise scrape this site to search for doctors in a category. I send the requisition all right, pass the value (the type of doctor) and send via POST the requisition. However it does not return the…
-
0
votes1
answer220
viewsSwitching pages in an html table with beautifulsoup
I’m collecting the data on this one website, using requests and beautifulsoup. I was able to collect all the data from page 1, but I cannot change the page. Python code variaveis = [] df_list = []…
-
0
votes1
answer139
viewsHow to read a JSON with missing fields to fill in a dictionary?
In Python 3 this code reads the Federal Senate API, the proposition data: import requests import pandas as pd headers = {"Accept" : "application/json"} url =…
-
0
votes1
answer388
viewsRemoving duplicate lines
I’m developing my TCC, My TCC, it searches emails in google collection, makes bulk sending etc, I’m having a problem, In this search for emails he collects repeated emails and invalid emails, then…
python python-3.x python-2.7 python-requests python-kivyasked 5 years, 7 months ago Allan Petersen 3 -
0
votes1
answer797
viewsAttributeerror: 'module' Object has no attribute 'exceptions'
I’m trying to use the module requests with python but I’m having the following errors: File "/home/santana/string.py", line 35, in <module> except requests.exceptions.RequestException as e:…
-
0
votes2
answers409
viewsSend JSON with python to API
I’m putting together a list of objects to post to an API in made in Arabic, but I can’t convert the data to work on the API. In python the list of objects is something like: payload = […
-
0
votes1
answer507
viewsWeb scraping with python on authenticated websites
I am trying to automate a web data collection process using Python. In my case, I need to pull the information from the page https://app.ixml.com.br/documentos/nfe. However, before going to this…
-
0
votes0
answers28
viewsProblem while extracting zip file - Zipfile
Remaking the question in an attempt to make it clearer. A webhook calls my API by sending a POST request. On the request body contains the url of a ZIP file. Using the requests library, I perform a…
-
0
votes0
answers125
viewsHow to get all files used on a page using "requests"?
As we know, when accessing a website by browser, various files such as images, music, scripts, CSS, among others, are downloaded to be used within a page HTML. Using the library requests, it is…
-
0
votes1
answer392
viewsLimit number of characters per Dataframe Python column
Need to limit the number of characters per column in Dataframe to Insert in SQL Server. Example: I have a Dataframe with 3 columns and 1k of rows (Column J/ K/ L) and I need to limit the Dataframe’s…
-
0
votes0
answers20
viewsHow to make a web scraping on an aspx site using python
I’m trying to scrap a page that uses aspx. The point is that when I go to inspect element the data I need is there, but when I give the requests on the page comes everything from html, except the…
-
0
votes2
answers247
viewsPython: requests.get("https://pt.stackoverflow.com/") never returns anything
When trying to use a requests.get(url) I get no response from the server, but adding kwarg timeout=1 for example, I get the answer after 1 second... example:\ import requests url =…
-
0
votes0
answers115
viewsChunkedencodingerror when making requests in python
Good afternoon guys. I’m having a problem with requests for data scraping. The main function is the one that follows: def raspa_dados(lista_de_links, ministerio): links = [] autores = [] chamadas =…
-
0
votes0
answers57
viewsBeautifulsoup is returning None
I’m trying to get the title of a product on the Amazon website, but the value returned is always None. Product link:…
-
0
votes1
answer79
viewsHow to get the page after authentication with requests?
I am trying to make a web scraping in python. My code is as follows: import requests from bs4 import Beautifulsoup Session = requests. Session() payload = {'username':'[xxxxx]', 'password':'[xxxxx]'…
-
0
votes0
answers59
viewspython requests post application
I am sending data via post to a web application made in Aravel with the CSRF active. This is the form: Note: I edited the _token. !DOCTYPE html> <html lang="en"> <head> <meta…
-
0
votes1
answer63
viewsPost request returns error 500
I have a simple Python script that sends a post request with a certain payload but it returns error 500. I’d really like someone to help me. The code: def answered(self,answer): headers = {…
-
0
votes0
answers22
viewsRequests library not working on Instagram analysis tool on Google Collab
I am developing a very simple tool to simply collect the number of followers of Instagram accounts. I am doing by Google Collab since the company I work imposes several security restrictions when it…
-
0
votes1
answer70
viewsHow to run a python script using VBA
I created a project that consists of sending automatic messages through the Telegram API, I did all this part in Python and works perfectly, as shown below. import requests from datetime import date…
-
0
votes0
answers15
viewsFlask download multiprocess video
I’m doing a project to download videos from a website and store them in a folder on the computer. Here’s the thing, I got a route @app.route('/baixar', methods=['POST']) who is responsible for…
-
0
votes1
answer41
viewsHow do I send multiple requests to the same URL (same API) in Python?
I’m calling an API that creates table in Hive. I’m developing an automated test script to make 30 requests and be able to create 30 tables in Hive. For this, I put a logic in which the tablename for…
-
0
votes0
answers19
viewsProblem extracting web page data with Beautiful Soup in python
I made a script in python to access the portal of records of the Inmetro to make a search among the existing certificates. In this case, my script accesses this link and takes all records from the…
-
-1
votes1
answer37
viewsProblems with excessive search requests on google
During the development of a Python project that needs to perform several automated searches on Google. At some point, as expected, Google blocks requests declaring "suspicious activity". My question…
-
-1
votes1
answer255
viewsHow do I see how much the function returns Python
I made a script that returns the names of online players of a given game only that I wanted to tbm put the quantity. How would this structure for quantity return? I already tried to create a list…
-
-1
votes1
answer359
viewsConvert json to Dictionary
I’m trying to convert json the data into a dictionary. This json_test to be a Dict type but actually comes as a list type when I check with type(json1_data). import json json1_file =…
-
-1
votes2
answers33
viewsProblems making the POST in Django
I am in a part of the project, which is the page of records I created the View method but it’s not rolling yet From what I looked the button is ok. The last image is from my admin, where the new…
-
-1
votes0
answers15
viewserror 403 Forbidden free market
I am trying to register a product on the platform following the ML API documentation, using the Python requests library, I did all the procedure that is in the documentation, but the server responds…
-
-1
votes1
answer31
viewsnumber of repeated elements of an array
compra = int(input('Valor da compra: R$')) valorPago = int(input('Valor pago: R$')) troco = valorPago - compra dimDisponivel = [100, 50, 25, 10, 5, 2, 1, 0.50, 0.25, 0.10, 0.05, 0.01] print(f'Troco:…
-
-1
votes1
answer136
viewsHow to unify display windows?
Good afternoon, I’m using 2 cameras in a project, but when I run the code it opens in two different windows, I’m trying to make the two images open in the same window... Can someone help me? Thank…
-
-1
votes1
answer41
viewsHow to relate two form Fields in Django?
Good afternoon! I am new to Jango and I am creating a system that will serve as a spreadsheet to help in the analysis of some demands. The demands will be a certificate called CAT requested by…
-
-2
votes1
answer39
viewsHow to extract information from a python request
import requests from requests.structures import CaseInsensitiveDict url = f"http://localhost/teste.php" headers = CaseInsensitiveDict() headers["Accept"] = "*/*" resp = requests.get(url,…
-
-2
votes1
answer92
views:python3 Tkinter Requests: Temporary lock in get('url') with request module!
This is the following I created a script to decrypt hash md5, but when I enter it into Entry 21232f297a57a5a743894a0e4a801fc3 that is admin and is contained in the Wordlist, it hangs every time when…
-
-2
votes1
answer99
viewsHelp to send data by python post method
I’m making a Checker for studies, I have a login api, but I keep coming up with this error: <Response [403]> I also tried to request post by Postman and gave the following error: { "sucesso":…
-
-3
votes1
answer557
viewsError "expected an indented block" in my Phyton Calculator
I have searched for hours to Try to find a error in my codes and I didn’t get Anything! Please help me! [] []2 []3…
-
-3
votes0
answers8
viewsKnow if pyttsx3.engine stopped it’s talk Function completely
I am using the API pyttsx3 on Python, but I am having difficulties regarding the "isBusy()" Function in it’s engine, which doesn’t Seem to Return if the engine completely stopped Talking, which I…
-
-4
votes2
answers54
viewsCan someone help me subtract one list from another?
I know it’s simple but I’m beating myself here to do this, I’d like to do a list subtraction in the following way lista_inicio = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "J", "Q", "K", "A"]…
-
-4
votes1
answer41
viewsHow could I reduce this code?
def hello_quantum(string): """ hello_quantum: cad. caracteres --> lógico funcao permite jogar o jogo praticamente, permite o uso das portas para manipular o tabuleiro com o objetivo de igualar o…