How to get user comments left in a specific community on VK
📁 method, Advanced Python Topics, example, requests, AI
How to get all comments of a specific user left on the wall under posts in a specific community on VK?
I have reviewed all the methods available in the VK API and have not yet found a way to accomplish this task.
The input data for this task are the user ID and the community ID.
Here is an example of how I tried to implement it:
for i in range(200): url = ""https://api.vk.com/method/wall.get?owner_id=%s&offset=%s&count=1"" % (self.text1.toPlainText(), i) response = requests.get(url).text parsed_string = json.loads(response) url1=""https://api.vk.com/method/wall.getC If you don't specify global or nonlocal, then .
If you want to create a new global variable or override an old one inside a function (not at the global level), you can use global. This can be useful when working with the multiprocessing module to inherit desired global variables from the parent process:
def init(shared_arr_): global shared_arr shared_arr = shared_arr_ # must be inherited, not passed as an argument.
If you just want to use an existing global variable without overriding it, then global is not needed (otherwise, for example, you would have to
Log in to leave an answer
Blogs
C# Application Performance Optimization: .NET Tips and Practices