As you probably know, GSA SER is not designed to handle JavaScript. So, practically, it’s not possible to create backlinks inside websites that use JavaScript. GSA SER List web 2.0 addon brings the possibility of creating such backlinks on platforms that were not possible within SER. Our web 2.0 addon comes with popular engines and is expanded gradually. However, you are also able to create your own GSA SER engines using our addon. Here, we will teach you how to interact with our addon in your engine code.
To enter advanced debug mode and view the Chrome window and SERlib’s real-time actions, follow these steps:
1. Open the Windows terminal.
2. Navigate to the GSA Search Engine Ranker installation folder.
3. Run the .exe file with the -debug flag as shown below:
In addition to SERlib’s debug mode, make sure to activate GSA SER’s built-in debug mode while developing your engines. You can do this by going to the global options, navigating to the Advanced tab, and enabling the ‘Run in debug mode’ option.
Below are the variables that can be used inside the [setup] section of your engine’s code:
1. Activate SERlib
serlib=1
This will instruct SER to use SERlib. You should add this when using our addon.
2. Activate loading images
load images=1
SERlib won’t load images by default. You don’t need to load images in your engine’s code unless there’s an image captcha available.
3. Activate Cross-Origin (CORS)
enable cors=1
Use this when the engine needs to read inside an iframe that is not accessible via simple CSS selectors because the iframe URL is not the same as the page URL.
To deactivate any of the above variables, just remove them from your [SETUP], or you may set them to zero like load images=0
This is an example [setup] section that you are able to use in your engine:
[setup] enabled=1 fixed url=https://gsaserlists.com/ url must have=https://gsaserlists.com/ dofollow=1 description=Creates a blog entry ;extract from email=activate_url serlib=1 ;load images=1 engine type=[GSASERLists] Web 2.0 uses pages=0 anchor text=1 skip url content on=0 skip content on=0 skip ext links on=0 skip nofollow links on=0 skip pr on=0 extract keywords=0 extract urls=0 posted domain check=1 default checked=0
Below are the commands that can be used inside the [REGISTER_STEP1], [FIRSTLOGIN_STEP1], [STEP1], and so on (like [STEP2]) sections of your engine’s code:
1. Navigate to a URL
open_url(URL)
This will open a Chrome browser in the background and navigate to the given URL.
example: open_url(https://gsaserlists.com)
2. Find a link by its anchor text and click on it
click_link_by_linktext(Anchor text)
SERlib will search for the given anchor text on the current page and attempt to find and click on that anchor text. This should be an <a> tag, or it won’t work.
example: click_link_by_linktext(GSA SER Lists)
3. Find a link by its URL or partial URL match and click on it
click_link_by_url(URL)
This will search for the given URL on the current page and click on its element if it’s available.
example: click_link_by_url(https://gsaserlists.com/changelog)
4. Find an element by its CSS selector and click on it
click_element(CSS selector)
This will search for the given CSS selector on the current page and click on it if it’s available. Any CSS selector usage is accepted here.
example: click_element(#accept-choices)
5. Mouse actions
mouse_action(Action, CSS selector)
List of available actions:
- 0: Move the mouse pointer to the element. This is useful for hovering over an element
- 1: This is similar to the
click_element()
function, but the click is triggered using JavaScript - 2: Double-click on the element
- 3: Right-click on the element
- 4: The same as
click_element()
without moving to the element - 5: This allows you to click on an element inside an iframe. CSS selector format: iframe CSS selector+element CSS selector
- 6: This allows you to send keyboard hotkeys, such as Ctrl+A. CSS selector format: CSS selector+the key being sent with ctrl
- 7: send Delete key to Chrome
A few examples:
mouse_action(0,#pages > li:nth-child(2))
mouse_action(1,[href="/register"])
mouse_action(6,[name="blogname"]+a)
6. Type into a field using its CSS selector
type_into_field_selector(CSS selector, Text, Clear)
This will insert the Text value into the field with the corresponding CSS selector. Additionally, if Clear is set to 1, it will clear the field data first.
example: type_into_field_selector(#userid,%login%,0)
7. Type into popular rich text editors using their CSS selector
type_into_field(CSS selector, Text, Type, Clear)
List of available types:
- tinymce-pure: The CSS selector should be the main div selector containing the iframe
- tinymce-html: The CSS selector doesn’t matter. Write whatever, but don’t leave it empty
- ckeditor-pure: The CSS selector should be the main div selector containing the iframe
- ckeditor-html: The CSS selector should be the CKEditor ID
- quill: The CSS selector should be the main div selector containing the iframe
- custom: The CSS selector should have this structure-> Iframe CSS selector+CSS selector of the item inside the iframe
- textarea: Writes into the textarea with the specified CSS selector
This will insert the Text value into the field. If Clear is set to 1, it will clear the field data first.
A few examples:
type_into_field(.load+[aria-label="title"],<char>%Article_Title%</char>,custom,0)
type_into_field(#cke_editor,<char>%Article%</char>,ckeditor-html,1)
type_into_field(#mceu_20,<char>%Article%</char>,tinymce-pure,0)
type_into_field(#whatever,<char>%Article%</char>,tinymce-html,0)
8. Find a dropdown list and select the first item from the list
select_dropdown(CSS selector)
This command will locate a dropdown by its CSS selector and automatically select the first item.
example: select_dropdown(#masterID)
9. Find a dropdown list and select the item at the specified index
select_dropdown_index(CSS selector, Index)
This command will find a dropdown by its CSS selector and select the item at the specified index. The index value starts from zero and goes up to the number of items in the list.
example: select_dropdown_index(#masterID, 0)
In the example provided, SERlib will select the first item from the dropdown list.
10. Insert a file
file_input(CSS selector, Path)
This will find a file input element by its CSS selector and insert the specified file into it.
example: file_input(#avatar,%Profile_Image%)
11. Execute JavaScript, with Macro support
execute_javascript(Base64 encoded JS)
This command will execute your JavaScript code. Note that your JS code should be base64 encoded, and GSA SER macros can be used in this command.
example: execute_javascript(ZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3VzZXJuYW1lJykudmFsdWUgPSAlbG9naW4l)
12. Execute JavaScript
execute_javascript_pure(Base64 encoded JS)
This command will execute your JavaScript code. It’s essentially the same as execute_javascript()
, but you cannot use GSA SER macros in this command. Use this command instead of execute_javascript()
if you are not passing any GSA SER macros.
13. Wait for a CSS selector to become present on the webpage
wait_for_css_selector(CSS selector)
This command will make SERlib wait until the CSS selector is present on the webpage before proceeding to the next step. If the selector is not found within a certain time frame, which is 30 seconds, the command will time out, and SERlib won’t continue with the remaining commands.
example: wait_for_css_selector(li>.GSAbutton)
14. Wait for a text to become present on the webpage
wait_for_text(Text)
This command will make SERlib wait until the text is present on the webpage before proceeding to the next step. If the text is not found within a certain time frame, which is 30 seconds, the command will time out, and SERlib won’t continue with the remaining commands.
example: wait_for_text(GSA SER Lists official website)
15. Wait for a specified amount of time
wait_time(Seconds)
This command will make SERlib wait for the specified number of seconds before continuing with the rest of the commands.
example: wait_time(10)
16. Solve image captcha
solve_image_captcha(CSS selector, Image type)
This command is used to find an image captcha by its CSS selector and send it to GSA SER’s captcha solver services. The image type should be set based on the type of captcha you’re trying to send, which is usually either png or jpg.
The result of the captcha returned by your captcha solver can be accessed using the %captcha% macro.
example:
solve_image_captcha(#captchaimg, jpg)
type_into_field_selector(.captchaimg-answer,%captcha%,0)
17. Solve reCAPTCHA
solve_recaptcha()
This command is used to locate the necessary data of the reCAPTCHA present on the current page and send it to GSA SER’s reCAPTCHA solver service. This command works if only one type of reCAPTCHA is available on the current page.
The result of the reCAPTCHA returned by your reCAPTCHA solver can be accessed using the %recaptcha% macro. Additionally, the %recaptcha-action% and %recaptcha-callback% macros are available and should be used when you are trying to insert the reCAPTCHA result into the current page.
example:
solve_recaptcha()
insert_recaptcha(%recaptcha-action%,%recaptcha%,%recaptcha-callback%,)
18. Solve reCAPTCHA specific version
solve_recaptcha_version(Version)
This command is used to locate the necessary data of the reCAPTCHA present on the current page and send it to GSA SER’s reCAPTCHA solver service. This command is useful when there are more than one reCAPTCHA available on one page, and they should have different types, like one reCAPTCHA version 2 and one version 3. The value for the Version could be v2 or v3.
The result of the reCAPTCHA returned by your reCAPTCHA solver can be accessed using the %recaptcha% macro. Additionally, the %recaptcha-action% and %recaptcha-callback% macros are available and should be used when you are trying to insert the reCAPTCHA result into the current page.
example:
solve_recaptcha_version(v2)
insert_recaptcha(%recaptcha-action%,%recaptcha%,%recaptcha-callback%,)
19. Insert reCAPTCHA result
insert_recaptcha(Recaptcha_v2, Recaptcha_result, Callback, g_recaptcha_response_id)
This command is used to insert the reCAPTCHA answer returned by GSA SER’s reCAPTCHA solver service. Each argument is explained below:
- Recaptcha_v2: Defines if reCAPTCHA is V2 or V3. If an empty string is sent, it means that it’s V2. Any other string sent will be considered as V3. The best practice is to use the %recaptcha-action% macro here.
- Recaptcha_result: Recaptcha string answer returned by GSA SER’s reCAPTCHA solver service. You should use %recaptcha% macro here.
- Callback: Some Recaptchas require a data_callback for submission. In such cases, you need to provide the callback name. The best practice is to use the %recaptcha-callback% macro here. The default value is an empty string (“”).
- g_recaptcha_response_id: The Recaptcha result should be inserted inside a textarea with the id “g-recaptcha-response” or “g-recaptcha-response-100000”. However, if the id is something else, you need to specify it as well. The default value is an empty string (“”).
In most cases, you just need to use the following command to insert the reCAPTCHA answer:
insert_recaptcha(%recaptcha-action%,%recaptcha%,%recaptcha-callback%,)
20. Solve HCAPTCHA
solve_hcaptcha()
This command is used to locate the necessary data of the HCAPTCHA present on the current page and send it to GSA SER’s HCAPTCHA solver service. This command works if only HCAPTCHA is available on the current page.
The result of the HCAPTCHA returned by your HCAPTCHA solver can be accessed using the %hcaptcha% macro.
example:
solve_hcaptcha()
21. Insert HCAPTCHA result
insert_hcaptcha(hcaptcha_result)
This command is used to insert the HCAPTCHA answer returned by GSA SER’s HCAPTCHA solver service.
- hcaptcha_result: Hcaptcha string answer returned by GSA SER’s HCAPTCHA solver service. You should use %hcaptcha% macro here.
You always need to use the following commands to solve and insert the HCAPTCHA answer:
solve_hcaptcha()
insert_hcaptcha(%hcaptcha%)
22. Solve CloudFlare Turnstile CAPTCHA (not yet supported by GSA SER)
solve_cfcaptcha()
This command is used to locate the necessary data of the CF Turnstile captcha present on the current page(standalone captcha widget) and send it to GSA SER’s supported CF Turnstile captcha solver service. This command works if only CF Turnstile captcha is available on the current page.
The result of the CF Turnstile captcha returned by your captcha solver can be accessed using the %cfcaptcha% macro.
example:
solve_cfcaptcha()
23. Insert CloudFlare Turnstile CAPTCHA result (not yet supported by GSA SER)
insert_cfcaptcha(cfcaptcha_result)
This command is used to insert the CF Turnstile captcha answer returned by GSA SER’s supported CF Turnstile captcha solver service.
- cfcaptcha_result: CF Turnstile captcha string answer returned by GSA SER’s supported CF Turnstile captcha solver service. You should use %cfcaptcha% macro here.
You always need to use the following commands to solve and insert the CF Turnstile answer:
solve_cfcaptcha()
insert_cfcaptcha(%cfcaptcha%)
In this section, you can find some important notes:
1. All commands can have an optional optional
as their last argument, and SER will ignore the command if the command was not successful.
example: type_into_field_selector(CSS selector, text, 0, optional)
2. There should be a wait_for_text
or wait_for_css_selector
command at the end of each step. These commands should have an optional argument if you have set submit success, failed, or failed retry values in that step.
3. If you are using %Article%
inside execute_javascript()
, make sure to escape all its single quotes. To do this, add the following to the [Article]
block:
html to custom link format=1 custom link format=<a href="%url%">%Anchor_Text%</a>
If you are not using allow html=1
in your [Article]’s block and want to use the %Article%
macro inside execute_javascript()
, make sure to use `%Article%`
instead of '%Article%'
.
4. To prevent code breaks when using %Article_Title%
and %Article%
macros with commas inside them, always wrap these macros with <char></char>
tags. This is especially important when these macros are used outside of the execute_javascript()
function. If you are using them within execute_javascript()
, you don’t need to use these tags.
example: type_into_field_selector(.title,<char>%Article_Title%</char>,0)
5. You can retrieve the current URL of the page by using the %targeturl%
macro
6. Writing into a textarea is a straightforward process.
type_into_field(CSS selector, Text, textarea, 1)
[REGISTER_STEP1] submit success=inurl:?mode=registration_success submit failed=Por favor, póngase en contacto con el soporte!|Ya está registrado! submit failed retry=tu ne peux pas t'inscrire 2x avec la même adresse e-mail open_url(https://gsaserlists.com) click_element([aria-label="allow cookies"],optional) type_into_field_selector(#email,%my_random_email%,0) type_into_field_selector([name="password"],%password%,0) click_element(#inputTos) solve_recaptcha() insert_recaptcha(%recaptcha-action%,%recaptcha%,%recaptcha-callback%,) click_element(#step1 > button) wait_for_text(?mode=registration_success,optional) [FIRSTLOGIN_STEP1] open_url(https://gsaserlists.com/design) ;A popup may open and ask whether the email address is still up to date, ;'Ist deine E-Mail-Adresse noch aktuell?' This should be optional click_element(#showPremiumInformationModalView .modal-footer>button,optional) mouse_action(1,a[onclick="$('#modalView_slider').modal('show');"],optional) ;set slide show to "off" click_element(#commonSetting_slider0activated_no,optional) wait_time(1) click_element(#commonSetting_slider1activated_no,optional) ;click on "Guardar" to save the changes click_element(button.btn.btn-orange,optional) wait_for_text(Los cambios han sido guardados!,optional) [LOGIN_STEP1] submit success=>Cierre de sesión< submit failed=La contraseña o el nombre del usuario es erróneo open_url(https://gsaserlists.com/login) click_element([aria-label="allow cookies"],optional) type_into_field_selector(.user,%my_random_email%,0) type_into_field_selector(.pwd,%password%,0) click_element(button[type="submit"]) wait_for_text(>Cierre de sesión<,optional) [STEP1] submit success=ha sido añadida con éxito submit failed=<div id="editpage_subpage_limit" style=""> verify submission=1 verify interval=1 verify timeout=30 first verify=0 verify by=url verify url=%extract_published_url% verify search for=%Article_Title% open_url(https://gsaserlists.com/edit) click_element(#editPage_navigation_wrapper > div > a) type_into_field_selector(#editpage_edit_main_titel,<char>%Article_Title%</char>,1) ;var outerIframe = document.querySelector('iframe#html___Frame'); ;if(outerIframe) outerIframe.contentDocument.getElementById('xEditingArea'). ;getElementsByTagName('iframe')[0].contentDocument.body.innerHTML = `%Article%`; execute_javascript(dmFyIG91dGVySWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignaWZyYW1lI 2h0bWxfX19GcmFtZScpO2lmKG91dGVySWZyYW1lKSBvdXRlcklmcmFtZS5jb250ZW50RG9jdW1lbnQuZ2V0 RWxlbWVudEJ5SWQoJ3hFZGl0aW5nQXJlYScpLmdldEVsZW1lbnRzQnlUYWdOYW1lKCdpZnJhbWUnKVswXS5 jb250ZW50RG9jdW1lbnQuYm9keS5pbm5lckhUTUwgID0gYCVBcnRpY2xlJWA7) click_element(#editor_content > td > a) wait_for_text(ha sido añadida con éxito,optional)