Questions tagged as 'python-requests'

1
answer

Difference in concatenating data in Python 3.7

I thank in advance the people who can help me with this query, since I am new to programming. I am taking a python course and I was practicing the conditionals and the following question arose: Why when concatenating with commas do not give m...
asked by 06.12.2018 / 05:09
0
answers

Error Tor AssertionError: Not supported proxy scheme socks5h

I was making a request with tor import requests proxies = {"http":"socks5h://locahost:9050","https":"socks5h://localhost:9050"} r = requests.get("http://httpbin.org/ip",proxies=proxies).content print r When executed, the error appears As...
asked by 30.12.2018 / 00:16
1
answer

Renew Tor's IP in Python

I have the following code: import requests import time from stem import Signal from stem.control import Controller def get_tor_session(): session = requests.session() session.proxies = {'http': 'socks5://localhost:9050','https': 'soc...
asked by 29.10.2017 / 19:18
0
answers

Receive request from urls.py

In the user activation system of my platform, the user accesses a link in the following way: http://127.0.0.1:8000/activate/XSWEKklut8tzDdH/[email protected]/ My file urls.py #home/urls.py from django.urls import path, re_path from home...
asked by 29.06.2018 / 20:52
0
answers

Logging on Twitter with requests

I'm trying to make a Python script to log into Twitter with requests (through another site) based on a PHP script that I made that worked. But throw the next error    Traceback (most recent call last): File   "C: /Users/User/Desktop/instabot-...
asked by 11.12.2017 / 14:29
1
answer

Publish to a Facebook group with requests / Python without the API

#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import datetime import json import logging import re import random import requests import shutil from pyquery import PyQuery as pq def main(username, password, page, imgurURL):...
asked by 15.04.2017 / 13:32
1
answer

What is the address between request.query_params and self.request.query_params in Python with Django

I'm starting with djangorestframework of django-python and I have the following code: class ProcesoViewSet(ModelPagination, viewsets.ViewSet): def list(self, request): query = request.query_params query1 = self.request.que...
asked by 07.07.2017 / 07:37
1
answer

Browse JSON with library python requests

In my example I want to access all the albums Coldplay has. This is the json. I understand that with the library requests I transform it to a dictionary but I can not access the albums but it returns the value of each position in the element top...
asked by 01.09.2018 / 00:02
2
answers

How to get page in django?

Using Django. I have info on amount of page in database this amount is entered by each user and stored in bd.  my concern is: How can I page with the amount I have stored in bd, for example, change 25 by the number I have in my database that I h...
asked by 05.05.2018 / 23:02
0
answers

Google Sheets with Python

I'm trying to upload some data to Google spreadsheets with Python. For this I use in module requests. I have managed to read a spreadsheet without problem using this code: import requests import json url = "https://sheets.googleapis.com/v4/s...
asked by 15.11.2018 / 12:23