Can phython with selenium be minimized?

True, but when you use requests, you do the same ehen xou click at a website, you just have to co figure the header correctly.
 
Why would you choose Python for bots?

Python is used for scientific calculations, because there are a lot of free scientific libraries available.
This is the only advantage of Python in today's world. Otherwise it sucks in almost every aspect:

1. It is slower (sometimes much slower than alternatives)
2. It has an ugly, unreadable syntax
3. Creating native GUI is a pain in the ass, QT and alike look fugly on Windows

And the list goes on.

Your bots require scientific libraries? If not, there is no reason to choose Python.
 
Why would you choose Python for bots?

Python is used for scientific calculations, because there are a lot of free scientific libraries available.
This is the only advantage of Python in today's world. Otherwise it sucks in almost every aspect:

1. It is slower (sometimes much slower than alternatives)
2. It has an ugly, unreadable syntax
3. Creating native GUI is a pain in the ass, QT and alike look fugly on Windows

And the list goes on.

Your bots require scientific libraries? If not, there is no reason to choose Python.


Sir, you clearly don't code in python :D it has the most elegant syntax among all the existing programming languages. It's the best tool for web scraping so making web bots is really efficient with it ;) making game bots, however, is a different question here :p

By the way, instagram, google, youtube and many more are built with python ;)
 
Why would you choose Python for bots?

Python is used for scientific calculations, because there are a lot of free scientific libraries available.
This is the only advantage of Python in today's world. Otherwise it sucks in almost every aspect:

1. It is slower (sometimes much slower than alternatives)
2. It has an ugly, unreadable syntax
3. Creating native GUI is a pain in the ass, QT and alike look fugly on Windows

And the list goes on.

Your bots require scientific libraries? If not, there is no reason to choose Python.

Thats absolutly not true, as I say I am working at a international IT company (we are make projects for deutsch telekom) and websitr automatisation, web test, business tests, backend tests, test automatisation uses python and robotframework(a framework bulit on python).
 
And secondly i was at an interview at an another company, thye use python for networking, network analytics and its one of the biggest it company at hungary
 
Last edited by a moderator:
Sir, you clearly don't code in python :D it has the most elegant syntax among all the existing programming languages. It's the best tool for web scraping so making web bots is really efficient with it ;) making game bots, however, is a different question here :p

By the way, instagram, google, youtube and many more are built with python ;)

Yeah, using indentation instead curly braces for scoping is the most "elegant" solution out there. :)

Thats absolutly not true, as I say I am working at a international IT company (we are make projects for deutsch telekom) and websitr automatisation, web test, business tests, backend tests, test automatisation uses python and robotframework(a framework bulit on python).

The fact that you use Python doesnt mean it is the best choice you could have made. Many start-ups use Python. The reason is once again - a lot of scientific libraries.

See yourself where your company looses:

https://benchmarksgame.alioth.debian.org/u64q/python.html
https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=node&lang2=python3
 
Yeah, using indentation instead curly braces for scoping is the most "elegant" solution out there. :)



The fact that you use Python doesnt mean it is the best choice you could have made. Many start-ups use Python. The reason is once again - a lot of scientific libraries.

See yourself where your company looses:

https://benchmarksgame.alioth.debian.org/u64q/python.html
https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=node&lang2=python3

Lol Python vs Java? You can't be serious. My company doesn't loose at anything. As we are a big company and founding/resources (servers, PCs, workstations), our most important resource is time. Just example, I am at the company as an intern, and they gave me an Dell Latitude with one of the top i5, and 8gb ram, with SSD, and my computer considered an 'old' machine at the company, I will get a new about 3-4 months. The new comps comes with i5/i7 16gb ram etc. So the most important thing is develop time and code flexibility.
So just compare develop time between Java VS Python.
I develop an Selenium based bot in Python for example in 2 hours, and in java it takes 5-6 hours, if I use OOP paradigm.
And java use an "idiot" virtual machine which eat your memory to shit. A python based requests bot eats about 5-15 mb, a java based about 50-100 mb.
Sure, Java great for EE softwares, bank softwares or high complexity systems.
 
And if we really want to "speed-up" python, we could use pypy, which speed is near to C's speed, and C is much much faster than Java. And we don't even required to refactor/rewrite our code, as python and pypy is around 70-90% compatible.
 
nightmarejs (can't post link, but it ez googling)
Is fantastic library to work with browser automation.
Few lines of code can do alot of things.

Python is good language, but in any way u still need learn javascript for coding frontend (jquery, etc.....).
So why than not choose javascript as one language for all tasks?
With node.js u can run hundreds emulators on middle laptop.
 
Lol Python vs Java? You can't be serious. My company doesn't loose at anything. As we are a big company and founding/resources (servers, PCs, workstations), our most important resource is time. Just example, I am at the company as an intern, and they gave me an Dell Latitude with one of the top i5, and 8gb ram, with SSD, and my computer considered an 'old' machine at the company, I will get a new about 3-4 months. The new comps comes with i5/i7 16gb ram etc. So the most important thing is develop time and code flexibility.
So just compare develop time between Java VS Python.
I develop an Selenium based bot in Python for example in 2 hours, and in java it takes 5-6 hours, if I use OOP paradigm.
And java use an "idiot" virtual machine which eat your memory to shit. A python based requests bot eats about 5-15 mb, a java based about 50-100 mb.
Sure, Java great for EE softwares, bank softwares or high complexity systems.

Actually, on my own scale of "suckness" Java is somewhere near Python.
The idea was to show that even Java (which sucks) performs better than Python in terms of speed. :)

As to coding speed - get the right libraries and you can code fast in any language.
 
Dude, this isn't a 'my programming has a bigger dick' thread. OP specifically mentioned he is using Python.

OP, why don't use set up a VPS to run the code on, that way you don't need to worry about it impacting your primary workstation. Also PYAUTOGUI is super easy to use, can automate simple bot actions, and it can be made to be 100% un-detectable.
 
Dude, this isn't a 'my programming has a bigger dick' thread. OP specifically mentioned he is using Python.

OP, why don't use set up a VPS to run the code on, that way you don't need to worry about it impacting your primary workstation. Also PYAUTOGUI is super easy to use, can automate simple bot actions, and it can be made to be 100% un-detectable.

Sure, I just want to confim OP, that he made a right choice to make bots in python. Or he even could use robotframework which logs everything him, and check the logs for more information.
 
I think it could be fully automated with requests. Nearly all site could be automatised with it, i built many bots twitter, tumblr, xvideos xhamster, so probably facebook easily can be done

And can Facebook track if there are only http requests without the action of the human or selenium with browser?
I just looked a little into it now and there are companies which claim they can see if the browser is used with selenium. But on the other side, for example in Facebook they have also to test their own site with selenium. So they cant block all "selenium testers". In this big company, there are for sure thousands of selenium tests running at the same time. Or they have a complete own testing method.

So makes it from the tracking side a difference if you use http requests (without an open browser and real clicking) or selenium with an open browser and real clicking?
 
Its pretty hard to catch selenium bots and medium difficult to catch requests users. You can't really catch selenium users if users use sleep and real functions ( so not just add friend post in groups etc) its impossible to catch as selenium use real browser instance, but if you use requests you should configure it properly and should use sleep, and probably you won't be catched
 
programming threads are always fun in the IM world as all the hobby scripters there think they are elite programmers, because they know one scripting language, but using +10 browsers to multithread on a bloated GUI is not only clumsy and lame, its just plain inefficient + on top of it, insecure. only amateurs do that seriously, deal with it. (your only excuse would be: i wanted something fast and i dont care if its efficient, it should just work asap) also scripting languages will ALWAYS be slower as they need to run through the interpreter.
why insecure? because you run all the scripts on the remote website which could infect your computer. if you send direct GET/POST requests and only parse the data that is returned from a request, you don't execute it. there are also lib's to run javascript inside C# for example, so there is really no need to use a full browser. you can also automate mouse movement, so there is nothing that you couldn't do manually that a headless browser does. what do you think the browsers are written in? firefox, chrome, IE all done in C of course. the higher languages like python are mostly made with C (although the interpreter can also be written in other languages like java of course), your OS is made in C and Assembler. so what makes you think you need selenium to automate web2.0 stuff?
python got its place, but i agree the syntax is ugly and just for the record, POSIX C still and will always have the most pretty syntax, period. ;)

oh and for those asking if facebook can be automated without headless browsers like selenium: well of course, just check xrumer its already doing it since a while :p
 
Last edited:
programming threads are always fun in the IM world as all the hobby scripters there think they are elite programmers, because they know one scripting language, but using +10 browsers to multithread on a bloated GUI is not only clumsy and lame, its just plain inefficient + on top of it, insecure. only amateurs do that seriously, deal with it. (your only excuse would be: i wanted something fast and i dont care if its efficient, it should just work asap) also scripting languages will ALWAYS be slower as they need to run through the interpreter.
why insecure? because you run all the scripts on the remote website which could infect your computer. if you send direct GET/POST requests and only parse the data that is returned from a request, you don't execute it. there are also lib's to run javascript inside C# for example, so there is really no need to use a full browser. you can also automate mouse movement, so there is nothing that you couldn't do manually that a headless browser does. what do you think the browsers are written in? firefox, chrome, IE all done in C of course. the higher languages like python are mostly made with C (although the interpreter can also be written in other languages like java of course), your OS is made in C and Assembler. so what makes you think you need selenium to automate web2.0 stuff?
python got its place, but i agree the syntax is ugly and just for the record, POSIX C still and will always have the most pretty syntax, period. ;)

oh and for those asking if facebook can be automated without headless browsers like selenium: well of course, just check xrumer its already doing it since a while :p
Huh Sorry I didnt read all things in your post. But ok assembler and C is a great thing (I am learning as an electrical engineer so I know both pretty well) but some tools as xrumer anf etc cant automate many things that would you like to. Okay intrepetered languages are shit but like python have great libraries and yku could make great thing in it.
Altough Intel 8051 is the best :)
 
im not sure what you are refering to, but i'm saying that xrumer can automate facebook very well, it has a plugin for facebook, VK and some more to follow, like, comment and so on and on top of it, you also have internal captcha breaking OCR. just have a look first before you make assumptions and take them as facts :) -> http://www.botmasterlabs.net/socplugin/
 
lol @lancis has no idea what he's talking about.... Python is a great general purpose language, easy to learn and use, and fast enough for 99% of use cases, ESPECIALLY stuff like IM bots. Start-ups use it because of the huge community and flexibility of the language, not it's scientific libs lmao. In any case, whether you're using browser automation or http requests a simple bot is always going to be I/O bound waiting on responses from web servers. That being said, avoid browser automation/selenium whenever possible. Most of the time all it does is complicate things. Searching for elements on the page, waiting for them to be in a certain position, waiting for them to be clickable, bugs in selenium, etc. It sucks. I have yet to come across a site that couldn't be reverse engineered using requests only, be it Pinterest (pinterest was one of the easiest), facebook, amazon, etc. It's much faster and much more reliable. If you're just starting to learn programming then getting a grasp of selenium is fine for now, but if you're going to continue programming/making bots you'll definitely need to learn how to use the requests library. Use Fiddler to watch the requests your browser/phone makes when navigating around a site, and then play with the headers and cookies to strip the requests down to the bare minimum required to get a 200 response (most of the time it's as simple as just the user-agent header). Then use that information to re-create the request in your code using the requests library. Good luck.
 
Why would you choose Python for bots?

Python is used for scientific calculations, because there are a lot of free scientific libraries available.
This is the only advantage of Python in today's world. Otherwise it sucks in almost every aspect:

1. It is slower (sometimes much slower than alternatives)
2. It has an ugly, unreadable syntax
3. Creating native GUI is a pain in the ass, QT and alike look fugly on Windows

And the list goes on.

Your bots require scientific libraries? If not, there is no reason to choose Python.

once again my eyes bleed ...

1 - Premature optimization is the root of all evil -- DonaldKnuth

if you don't have the problem defined you CANT measure speed. Slow speed is usually caused by bad data structures or shitty code, not the language itself.
Like many other languages, python has implemented the most important things in C as well and created bindings.
Python threading can be a problem, but it really depends on what you are trying to achieve. like everything, it can be seen as good or bad.

2 - Seriously? ... the entire language was deloped with a focus on readability and simple syntax.

3 - Lol

and the list goes on.

I program in javascript, python, c++ and lately have started to use Go. and Python is usually my first choice for quick prototyping glue language( go has the same potential but still lacks 3rd party libraries).

the only problem I can see with Python is if you want to sell your code since is a interpreted language, you have to take measures to obfuscate/pack it or it will be reverted back to source code.
 
lol @lancis has no idea what he's talking about.... Python is a great general purpose language, easy to learn and use, and fast enough for 99% of use cases, ESPECIALLY stuff like IM bots. Start-ups use it because of the huge community and flexibility of the language, not it's scientific libs lmao.

I'm afraid huge community is not a big factor for start-ups. If not the license costs they would prefer Matlab - it is still easier to find engineers who know Matlab today.
Now when it comes to _free_ - Python algorithmic libraries have no alternatives. Support for Hadoop and other Big Data platforms is another reason to choose Python.

once again my eyes bleed ...

I program in javascript, python, c++ and lately have started to use Go. and Python is usually my first choice for quick prototyping glue language( go has the same potential but still lacks 3rd party libraries).

the only problem I can see with Python is if you want to sell your code since is a interpreted language, you have to take measures to obfuscate/pack it or it will be reverted back to source code.

How strange. My eyes bleed when I see Python code....

By the way I program in Assembly, C, C++, PHP, JS, Java, Matlab and Python.. so my e-dick is slightly bigger, mate. :)
My first choice for prototyping is language that fits best for the task ahead. Bots + Python is not the best choice out there.
 
Back
Top