DataKund - Automate Browsers without Selenium scripting
DataKund is a powerful Record & Play tool. It can be used for variety of purposes like web scraping, automation testing, making bots. Make robots to automate fairly complex tasks by simply recording your tasks in the browser.
Selenium vs DataKundBeautifulSoup vs DataKund
Getting Help
Having trouble? We’d like to help!
What it can do?
Automate Web Apps testing
- Automate Repetitive tasks eg.
- Scrape Websites eg.
Selenium vs DataKund
Difference Table
Features | Selenium | DataKund |
Coding experience | Required | Not Required |
Customer Support | Open-source Community | Dedicated support |
API Support | Cannot perform actions through apis | Can call apis |
Maintenance | Slight change in website can make the code fail | Don't fail with slight changes in website |
Inspection of Elements | Need to inspect elements to write code | It records itself |
Time | Takes time in writing code | Takes no time in making apis |
Dependencies | Depends on driver,selenium module and programming language | No programming language or driver needed |
Locators knowledge | Knowledge of locators such as id, class etc needed | No such knowledge needed |
Following are some of the other differences between Selenium and DataKund:-
Open Link
Action | Selenium | DataKund |
Open Link | driver.get("https://www.datakund.com") | Start recorder and open link |
Click
Action | Selenium | DataKund |
Open Link | element=driver.find_element_by_id("login") element.click() | Start recorder and click on button(wherever you want) |
Type or Send keys
Action | Selenium | DataKund |
Type text in input | element=driver.find_element_by_id("email") element.send_keys("datakund@datakund.in") | Start recorder and click on input and type |
New tab
Action | Selenium | DataKund |
Open New Tab | driver.execute_script("window.open('https://www.datakund.com');") | Just start recording and open new tab |
Switch tab
Action | Selenium | DataKund |
Switch to tab | WindowsHandles=driver.window_handles window =WindowsHandles[-1] driver.switch_to_window(window) | Just switch to tab after starting recording |
Re-Captchas
Action | Selenium | DataKund |
Solving Re-Captcha | You need to user external service e.g 2Captcha service to solve | Automatically detects and solves captcha |
Looping
Action | Selenium | DataKund |
Click on every search result | Find common things by inspecting then loop over them(attributes can change) | Apply repeat by Alt+P , then do your repeated action next |
Variables
Action | Selenium | DataKund |
Search different keywords | Will need a variable to change search value | Automatically detects variables and you need to just change values |
Google Sheets
Action | Selenium | DataKund |
Sending bulk messages on linkedin having their links in sheet | Will need to write both selenium as google apis code which takes time | Just make a simple api of sending message to one profile and attach google sheet to it |
Iframe
Action | Selenium | DataKund |
Click on button | iframe_element=driver.find_element_by_xpath("html/div/iframe") driver.switch_to_iframe(iframe_element) button=driver.find_element_by_id("log_in") button.click | Just click on button |
Flow Chart
Action | Selenium | DataKund |
Showing actions in flow chart | No way of representing flow of actions except manually writing | You can see your actions in flow charts, can edit and delete actions as well |
Multiple Language Support
Action | Selenium | DataKund |
Writing selenium code in nodejs | You will need to learn programming language to write selenium for other languages | Provides code section, just copy code of desired language from there and run |
BeautifulSoup vs DataKund
Features | BeautifulSoup | DataKund |
Coding experience | Required | Not Required |
Customer Support | Open-source Community | Dedicated support |
API Support | Cannot perform scrape through apis | Can call apis |
Maintenance | Slight change in website can make the code fail | Don't fail with slight changes in website |
Inspection of Elements | Need to inspect elements to write code | It records itself |
Time | Takes time in writing code | Takes no time in making apis |
Dependencies | Depends on bs4 module and programming language | No programming language or module needed |
Locators Knowledge | Knowledge of locators such as id, class etc needed | No such knowledge needed |
Structure | It's library | It's a complete framework |
Extensibility | Limited to scraping only | Can do scraping as well browser actions |
Consideration | Considered as parser | Considered as RPA tool |
Data Format | You need to write code to store in json xcel or spreadsheet | Can attach google sheet for you, then all your data will automatically be saved there |
Following are some of the other differences between BeautifulSoup and DataKund:-
Scrape Text
Action | BeautifulSoup | DataKund |
Scrape product title | title=soup.find("h4",{"id":"title"}).getText() | Right Click on title>DataKund>Scrape>Text>column name |
Scrape Link
Action | BeautifulSoup | DataKund |
Scrape product link | link=soup.find("a",{"id":"product_link"})["href"] | Right Click on product link>DataKund>Scrape>Link>column name |
Looping
Action | BeautifulSoup | DataKund |
Get every search result data | Find common things by inspecting then loop over them(attributes can change) | Apply repeat by Alt+P , then scrape data by right clicking on data points |
Google Sheets
Action | BeautifulSoup | DataKund |
Scraping product links defined in sheet | Will need to write both beautifulsoup and google apis code which takes time | Just make a simple api of scraping one product and attach google sheet to it |
Flow Chart
Action | BeautifulSoup | DataKund |
Showing actions in flow chart | No way of representing flow of actions except manually writing | You can see your actions in flow charts, can edit and delete actions as well |
Installation/Usage
Usage
Starting DataKund will require login to DataKund
After login, drivers will be installed & browser window will open up
Python
from bot_studio import *
datakund=bot_studio.new()
Browser Options
Option |
Default Value |
Description |
---|---|---|
headless |
False |
Can set it to True if wants headless |
proxy |
No proxy |
Pass proxy value e.g 98.0.2.5:4000 |
profile_path |
creates temporary profile |
Pass profile path e.g C:\Users\username\AppData\Local\Google\Chrome\User Data\ |
user_agent |
No user agent |
Pass user agent e.g python 2.7”, “platform”:”Windows |
download_folder |
Downloads in default folder |
If want to set download directory to custom e.g E:files\ |
NodeJs
var datakund=require("datakund");
Curl/HTTP
DataKund listens on port 5350
Learn DataKund
Basic
Following are the actions you can do through DataKund:-
Open Link
To open a link, make a new API.
Click on Record and open the link.
Go back to Run, and run API
Click
To click on a page, make a new API.
Click on Record and navigate to page where you want to click.
Click there, you can see click action recorded in charts
Go back to Run , and run API
New Tab
Make a new API.
Click on Record and open new tab.
Go back to Run , and run API
Scrape Text
Make a new API.
Click on Record and open Variables Section.
Create columns e.g product_title,product_price
Go back to Record
Right Click on product’s or whatever text you want to scrape from webpage,
After Right click, click on DataKund>Scrape>Text>column name(product_title)
Here you go, and run API
It will give you text scraped in response
Applications
Here are few tutorials of some applications you can create through DataKund:-
Pre-Built APIS by DataKund
DataKund provides some of pre built APIS which are used mostly. These are public APIS, you can use these if don’t want to make your own.
Amazon APIs
Following are some of Amazon APIs:-
Twitter APIs
Following are some of Twitter APIs:-
Google APIs
Following are some of Google APIs:-
Scraper APIs
Basic APIS
You can use basic apis which selenium provides with this tool like opening a url, get pagesource, get current url etc. These are the functions:-
Open
It will open the url provided in the parameters.
dk_object.open(url)
datakund.open(url)
curl -X POST http://127.0.0.1:5000/open -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{"url":"https://www.google.com"}'
Get Page Title
It returns the title of page opened.
response=dk_object.get_page_title()
response=datakund.get_page_title()
curl -X POST http://127.0.0.1:5000/get_page_title -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'
{
"pagetitle":"amazon"
}
Get Page Source
It returns the pagesource of page opened.
response=dk_object.get_page_source()
response=datakund.get_page_source()
curl -X POST http://127.0.0.1:5000/get_page_source -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'
{
"pagesource":"<html><body>....."
}
Get Current Url
It returns the url of page opened.
response=dk_object.get_current_url()
response=datakund.get_current_url()
curl -X POST http://127.0.0.1:5000/get_current_url -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'
{
"url":"https://www.amazon.com"
}
Reload
It reloads the page opened.
dk_object.reload()
datakund.reload()
curl -X POST http://127.0.0.1:5000/reload -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'
Keypress
It perform the keypress passed.
dk_object.keypress("shoes")
datakund.keypress("shoes")
curl -X POST http://127.0.0.1:5000/keypress -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{"key":"shoes"}'
Scroll
It scrolls to the end of page.
dk_object.scroll()
datakund.scroll()
curl -X POST http://127.0.0.1:5000/scroll -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'
End
It ends the session and close the automated chromedriver.
Note
You will need to create dk object again after end()
.
dk_object.end()
datakund.end()
curl -X POST http://127.0.0.1:5000/end -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'
Quit
It quits the datakund application runing in background.
Note
You will need to import datakund library again to start datakund application.
dk_object.quit()
datakund.quit()
curl -X POST http://127.0.0.1:5000/quit -H 'cache-control: no-cache' -H 'content-type: application/json' -d '{}'