<s>
Web	B-Application
scraping	I-Application
,	O
web	B-Application
harvesting	I-Application
,	O
or	O
web	O
data	B-General_Concept
extraction	I-General_Concept
is	O
data	B-General_Concept
scraping	I-General_Concept
used	O
for	O
extracting	B-General_Concept
data	I-General_Concept
from	O
websites	O
.	O
</s>
<s>
Web	B-Application
scraping	I-Application
software	O
may	O
directly	O
access	O
the	O
World	O
Wide	O
Web	O
using	O
the	O
Hypertext	B-Protocol
Transfer	I-Protocol
Protocol	I-Protocol
or	O
a	O
web	O
browser	O
.	O
</s>
<s>
While	O
web	B-Application
scraping	I-Application
can	O
be	O
done	O
manually	O
by	O
a	O
software	O
user	O
,	O
the	O
term	O
typically	O
refers	O
to	O
automated	O
processes	O
implemented	O
using	O
a	O
bot	B-Protocol
or	O
web	B-Application
crawler	I-Application
.	O
</s>
<s>
It	O
is	O
a	O
form	O
of	O
copying	O
in	O
which	O
specific	O
data	O
is	O
gathered	O
and	O
copied	O
from	O
the	O
web	O
,	O
typically	O
into	O
a	O
central	O
local	O
database	O
or	O
spreadsheet	O
,	O
for	O
later	O
retrieval	B-Application
or	O
analysis	B-General_Concept
.	O
</s>
<s>
Therefore	O
,	O
web	B-Application
crawling	I-Application
is	O
a	O
main	O
component	O
of	O
web	B-Application
scraping	I-Application
,	O
to	O
fetch	O
pages	O
for	O
later	O
processing	O
.	O
</s>
<s>
The	O
content	O
of	O
a	O
page	O
may	O
be	O
parsed	B-Language
,	O
searched	O
and	O
reformatted	O
,	O
and	O
its	O
data	O
copied	O
into	O
a	O
spreadsheet	O
or	O
loaded	O
into	O
a	O
database	O
.	O
</s>
<s>
Web	B-Application
scrapers	I-Application
typically	O
take	O
something	O
out	O
of	O
a	O
page	O
,	O
to	O
make	O
use	O
of	O
it	O
for	O
another	O
purpose	O
somewhere	O
else	O
.	O
</s>
<s>
An	O
example	O
would	O
be	O
finding	O
and	O
copying	O
names	O
and	O
telephone	O
numbers	O
,	O
companies	O
and	O
their	O
URLs	O
,	O
or	O
e-mail	O
addresses	O
to	O
a	O
list	O
(	O
contact	B-Application
scraping	I-Application
)	O
.	O
</s>
<s>
As	O
well	O
as	O
contact	B-Application
scraping	I-Application
,	O
web	B-Application
scraping	I-Application
is	O
used	O
as	O
a	O
component	O
of	O
applications	O
used	O
for	O
web	O
indexing	O
,	O
web	B-Application
mining	I-Application
and	O
data	B-Application
mining	I-Application
,	O
online	O
price	O
change	O
monitoring	O
and	O
price	O
comparison	O
,	O
product	O
review	O
scraping	O
(	O
to	O
watch	O
the	O
competition	O
)	O
,	O
gathering	O
real	O
estate	O
listings	O
,	O
weather	O
data	O
monitoring	O
,	O
website	O
change	O
detection	O
,	O
research	O
,	O
tracking	O
online	O
presence	O
and	O
reputation	O
,	O
web	B-Application
mashup	I-Application
,	O
and	O
web	B-General_Concept
data	I-General_Concept
integration	I-General_Concept
.	O
</s>
<s>
Web	O
pages	O
are	O
built	O
using	O
text-based	O
mark-up	O
languages	O
(	O
HTML	B-Language
and	O
XHTML	B-Language
)	O
,	O
and	O
frequently	O
contain	O
a	O
wealth	O
of	O
useful	O
data	O
in	O
text	O
form	O
.	O
</s>
<s>
Newer	O
forms	O
of	O
web	B-Application
scraping	I-Application
involve	O
monitoring	O
data	O
feeds	O
from	O
web	O
servers	O
.	O
</s>
<s>
For	O
example	O
,	O
JSON	B-General_Concept
is	O
commonly	O
used	O
as	O
a	O
transport	O
mechanism	O
between	O
the	O
client	O
and	O
the	O
web	O
server	O
.	O
</s>
<s>
There	O
are	O
methods	O
that	O
some	O
websites	O
use	O
to	O
prevent	O
web	B-Application
scraping	I-Application
,	O
such	O
as	O
detecting	O
and	O
disallowing	O
bots	B-Protocol
from	O
crawling	O
(	O
viewing	O
)	O
their	O
pages	O
.	O
</s>
<s>
The	O
history	O
of	O
web	B-Application
scraping	I-Application
dates	O
back	O
nearly	O
to	O
the	O
time	O
when	O
the	O
World	O
Wide	O
Web	O
was	O
born	O
.	O
</s>
<s>
After	O
the	O
birth	O
of	O
the	O
World	O
Wide	O
Web	O
in	O
1989	O
,	O
the	O
first	O
web	B-Protocol
robot	I-Protocol
,	O
World	B-Application
Wide	I-Application
Web	I-Application
Wanderer	I-Application
,	O
was	O
created	O
in	O
June	O
1993	O
,	O
which	O
was	O
intended	O
only	O
to	O
measure	O
the	O
size	O
of	O
the	O
web	O
.	O
</s>
<s>
In	O
comparison	O
,	O
JumpStation	O
was	O
the	O
first	O
WWW	O
search	O
engine	O
to	O
rely	O
on	O
a	O
web	B-Protocol
robot	I-Protocol
.	O
</s>
<s>
In	O
2000	O
,	O
the	O
first	O
Web	O
API	B-Application
and	O
API	B-Application
crawler	O
were	O
created	O
.	O
</s>
<s>
An	O
API	B-Application
(	O
Application	B-Application
Programming	I-Application
Interface	I-Application
)	O
is	O
an	O
interface	O
that	O
makes	O
it	O
much	O
easier	O
to	O
develop	O
a	O
program	O
by	O
providing	O
the	O
building	O
blocks	O
.	O
</s>
<s>
In	O
2000	O
,	O
Salesforce	B-Application
and	O
eBay	B-Application
launched	O
their	O
own	O
API	B-Application
,	O
with	O
which	O
programmers	O
could	O
access	O
and	O
download	O
some	O
of	O
the	O
data	O
available	O
to	O
the	O
public	O
.	O
</s>
<s>
Since	O
then	O
,	O
many	O
websites	O
offer	O
web	O
APIs	B-Application
for	O
people	O
to	O
access	O
their	O
public	O
database	O
.	O
</s>
<s>
Web	B-Application
scraping	I-Application
is	O
the	O
process	O
of	O
automatically	O
mining	O
data	O
or	O
collecting	O
information	O
from	O
the	O
World	O
Wide	O
Web	O
.	O
</s>
<s>
The	O
simplest	O
form	O
of	O
web	B-Application
scraping	I-Application
is	O
manually	O
copying	O
and	O
pasting	O
data	O
from	O
a	O
web	O
page	O
into	O
a	O
text	O
file	O
or	O
spreadsheet	O
.	O
</s>
<s>
A	O
simple	O
yet	O
powerful	O
approach	O
to	O
extract	O
information	O
from	O
web	O
pages	O
can	O
be	O
based	O
on	O
the	O
UNIX	O
grep	B-Application
command	O
or	O
regular	O
expression-matching	O
facilities	O
of	O
programming	O
languages	O
(	O
for	O
instance	O
Perl	B-Language
or	O
Python	B-Language
)	O
.	O
</s>
<s>
Static	O
and	O
dynamic	O
web	O
pages	O
can	O
be	O
retrieved	O
by	O
posting	O
HTTP	B-Protocol
requests	I-Protocol
to	O
the	O
remote	O
web	O
server	O
using	O
socket	B-Operating_System
programming	I-Operating_System
.	O
</s>
<s>
In	O
data	B-Application
mining	I-Application
,	O
a	O
program	O
that	O
detects	O
such	O
templates	O
in	O
a	O
particular	O
information	O
source	O
,	O
extracts	O
its	O
content	O
and	O
translates	O
it	O
into	O
a	O
relational	O
form	O
,	O
is	O
called	O
a	O
wrapper	B-Algorithm
.	O
</s>
<s>
Wrapper	B-Algorithm
generation	O
algorithms	O
assume	O
that	O
input	O
pages	O
of	O
a	O
wrapper	B-Algorithm
induction	O
system	O
conform	O
to	O
a	O
common	O
template	O
and	O
that	O
they	O
can	O
be	O
easily	O
identified	O
in	O
terms	O
of	O
a	O
URL	O
common	O
scheme	O
.	O
</s>
<s>
Moreover	O
,	O
some	O
semi-structured	B-Application
data	I-Application
query	O
languages	O
,	O
such	O
as	O
XQuery	B-Language
and	O
the	O
HTQL	O
,	O
can	O
be	O
used	O
to	O
parse	B-Language
HTML	B-Language
pages	O
and	O
to	O
retrieve	O
and	O
transform	O
page	O
content	O
.	O
</s>
<s>
By	O
embedding	O
a	O
full-fledged	O
web	O
browser	O
,	O
such	O
as	O
the	O
Internet	B-Application
Explorer	I-Application
or	O
the	O
Mozilla	B-Operating_System
browser	O
control	O
,	O
programs	O
can	O
retrieve	O
the	O
dynamic	O
content	O
generated	O
by	O
client-side	O
scripts	O
.	O
</s>
<s>
These	O
browser	O
controls	O
also	O
parse	B-Language
web	O
pages	O
into	O
a	O
DOM	B-General_Concept
tree	I-General_Concept
,	O
based	O
on	O
which	O
programs	O
can	O
retrieve	O
parts	O
of	O
the	O
pages	O
.	O
</s>
<s>
Languages	O
such	O
as	O
Xpath	B-Language
can	O
be	O
used	O
to	O
parse	B-Language
the	O
resulting	O
DOM	B-General_Concept
tree	I-General_Concept
.	O
</s>
<s>
These	O
platforms	O
create	O
and	O
monitor	O
a	O
multitude	O
of	O
"	O
bots	B-Protocol
"	O
for	O
specific	O
verticals	O
with	O
no	O
"	O
man	O
in	O
the	O
loop	O
"	O
(	O
no	O
direct	O
human	O
involvement	O
)	O
,	O
and	O
no	O
work	O
related	O
to	O
a	O
specific	O
target	O
site	O
.	O
</s>
<s>
The	O
preparation	O
involves	O
establishing	O
the	O
knowledge	O
base	O
for	O
the	O
entire	O
vertical	O
and	O
then	O
the	O
platform	O
creates	O
the	O
bots	B-Protocol
automatically	O
.	O
</s>
<s>
If	O
the	O
annotations	O
are	O
embedded	O
in	O
the	O
pages	O
,	O
as	O
Microformat	B-General_Concept
does	O
,	O
this	O
technique	O
can	O
be	O
viewed	O
as	O
a	O
special	O
case	O
of	O
DOM	B-General_Concept
parsing	B-Language
.	O
</s>
<s>
There	O
are	O
efforts	O
using	O
machine	O
learning	O
and	O
computer	B-Application
vision	I-Application
that	O
attempt	O
to	O
identify	O
and	O
extract	O
information	O
from	O
web	O
pages	O
by	O
interpreting	O
pages	O
visually	O
as	O
a	O
human	O
being	O
might	O
.	O
</s>
<s>
Some	O
web	B-Application
scraping	I-Application
software	O
can	O
also	O
be	O
used	O
to	O
extract	O
data	O
from	O
an	O
API	B-Application
directly	O
.	O
</s>
<s>
The	O
legality	O
of	O
web	B-Application
scraping	I-Application
varies	O
across	O
the	O
world	O
.	O
</s>
<s>
In	O
general	O
,	O
web	B-Application
scraping	I-Application
may	O
be	O
against	O
the	O
terms	O
of	O
service	O
of	O
some	O
websites	O
,	O
but	O
the	O
enforceability	O
of	O
these	O
terms	O
is	O
unclear	O
.	O
</s>
<s>
In	O
the	O
United	O
States	O
,	O
website	O
owners	O
can	O
use	O
three	O
major	O
legal	O
claims	O
to	O
prevent	O
undesired	O
web	B-Application
scraping	I-Application
:	O
(	O
1	O
)	O
copyright	O
infringement	O
(	O
compilation	O
)	O
,	O
(	O
2	O
)	O
violation	O
of	O
the	O
Computer	O
Fraud	O
and	O
Abuse	O
Act	O
(	O
"	O
CFAA	O
"	O
)	O
,	O
and	O
(	O
3	O
)	O
trespass	O
to	O
chattel	O
.	O
</s>
<s>
The	O
best	O
known	O
of	O
these	O
cases	O
,	O
eBay	B-Application
v	O
.	O
Bidder	O
's	O
Edge	O
,	O
resulted	O
in	O
an	O
injunction	O
ordering	O
Bidder	O
's	O
Edge	O
to	O
stop	O
accessing	O
,	O
collecting	O
,	O
and	O
indexing	O
auctions	O
from	O
the	O
eBay	B-Application
web	O
site	O
.	O
</s>
<s>
Not	O
all	O
cases	O
of	O
web	O
spidering	B-Application
brought	O
before	O
the	O
courts	O
have	O
been	O
considered	O
trespass	O
to	O
chattels	O
.	O
</s>
<s>
Craigslist	O
sent	O
3Taps	O
a	O
cease-and-desist	O
letter	O
and	O
blocked	O
their	O
IP	B-Protocol
addresses	I-Protocol
and	O
later	O
sued	O
,	O
in	O
Craigslist	O
v	O
.	O
3Taps	O
.	O
</s>
<s>
In	O
a	O
2010	O
ruling	O
in	O
the	O
Cvent	B-General_Concept
,	I-General_Concept
Inc	I-General_Concept
.	I-General_Concept
v	O
.	O
Eventbrite	O
,	O
Inc	O
.	O
</s>
<s>
QVC	O
's	O
complaint	O
alleges	O
that	O
the	O
defendant	O
disguised	O
its	O
web	B-Application
crawler	I-Application
to	O
mask	O
its	O
source	O
IP	B-Protocol
address	I-Protocol
and	O
thus	O
prevented	O
QVC	O
from	O
quickly	O
repairing	O
the	O
problem	O
.	O
</s>
<s>
On	O
April	O
30	O
,	O
2020	O
,	O
the	O
French	O
Data	O
Protection	O
Authority	O
(	O
CNIL	O
)	O
released	O
new	O
guidelines	O
on	O
web	B-Application
scraping	I-Application
.	O
</s>
<s>
In	O
Australia	O
,	O
the	O
Spam	O
Act	O
2003	O
outlaws	O
some	O
forms	O
of	O
web	B-Application
harvesting	I-Application
,	O
although	O
this	O
only	O
applies	O
to	O
email	O
addresses	O
.	O
</s>
<s>
Leaving	O
a	O
few	O
cases	O
dealing	O
with	O
IPR	O
infringement	O
,	O
Indian	O
courts	O
have	O
not	O
expressly	O
ruled	O
on	O
the	O
legality	O
of	O
web	B-Application
scraping	I-Application
.	O
</s>
<s>
However	O
,	O
since	O
all	O
common	O
forms	O
of	O
electronic	O
contracts	O
are	O
enforceable	O
in	O
India	O
,	O
violating	O
the	O
terms	O
of	O
use	O
prohibiting	O
data	B-General_Concept
scraping	I-General_Concept
will	O
be	O
a	O
violation	O
of	O
the	O
contract	O
law	O
.	O
</s>
<s>
It	O
will	O
also	O
violate	O
the	O
Information	O
Technology	O
Act	O
,	O
2000	O
,	O
which	O
penalizes	O
unauthorized	O
access	O
to	O
a	O
computer	O
resource	O
or	O
extracting	B-General_Concept
data	I-General_Concept
from	O
a	O
computer	O
resource	O
.	O
</s>
<s>
The	O
administrator	O
of	O
a	O
website	O
can	O
use	O
various	O
measures	O
to	O
stop	O
or	O
slow	O
a	O
bot	B-Protocol
.	O
</s>
<s>
Blocking	O
an	O
IP	B-Protocol
address	I-Protocol
either	O
manually	O
or	O
based	O
on	O
criteria	O
such	O
as	O
geolocation	O
and	O
DNSRBL	O
.	O
</s>
<s>
Disabling	O
any	O
web	O
service	O
API	B-Application
that	O
the	O
website	O
's	O
system	O
might	O
expose	O
.	O
</s>
<s>
Bots	B-Protocol
sometimes	O
declare	O
who	O
they	O
are	O
(	O
using	O
user	B-Protocol
agent	I-Protocol
strings	O
)	O
and	O
can	O
be	O
blocked	O
on	O
that	O
basis	O
using	O
robots.txt	O
;	O
'	O
googlebot	B-Application
 '	O
is	O
an	O
example	O
.	O
</s>
<s>
Other	O
bots	B-Protocol
make	O
no	O
distinction	O
between	O
themselves	O
and	O
a	O
human	O
using	O
a	O
browser	O
.	O
</s>
<s>
Bots	B-Protocol
can	O
sometimes	O
be	O
blocked	O
with	O
tools	O
to	O
verify	O
that	O
it	O
is	O
a	O
real	O
person	O
accessing	O
the	O
site	O
,	O
like	O
a	O
CAPTCHA	O
.	O
</s>
<s>
Bots	B-Protocol
are	O
sometimes	O
coded	O
to	O
explicitly	O
break	O
specific	O
CAPTCHA	O
patterns	O
or	O
may	O
employ	O
third-party	O
services	O
that	O
utilize	O
human	O
labor	O
to	O
read	O
and	O
respond	O
in	O
real-time	O
to	O
CAPTCHA	O
challenges	O
.	O
</s>
<s>
Commercial	O
anti-bot	O
services	O
:	O
Companies	O
offer	O
anti-bot	O
and	O
anti-scraping	O
services	O
for	O
websites	O
.	O
</s>
<s>
A	O
few	O
web	O
application	B-Protocol
firewalls	I-Protocol
have	O
limited	O
bot	B-Protocol
detection	O
capabilities	O
as	O
well	O
.	O
</s>
<s>
Locating	O
bots	B-Protocol
with	O
a	O
honeypot	O
or	O
other	O
method	O
to	O
identify	O
the	O
IP	B-Protocol
addresses	I-Protocol
of	O
automated	O
crawlers	O
.	O
</s>
<s>
Because	O
bots	B-Protocol
rely	O
on	O
consistency	O
in	O
the	O
front-end	O
code	O
of	O
a	O
target	O
website	O
,	O
adding	O
small	O
variations	O
to	O
the	O
HTML/CSS	O
surrounding	O
important	O
data	O
and	O
navigation	O
elements	O
would	O
require	O
more	O
human	O
involvement	O
in	O
the	O
initial	O
set	O
up	O
of	O
a	O
bot	B-Protocol
and	O
if	O
done	O
effectively	O
may	O
render	O
the	O
target	O
website	O
too	O
difficult	O
to	O
scrape	O
due	O
to	O
the	O
diminished	O
ability	O
to	O
automate	O
the	O
scraping	O
process	O
.	O
</s>
