Which language to learn to make web bots?

ankit03

BANNED
Joined
Apr 3, 2016
Messages
2,737
Reaction score
277
Hello.
I want to make bots like Zennoposter and ubot.
Which language will be suitable for me to learn?
My English is weak and I am from india. So hindi language will be easy for me to catch.Does there any tutorial of such in hindi language?
If you tell me where i can get hindi tutorials i will be happy and thankful.
 
FYI, Zennoposter and ubot are not bots but the software to build the bots. If you'd like to build a similar software, you should be looking at learning .NET and C#.
 
NodeJS. You can use CasperJS or Phantom to create bots that require a browser, or Request and Cheerio if your bots don't require a browser.

Python can also do it too.

It's useful to create scripts instead of GUI programs. Why? Because you can put them on cheap servers and have them running on schedules or cronjobs.
 
I use PHP for everything and it works for everything.
 
Bots are mAINLY written in C/C# or Python and Perl as they dig within web resources exploring the DOM of the pages and the robots.txt files.
 
+1 on Nodejs.

Python, PHP are sychronous languages with an easier initial learning curve but with them it's harder (not hard, but harder, relatively speaking) to implement parallel threads for scraping. I've been working with nodeJS for a while and didn't even realize this would be an issue until I tried my hands on python for something.

To explain what I mean in a synchronous language you can write something like below. It's easy to wrap your head around and it'll work:
Code:
# Python
body = getPage(url) # line 1
content = extractContent(body) # line 2

In any sane programming language line 2 executes only after line 1 has finished executing, but the meaning of a line finishing execution is different in a sychronous (PHP, Python) and an asyschronous (Javascript) language.
- sync language: IO (Input/Output) request (in this case requesting the page) has finished and received the response
- asyc language: IO request has been sent. To process it's response you have to attach a callback (it sounds complicated but a callback is just another function).

In Javascript, you might perhaps do something like this
Code:
// JS
getPage(url).then(extractContent).then(function(response) {
  content = response;
});

What does this mean with regards to parallel scraping? You can have a single script that manages parallel scraping with rate limits using inbuilt functions. I don't see how you'd do this with a sync language without opening new processes from the script which is a tad more complicated. Of course, you can do things in a async way using sync languages and vice versa but things are easier when you understand and follow the natural patterns of the language you're using.

Now I'm not trying to diss anyone's favourite language. Most programming languages have their uses, but there's a major benefit in learning NodeJS. You'll be coding in Javascript which is and will be for years to come, the only language widely supported by browsers (yes, yes web assembly is coming soon but let's stick to the basics for the new guy, shall we?).

As for tutorials, just pick one from youtube: https://www.youtube.com/results?search_query=nodejs+hindi.
The tutorials only serve to get your feet wet. To really learn programming you gotta start coding yourself (The old fart Al Klein would argue it's the other way around. Obviously he knows far more than me but unless you want spend a few years doing a full CS graduation course, do what I did. Start coding.). No way around it. You already have a project in mind, just watch some tutorials and start working on your project as soon as you feel a little confident. You'll learn more by doing than watching.

And send me PM if you get stuck with something. I'm in the same boat as you, only started earlier, but always happy help fellow coders.
 
Last edited:
Back
Top