Questions tagged [Python] (11616)

1
answer

How to get the ID of the worker in Locust (python)?

Good day! There was a need to write some tests for the load of the system in the Locust, but suddenly there was a problem with the limitations of the system itself. The bottom line is this: I need to bind the specific worker-Locust (thread) to a specific account. For example, thread #1 - user1, thread #2 - user2. I.e., tha...
Sofia_Koelpin asked April 4th 20 at 14:22
3
answers

How to change the name of the downloaded file is located on another server?

Good day! I have a link to another website where you can download the file: hb.hb/123123121.mp3 I wish when you download it change the name to what you want to me. Is there a way to do this? I'm ready to do a redirect from your site, but do not know how to do it. Because if you just write: <a href="hb.hb/123123121.mp3" ...
devan30 asked April 4th 20 at 14:20
1
answer

How to install the time module for Python?

Error when you install the package for Python, what could be the problem?: C:\Users\ars>pip3 install time Collecting time ERROR: Could not find a version that satisfies the requirement time (from versions: none) ERROR: No matching distribution is found for time WARNING: You are using pip version 19.2.3, however 20.0.2 v...
ova.Casper45 asked April 4th 20 at 14:20
2
answers

How to display a list of the elements of the list of dictionaries by the specified key?

Have the following structure: data = { "some_list": [ {"key1": "some_value1", "key2", "some_value2" }, {"key1": "some_value1", "key2", "some_value2" }, {"key1": "some_value1", "key2", "some_value2" }, {"key1": "some_value1", "key2", "some_value2" }, ] } Need to get the data from the structure, passing as argument a str...
mable_Sta asked April 4th 20 at 14:19
2
answers

Python error: SyntaxError: invalid syntax what to do?

from colorama import init from colorama import Fore, Back, Style init() print(Back.YELLOW) a = float(input("Enter your weight: ")) b = float(input("Enter your height(cm): ")) b/=100 if a / b ** > 25.00: print("working ok") Started this code and I got error: File "new.py", line 8 if a / b ** > 25.00: ^ SyntaxError...
ned_Rueck asked April 4th 20 at 14:18
2
answers

Script template clicking on the link every X seconds?

Need a script template for moving the link every X seconds, ie sending the request in the background, for example, to the script itself passed by reference https://api.vk.com/method/messages.send?user_id=&m... every 30 seconds, without opening a web browser.
Cora asked April 4th 20 at 14:16
3
answers

How to delete a user's message?

As for all delete message user messages group by using a bot,using vk_api
darron.Hick asked April 4th 20 at 14:16
3
answers

How to check values in the database?

There is a table in the database which recorded the user_id and username of the user. How to make so that the user data were recorded 1 time? id_proverka_bd = cur.execute("SELECT user_id FROM users where user_log = '%s'" %user_logg) if id_idd != id_proverka_bd: cur.execute("INSERT INTO users(user_id,user_log) VALUES (%s,...
birdie_OConnell asked April 4th 20 at 14:15
1
answer

Why compiled exe file may not work selenium Python?

I made using pyinstaller the exe file and put it in the same location as the. py file (path relative to match) but after starting the exe nothing happens, only at the end for a second, some text appears and exe file closed. What it can be connected and whether to open a window with a browser, as happens with running through...
christian asked April 4th 20 at 14:15
1
answer

How to use selenium?

Write VK bot that needs to parse using selenium the data from the website and return them to the user,can this bot then upload to the server together with selenium script to emulate actions in the browser was emulating on the server,and then these data is sent to the user,if Yes then how to do it better and more practical?
cooper asked April 4th 20 at 14:15