I
I
ivan97272022-03-30 23:15:12
Python
ivan9727, 2022-03-30 23:15:12

How to implement a project on selenium + aiogram + aiohttp?

Guys, the question is purely for reflection who, as it were, implemented it. I myself am a beginner in python, and indeed in programming, there is a resource that you need to go to parse information, and all controls and notifications are in telegrams. Selenium is used for return responses such as chatting, or exchanging contacts, since all requests were sent because they encrypt some data and it was not possible to figure out where and how they do it. Just now, if you press the start button, relatively speaking, the bot calls a function in the village, everything logs in and then put on a cycle and repeats the action and the bot gets up. So far, I solved this issue by adding a task to the database and then running a separate file that sorts through the tasks and me the status of the task code. All traffic is also driven through the proxy, and how can I also run a checker on it before each request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2022-03-30
@Vindicar

There is an arsenic package , you can try it.
Well, or a method based on run_in_executor() , this will wrap synchronous code in a separate thread into a regular asynchronous task.
The only thing I'll add...

I'm new to python and programming in general.

Learning to code on these things is like learning to drive in a Formula 1 car. You put together a bunch of rakes and you end up with less than average knowledge of both the language and the technology. I strongly advise you to test Python, programming in general and asynchronous programming in particular using simpler examples.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question