FULL CODE & MORE LIKE THIS: http://blog.breakthru.solutions/auto-...
TWITTER: / thepowerslacker
Nightmare.js: http://www.nightmarejs.org/
Artoo.js: https://medialab.github.io/artoo/
Whatsup youtube
In this video series I’m gonna to teach you how to build a simple web bot that posts ads to craigslist
The point of this series is to teach you the basics of writing web bots with nightmare js so that you can take these ideas and apply them to any website
You should be familiar with javascript, css, and node js before starting this tutorial.
We will be using some advanced javascript in this series. If you’re still a javascript noob thats ok - I’ll cover the basic concepts and usage of everything I show you
Remember to share these videos because if you dont...the kitty gets it!
Seriously you guys the more views these videos get the more time I can justify spending making new content and tutorials for you
With that being said lets gets started
In my last nightmare js video I told you that researching your target is important. For a web bot the research and planning is even more important.
A web bot is just a computer that does web browsing for you.
But you,as a human are smart.
Computers are dumb. They might seem smart but, the reality is they just do dumb things very fast.
That means that if a button or link moves on a page the computer is gonna say
wtf? Give up on life and crash the program you've been working so hard on.
There are two solutions to this problem
Option 1: jack daniels and a handgun
Option 2: do some research and plan your web bot carefully
Since you're watching a free youtube video and can barely afford jack daniels let alone a handgun
Let's go with option two.
What you need to do is go through the website you are botting and manually perform the process you want to accomplish
Type out each step you take as a comment, making sure to grab the element selector any time you take an action on a page - whether that's typing into a form, clicking a button, or trying to grab some data
You can see me here going through craigslist and working out the steps to post an ad in the computer services section. I grab the elements for each step I take using chrome dev tools.
Sometimes elements don’t have an obvious selector. You’ll need to use css to come up with a way to access that element. The time to find out if you’ve got the right selector isn't during development its now in the research phase. Trying to debug your bot and find where you went wrong takes 10x as long as getting the selector right in the first place.
I use artoo js to test and verify selectors.
Setting up artoo is easy - just head over the artoo website (the link is in the video description)
Add artoo to your bookmarks and now whenever you want to test a selector just click artoo
Open up chrome dev tools and you can use the console to test your selector. If you got it right artoo will highlight the element on the page when you hover over it in the dev tools
Watch video Make a WEB BOT! || Auto Post to Craigslist || Planning the Nightmare.js Script online without registration, duration hours minute second in high quality. This video was added by user Powerslacker 03 November 2016, don't forget to share it with your friends and acquaintances, it has been viewed on our site 9,508 once and liked it 100 people.