473,790 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I write a crawler in Javascript?

In addition to the question in the subject line, if the answer is yes,
is it possible to locate keywords as part of the functionality of said
crawler (bot, spider)?

Basically, I would like to write a stand-alone form (javascript app.)
to perform a site-specific keyword search.

Can I do the aforementioned in Javascript?

Thanks.
Jan 4 '08 #1
7 3521
Lee
bd*******@gmail .com said:
>
In addition to the question in the subject line, if the answer is yes,
is it possible to locate keywords as part of the functionality of said
crawler (bot, spider)?

Basically, I would like to write a stand-alone form (javascript app.)
to perform a site-specific keyword search.

Can I do the aforementioned in Javascript?
1. Don't assume that people reading your post can see the subject line.
State your entire question in the body.

2. What you think of as Javascript is almost certainly client-side
code, and it cannot see anything on the server. It is possible on
some servers to execute Javascript on the server, but it's not
something you're likely to want to try.
--

Jan 4 '08 #2
On Jan 4, 1:25 pm, bdy120...@gmail .com wrote:
In addition to the question in the subject line, if the answer is yes,
is it possible to locate keywords as part of the functionality of said
crawler (bot, spider)?

Basically, I would like to write a stand-alone form (javascript app.)
to perform a site-specific keyword search.

Can I do the aforementioned in Javascript?

Thanks.
My question is "why?" Is it because you're familiar with JavaScript
and not server-side languages like PHP, C#, or Ruby?

The typical solution would be to have a PHP crawler on the server. You
can get the info to the server via a form or a JavaScript ajax call.

Even if you could do it in Javascript from the client, cross-site
security in the browser may block your attempts.
Jan 4 '08 #3
Lee wrote on 04 jan 2008 in comp.lang.javas cript:
2. What you think of as Javascript is almost certainly client-side
code, and it cannot see anything on the server. It is possible on
some servers to execute Javascript on the server, but it's not
something you're likely to want to try.
Why?

Writing serverside javascript is a joy.

Many functions can be written for clientside
and serverside use without any conversion,
like dual input verification of data.

Or do you mean not wanting to try writing a crawler?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 5 '08 #4
Lee
Evertjan. said:
>
Lee wrote on 04 jan 2008 in comp.lang.javas cript:
>2. What you think of as Javascript is almost certainly client-side
code, and it cannot see anything on the server. It is possible on
some servers to execute Javascript on the server, but it's not
something you're likely to want to try.

Why?

Writing serverside javascript is a joy.

Many functions can be written for clientside
and serverside use without any conversion,
like dual input verification of data.

Or do you mean not wanting to try writing a crawler?
I mean that somebody who has to ask whether it's possible
to write a crawler in Javascript probably doesn't want to
try to write server-side Javascript.

At least not until they've had more experience in writing
client-side Javascript and have gained working knowledge
of client/server differences.
--

Jan 5 '08 #5
Lee wrote on 05 jan 2008 in comp.lang.javas cript:
Evertjan. said:
>>
Lee wrote on 04 jan 2008 in comp.lang.javas cript:
>>2. What you think of as Javascript is almost certainly client-side
code, and it cannot see anything on the server. It is possible on
some servers to execute Javascript on the server, but it's not
something you're likely to want to try.

Why?

Writing serverside javascript is a joy.

Many functions can be written for clientside
and serverside use without any conversion,
like dual input verification of data.

Or do you mean not wanting to try writing a crawler?

I mean that somebody who has to ask whether it's possible
to write a crawler in Javascript probably doesn't want to
try to write server-side Javascript.

At least not until they've had more experience in writing
client-side Javascript and have gained working knowledge
of client/server differences.
Agree!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 5 '08 #6
On Jan 4, 4:25*pm, bdy120...@gmail .com wrote:
In addition to the question in the subject line, if the answer is yes,
is it possible to locate keywords as part of the functionality of said
crawler (bot, spider)?

Basically, I would like to write a stand-alone form (javascript app.)
to perform a site-specific keyword search.

Can I do the aforementioned in Javascript?

Thanks.
(I'm assuming that you want something that will run completely inside
of your web browser, and not use Adobe AIR, a Java applet, Firefox
plugin, or anything like that.) I am certain that you can do this.
You'd have to have the web crawler/search logic in one window/frame,
and have it pilot a second window/frame to various web pages, and
search their contents. This probably wouldn't bee too fast, but if you
were only searching a limited number of pages, it'd probably be fast
enough. For bonus points you could try building an index of crawled
content, and searching that.

James Tikalsky
Jan 6 '08 #7
bd*******@gmail .com wrote:
Thank you for all yoru answers. OK, then, which language would be the
easiest to write such an application?
Look at Java because the standard class libraries contain most of the
code needed for following URLs as well as accessing and parsing HTML.

I had no trouble writing a URL checker for my set of private reference
pages using these classes. Its a sort of primitive crawler that parses a
page, extracts the URLs from anchor tags and checks whether the target
object exists.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
Jan 7 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2689
by: Don | last post by:
How do I code the following Javascript to run in a PHP script? ------------------------- <script type="text/javascript" language="javascript"> // function passfile1path() { var path = document.processPictures.userfile1.value; document.processPictures.file1path.value = path; }
1
1138
by: Vincy | last post by:
Hi, I have the follow problem: a windows is divided on two frames: frame1 and frame2. on frame 2 there is a buttom it runs a function 'SendMsg' that write (by operator 'write' of javascript) a string with link (this link should show a alert message) on frame1. follow the javascript code:
13
9651
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be assigned to a variable and output using document.write. (Note, there is no submit button or other form elements. Basically
9
2901
by: Robby Bankston | last post by:
I'm working on some code and am running into brick walls. I'm trying to write out Javascript with Javascript and I've read the clj Meta FAQ and didn't see the answer, read many similar posts (with no luck though), and searched through the IRT.ORG Faqs (www.irt.org/script/script.htm). The Javascript is designed to open an popup window and then inside that window call another script which will resize that window. There may be another...
136
9460
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
3
2834
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%"" BORDER=""0"" CELLSPACING=""0"" CELLPADDING=""0"" ID=""Table1""> " & vbNewLine) writer.Write(" <tr>" & vbNewLine) writer.Write(" <td>" & vbNewLine)
13
8311
by: John Smith | last post by:
I am using IE 6.0 from http://www.javaworld.com/javaworld/jw-07-1996/jw-07-javascript-p2.html I gather that "If you need to test a number of command lines, you can reduce the keystrokes by typing javascript: (remember the colon) in the Location box. Navigator displays a "JavaScript typein" frame at the bottom of the window. Type the command line you want to try, and press Enter. "
1
2068
by: Tiago Vieira | last post by:
Hi everybody, I'm trying to insert a piece of javascript inside of a web service method but It's not working. Have somebody already tryed to do it? Folow a piece of my code below. --------- Private Sub InsertReportTable(ByVal path As String, ByVal exp As String, ByVal app As Boolean, ByVal rep As Boolean) Dim tableAdapter As New IDReportsTableAdapter Dim grid As New GridView
2
1092
by: adi | last post by:
Hello guys. This is Aditya. I have a jsp where i am displaying more than 10,000 records and finally i am adding the values of these records in the end and displaying the total value as Total: . My Task: Now i want to write a javafunction which can shrink these 10,000 records into a word say (Add). When the user comes and selects or clicks this Add then he can view all the 10,000 records and if he doesnot click Add, then only the total...
1
1131
by: Mosio | last post by:
I want to write a script that starts listening to a port in LAN and when a data comes show it in the browser of user, without any postback. Is That Possible?
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9023
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5552
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.