in Crash Course

Script To Automate Browsing Actions Using Lynx

There are times when one needs to automate some of the mundate tasks associated with browsing a certain Web page or accomplishing a certain interactive task online. If the task is repetitive, then there has to be a way to automate it using a computer! Browser tasks are no exception. In this brief guide I’m going to show you how to automate some browsing actions on a website called http://www.vpslux.com. More specifically, I’m going to show you how to automate browsing a page called “explained.” Keep in mind that the action could be anything from authenticating to uploading a file!

Lynx is a text browser that runs from the command line, which is also known as “shell.” It runs on most operating systems notably Linux. It comes with a valuable feature that will help us automate actions that are normally performed interactively via a browser (Ex: Firefox, Safari, or Internet Explorer). The two most important features in our case are command logging and command scripting. Per the manual of Lynx:

-cmd_log=FILENAME
write keystroke commands and related information to the specified file.

-cmd_script=FILENAME
read keystroke commands from the specified file.  You can use the data written using the  -cmd_log  option.

Let’s record our actions by browsing http://www.vpslux.com using Lynx. From the command line or shell, launch Lynx with the following arguments and flags:

lynx -cmd_log=/tmp/www.vpslux.com http://www.vpslux.com

The above command will not only take me to the Website in question but also record every keystroke and action I perform and save it inside the file /tmp/www.vpslux.com. It is so simple and so powerful at the same time. Once I’m done with navigating to page “explained” by clicking on the “VPS Explained” located at the top of the first page (http://www.vpslux.com/?page=explained), I hit the letter ‘q’ on my keyboard to exit from Lynx. Inspect the file /tmp/www.vpslux.com to make sure all actions have been recorded. You should see something similar to this depending on the actions you have performed (I cut down quite a bit to keep it short):

# Command logfile created by Lynx 2.8.6rel.4 (15 Nov 2006)
# Arg0 = lynx
# Arg1 = -cmd_log=/tmp/vpslux.com
# Arg2 = http://vpslux.com
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key ^J
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow
key Down Arrow

The hard part is done! All we need to do now is create a small script that will use our www.vpslux.com file as the source or script. You could create a small Bash script called browseWeb.sh with the following content:

#!/bin/bash

lynx -cmd_script=/tmp/www.vpslux.com http://www.vpslux.com/

An extra step would to create a crontab entry to run the above script say every Monday morning at 4am:

crontab -e

0 4 * * 1 /home/user/browseWeb.sh

That’s all folks. I hope this is useful.

Write a Comment

Comment

Comment moderation is enabled. Your comment may take some time to appear.

Webmentions

  • friendship day images
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Happy Valentine Day

    [… ]very handful of internet sites that will transpire to get thorough beneath, via each of our viewpoint are definitely properly really worth checking out out[… ]…

  • SEO Tips 2016
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Title

    [… ]very several sites in which get lucky and come to be detailed below, from our viewpoint are definitely adequately worthy of examining out[… ]…

  • White Hat SEO
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Title

    [… ]please investigate internet sites we adhere to, similar to this one, since it symbolizes the choices inside web[… ]…

  • Vikram SEO
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Title

    [… ]very few sites of which take place to become comprehensive under, from our own mindset are generally unquestionably perfectly value checking out out[… ]…

  • http://www.beder-traedrejeri.dk/export.php?Billige-FodboldtrC3B8jer/FodboldtrC3B8jer-Klubhold/FodboldtrC3B8jer-Klubhold-AC-milan
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    http://www.beder-traedrejeri.dk/export.php?Billige-Fodboldtr%25C3%25B8jer/Fodboldtr%25C3%25B8jer-Klubhold/Fodboldtr%25C3%25B8jer-Klubhold-AC-milan

    ARTICLES BYinda however is flattered by the gift, and puts it on anyway. Pete also has a best friend named Al Yion of studio practice. Projects look to test your critical and creative capabilities, together withs has changed from the functional clothes…

  • http://www.nativeprince.com/wp-feed.php?Rugtas-NAC-Breda
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    http://www.nativeprince.com/wp-feed.php?Rugtas-NAC-Breda

    Now used mainly as a museum, it was a royal residence in the Middle Ages. You can see the Crocapabilities have been transferred to the United Kingdom and have recorded positive outcomes so far.nating the names. And so Rich’s in Atlanta, we hyphenated…

  • http://www.papirmadar.hu/beats4.htm
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    http://www.papirmadar.hu/beats4.htm

    eight

  • ray ban outlet reviews
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    ray ban outlet reviews

    why

  • michael kors cheap cheap purses
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    michael kors cheap cheap purses

    this phenomenal shoes or boots has components of both slippers plus hunter boots that will make them ideal many circumstances.

  • Cheap NFL Jerseys
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Cheap NFL Jerseys

    :, very best Moda automotive 2 Pu wash rag the middle of leg heavy Boots2.

  • Burberry Outlet
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Burberry Outlet

    when we continue to grow and grow the actual internet marketing business almost, I believe it is necessary to have someone accept the duty from overseeing a person’s world wide companies on the each and every day time, and i am confident Zohar is the…

  • Cheap NFL Jerseys
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Cheap NFL Jerseys

    but you don’t they are most common presently is due to enhanced comfort and trendy plead.

  • designer nike air max 24 7 mens white trainers early bird specials
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    designer nike air max 24 7 mens white trainers early bird specials

    babyliss Report Networks Acquire Posts Instantaneously

  • cheaper nike patriots #87 rob gronkowski navy blue team color mens stitched nfl elite jersey treat yourself to a great holiday
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    cheaper nike patriots #87 rob gronkowski navy blue team color mens stitched nfl elite jersey treat yourself to a great holiday

    This Advanced babyliss software Performs While You Take a nap!

  • Your Cash Generating Strategy
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Check this out…

    […]usually posts some worth it to read stuff like this. If you’re a new comer to this site[…]…

  • Your Money Making Online System
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Really Cool Sites…

    […]we came across a cool site that you might enjoy. Take a look if you want[…]…

  • Article Marketing Money Maker
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    You Should Check This out…

    […]the link to one of the sites that we think you need to visit[…]…

  • taiyangyang
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    1

    Have a fantastic day!I’m very glad when see your post.I quite approve of your point of view.I will continue to following on your blog.I confirm that the future I will see more about your ingenious views.

  • jacketrq50
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    1

    Have a excellent day!I’m very glad when see your post.I quite endorse your views on politics.I will continue to following on your blog.I sure that the future I will see more about your ingenious views.

  • jacketvl20
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    6

    A work of a harvest,exactly because of your hard writing, we can feel so much felicity, learn more our own understanding of their. The world could be so splendid.

  • ltcblog17
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3

    A splendid article will widen one’s horizon because the article is true, make us move and laugh. When I catched sight of this article, I believe I can gains these.

  • bdkblog09
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    5

    This article is really good, people do not consciously into the author’s writing situations. I want to introduce it to more people, so the more the body will be such a splendid feeling.

  • xiaoling
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    6

    A work of a harvest,truly because of your difficult writing, we can feel so much felicity, learn more our own understanding of their. The world could be so beautiful.

  • fashionboyb
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10

    I would like to comprehend when you write this article is what kind of mood, why would you write this article, also written so splendid, is that I can emulate. I think I could record something like you.

  • myblogwh1
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    1

    Have a good day!I’m very glad when see your post.I quite agree with your standpoint.I will continue to focus on your blog.I affirm that the future I will see more about your splendidness views.

  • jacketrq30
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10

    I would like to comprehend when you write this article is what kind of mood, why would you write this article, also written so good, is that I can study. I think I could record something like you.

  • hotblogbi4
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3

    A good article will make people horizons broadened mood because the article is true, make us touching and laugh. When I saw this article, I believe I can harvest these.

  • umomyblog88
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    7

    Your article is here, the feeling of a mere individual can gains more.Let these people from every corner of the world, even in the heart with empathy. We are not desolateness.

  • asdzxcvbn
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    4

    If you believeI do not care to catch sight of this article, the next time I am paid more attention to about your article, I think I will never again careless. Do you trust yourself, you do not know your article can make people so infatuated with.

  • 8mashengi8t
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    9

    This article is really great, a friend gave me a look. I set eyes on, I would like to express the feelings I saw. Others did not feel that I do not mind, at least now I convey myself.

  • kingmaxlnlv
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    8

    I appreciate your article.Your article is like a big tree, so that we can be seated in your tree, feel yourself a real. I feel very touched, very happiness.

  • kingmaxiqpv
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    4

    If you sayI do not care to see this article, the next time I am concerned about your article, I think I will never again careless. Do you believe in yourself, you do not know your article can make people so obsessed with.

  • rpbmyblog75
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10

    I would like to understand when you write this article is what kind of mood, why would you write this article, also written so dulcet, is that I can emulate. I think I could record something like you.

  • makeshf51
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    2

    This article made me become shiny. After doing some reading of this article, I learned a lot. I will follow your blog. I hope everyone like me heregains happy, reap moved.

  • myblogoj3
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    8

    I love your article.Your article is like a big tree, so that we can be seated in your tree, feel yourself a real. I feel very touched, very blessedness.

  • kingmaxyipy
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    2…

    This article made me effulge. After reading this article, I impressed a lot. I will focus on your blog. I hope everyone like me hereharvest happy, harvest moved….

  • qxiblog53
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10…

    I would like to understand when you write this article is what kind of mood, why would you write this article, also written so dulcet, is that I can learn. I think I could record something like you….

  • idkmyblog06
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    5…

    This article is really wally, people do not be apprehensive of the author’s writing situations. I want to present it to more people, so the more the body will be such a splendid feeling….

  • ajcmyblog63
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    2…

    This article made me effulge. After reading this article, I impressed a lot. I will pay more attention to your blog. I hope everyone like me heregains happy, harvest moved….

  • masterkcs
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    6…

    A work of a harvest,precisely because of your troublesome writing, we can feel so much happiness, learn more our own understanding of their. The world could be so great….

  • mashengg
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    1…

    Have a great day!I’m very pleased when see your post.I quite approve of your opinion on public affairs.I will continue to notice on your blog.I affirm that the future I will see more about your wonderful views….

  • 1mashengb0h
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    9…

    This article is really good, a friend gave me a look. I catched sight of, I would like to express the feelings I looked. Others did not feel that I do not mind, at least now I deliver myself….

  • mcbblog15
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3…

    A wonderful article will broaden one’s horizon because the article is true, make us move and laugh. When I set eyes on this article, I deem I can gains these….

  • kingmaxrnnm
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    5…

    This article is really wally, people do not consciously into the author’s writing situations. I want to present it to more people, so the more the body will be such a dulcet feeling….

  • xiaoling
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    4…

    If you sayI do not care to catch sight of this article, the next time I am concerned about your article, I think I will never again careless. Do you believe in yourself, you do not know your article can make people so obsessed with….

  • taiyangyang
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3…

    A great article will broaden one’s horizon because the article is true, make us electronicy and laugh. When I set eyes on this article, I believe I can gains these….

  • mxcmyblog04
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    6…

    A work of a harvest,truly because of your hard writing, we can feel so much weal, learn more our own understanding of their. The world could be so okay….

  • cokblogbc0
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    2…

    This article made me feel shines. After reading this article, I psychopedagogy a lot. I will follow your blog. I hope everyone like me hereharvest happy, gains moved….

  • fmzblog66
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10…

    I would like to realize when you write this article is what kind of mood, why would you write this article, also written so great, is that I can study. I think I could record something like you….

  • jackethu93
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    6…

    A work of a harvest,precisely because of your difficult writing, we can feel so much felicity, learn more our own understanding of their. The world could be so okay….

  • fas5lhion
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    7…

    Your article is here, the feeling of a mere individual can harvest more.Let these people from all over the world, even in the heart with happiness. We are not solitude….

  • wkublog11
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3…

    A great article will make people horizons broadened mood because the article is true, make us electronicy and laugh. When I saw this article, I deem I can gains these….

  • jacketog4
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3…

    A okay article will widen one’s horizon because the article is true, make us move and laugh. When I catched sight of this article, I think I can gains these….

  • salefashion
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10…

    I would like to understand when you write this article is what kind of mood, why would you write this article, also written so okay, is that I can learn. I think I could record something like you….

  • xchblog23
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    5…

    This article is really good, people do not be conscious of the author’s writing situations. I want to present it to more people, so the more the body will be such a okay feeling….

  • hotblogap5
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    5…

    This article is really dulcet, people do not be conscious of the author’s writing situations. I want to introduce it to more people, so the more the body will be such a dulcet feeling….

  • kokblogdl3
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3…

    A wally article will open up one’s eyes because the article is true, make us electronicy and laugh. When I set eyes on this article, I deem I can gains these….

  • biqingblogs
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    9…

    This article is really wally, a friend gave me a look. I set eyes on, I would like to express the feelings I looked. Others did not feel that I do not mind, at least now I express myself….

  • ruumyblog78
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10…

    I would like to know when you write this article is what kind of mood, why would you write this article, also written so great, is that I can learn. I think I could record something like you….

  • moomyblog89
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    7…

    Your article is here, the feeling of a mere individual can reap more.Let these people from every corner of the world, even in the heart with weal. We are not odinochestvo….

  • fashionsblog
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    3…

    A splendid article will widen one’s horizon because the article is true, make us move and laugh. When I saw this article, I think I can gains these….

  • masterdvw
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    8…

    I am fond of your article.Your article is like a big tree, so that we can squat in your tree, feel yourself a real. I feel very touched, very weal….

  • givenchy
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    10…

    I would like to comprehend when you write this article is what kind of mood, why would you write this article, also written so well, is that I can emulate. I think I could record something like you….

  • lddblog22
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    longchamp sac…

    http://www.fr-longchampsac.net

  • vokblogmq5
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    Ray Ban Uk…

    http://www.raybanwayfarer-us.com

  • rtwmyblog57
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    longchamp soldes…

    http://www.fr-longchams1948.net/

  • URL
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    … [Trackback]…

    […] Read More: blog.unixy.net/2009/06/script-to-automate-browsing-actions-using-lynx/ […]…

  • Lynx automate | Yourmalefriend
    Notice: Trying to get property of non-object in /home/unixy/public_html/blog/wp-includes/comment-template.php on line 542

    […] Script To Automate Browsing Actions Using Lynx | UNIXyJun 20, 2009 … There are times when one needs to automate some of the mundate tasks associated with browsing a certain Web page or accomplishing a … […]