Python answers

  • 1answers
    How to avoid redirects when parsing a site?
    I am parsing a python site using BF4. All pages except one are parsed without problems. But the problem page cannot be read due to the fact that after accessing this page, it redirects me to the main page. Is some script responsible for this? And how, in theory, to bypass this redirection?
    Python Anonymous, Sep 5, 2019

  • 3answers
    How to randomly open text files in PYTHON'E without repetition?
    There is a program, it should open randomly one text file and process information, after randomly open another without repetitions, etc. Problem: opens with repetitions. import random r = 1 i = 0 while r & lt; 10: print ("Job #" + str (r)) a = int (random.randint (10, 14)) f = ...
    Python Anonymous, Nov 1, 2020

  • 1answers
    Why does sruct.unpack require more bytes?
    there is a sequence (structure) of 14 bytes there are 6 variables uint32 = 4 bytes uint8 = 1 byte uint8 = 1 byte uint32 = 4 bytes uint16 = 2 bytes uint16 = 2 bytes 4 + 1 + 1 + 4 + 2 + 2 = 14 bytes in total Judging by I = 4 B = 1 B = 1 I = ...
    Python Abigail Chapman, Oct 25, 2020

  • 2answers
    How can I split a string in vk_api in python?
    In general, I know how to respond to an exact message, but let's say I want to make a command to the bot:! Say the text. But I don’t understand how to make him get that text after the word! Say
    Python Anonymous, Jan 3, 2020

  • 1answers
    Parsing Python, how to log in?
    Good day. There was a need for parsing, and I just started learning Python. The parser itself was written by the template, everything works, but you need to log in to the site and collect data, ~ 98 table pages. I tried requests but came across the fact that ...
    Python Anonymous, Aug 3, 2019

  • 1answers
    Why after building in pyinstaller when running "failed to execute script final"?
    I am trying to create an exe file from python py using pyinstaller. The script works correctly in the .py extension. The compilation process to exe was also successful. However, when I try to run the exe file, I get Fatal Error: Failed to execute script final. Tried reinstalling pyinstaller, ...
    Python Grace Estrada, Nov 3, 2020

  • 1answers
    How to download pictures from vk?
    Hello. E And who knows how to write a program in python that can download pictures from a certain VK group? Better yet, get links to these pictures. Thank you.
    Python Sophie Baxter, Dec 19, 2019

  • 1answers
    Why doesn't requests.get output anything?
    Completely new to python and programming in principle I took spotify as an example, I want to display its html. When the interpreter starts, nothing is output. What to do? import requestsdef loginbot(): r = requests.get('') print (r.text)
    Python Benjamin Payne, Dec 28, 2019

  • 5answers
    How do I create an editable table on a web page?
    I need to organize a web page to which data is loaded into a table from the database and where I can change them. I am writing simple scripts in python. I was able to organize the output of a data table from a sqlite3 database to a page created using Flask. I don't understand how to organize ...
    Python Jackson Haynes, May 6, 2020

  • 1answers
    How to insert data into sqlite3 db?
    How can you insert data into an autoincrement table, how can you skip this field? When inserting, an error occurs that the data type does not converge, since the first field is id and it is int. import sqlite3conn = sqlite3.connect("all.db")cursor = conn.cursor()def parser(link, ...
    Python William Matthews, Jul 2, 2019

  • 3answers
    Perhaps and how through virtualenv with python 2.7 to install env c python 3.6 for example?
    Hello. Given: $ python -VPython 2.7.5$ pip -Vpip 20.0.2 from /home/user1/.local/lib/python2.7/site-packages/pip (python 2.7) You need to put env with python other than 2.7 for example python 3.6 Is it possible and how? p.s. before that it was possible to install env with python ...
    Python Anonymous, Apr 2, 2020

  • 3answers
    Is everything an object in python?
    Somewhere I heard a phrase related to either python, or Java, or programming in general: "everything is an object." I understood this phrase literally, that is, I can call all the things written in the code an object, is there any practical meaning behind this phrase? And tell me, please, whether ...
    Python Sofia Mullins, Oct 7, 2020

  • 2answers
    Why isn't sorting a list working in Python?
    Good day. I can't sort the list of users. It seems like I'm doing everything right, but sorting doesn't work. Here is the code: users = ["Андрей", "София", "Cветлана", "Валерий", "Илья", "Mаксим", "Дмитрий", "Лиза"]users.sort() ...
    Python Anonymous, Jul 3, 2019

  • 2answers
    How to attach pictures to vk_api in Python in a message?
    Hello. I do not know how to send pictures, because the documentation is not written to me clearly. Please tell me the code.
    Python Anonymous, Apr 3, 2020

  • 2answers
    Should you take a Python course on Netology?
    If someone took this course on netology, you can write the pros and cons, is it worth the money?
    Python Luna Fletcher, Dec 31, 2018

  • 1answers
    How do I call a function n times at the same time?
    For example, I have a function that registers on the site, how can I call 100 of these functions at a time?
    Python Lucas Huber, Aug 19, 2019

  • 1answers
    The problem with a bot in Python?
    import telebot #библиотекиfrom telebot import typesd='@dusenkot'#Подставить сюда свой никbot=telebot.TeleBot('') #токен@bot.message_handler(commands=['start'])#1блокdef welcome(message):#keyboard markup=types.ReplyKeyboardMarkup(resize_keyboard=True) ...
    Python Anonymous, Jan 14, 2019

  • 1answers
    Gspread authorization error in pythonanywhere?
    Code: import gspreadfrom oauth2client.service_account import ServiceAccountCredentialsscope = ['', '']credentials = ServiceAccountCredentials.from_json_keyfile_name('key.json', scope)gc = ...
    Python Nora Horn, Jan 19, 2019

  • 1answers
    What is the error at the time of writing to the database?
    I try to send my phone to the Client table again, this error: The Client cleared table .. Why this error? What is this anyway? I ask for help.
    Python Anonymous, Jan 18, 2020

  • 0answers
    How to pull text and make a comparison, Selenium + Python?
    Good evening! Please help me get the text from the element to carry out the assert: <div id="up_file_name" class="form-group has-error"> <label class="control-label">Ошибка: неверный формат файла (разрешённые форматы: ...
    Python Kira Kennedy, Jul 19, 2020