Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eecs398-search
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vcday
eecs398-search
Commits
1a4a3149
Commit
1a4a3149
authored
7 years ago
by
jsclose
Browse files
Options
Downloads
Patches
Plain Diff
trying with 3 spiders
parent
0efd4c02
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
crawler/SocketReader.cpp
+4
-0
4 additions, 0 deletions
crawler/SocketReader.cpp
crawler/spider.cpp
+0
-2
0 additions, 2 deletions
crawler/spider.cpp
docMap.txt
+0
-0
0 additions, 0 deletions
docMap.txt
main.cpp
+1
-1
1 addition, 1 deletion
main.cpp
tests/webSeed.txt
+1
-0
1 addition, 0 deletions
tests/webSeed.txt
with
6 additions
and
3 deletions
crawler/SocketReader.cpp
+
4
−
0
View file @
1a4a3149
...
...
@@ -29,6 +29,8 @@ void SocketReader::fillBuffer()
// Send a GET message for the desired page.
cout
<<
"Socket Reader is pulling from the web"
<<
endl
;
string
getMessage
=
"GET "
;
getMessage
+=
url
.
CompleteUrl
;
getMessage
+=
" HTTP/1.1
\r\n
Host: "
;
...
...
@@ -43,8 +45,10 @@ void SocketReader::fillBuffer()
char
buffer
[
10240
];
int
bytes
;
while
(
(
bytes
=
recv
(
s
,
buffer
,
sizeof
(
buffer
),
0
)
)
>
0
)
write
(
1
,
buffer
,
bytes
);
close
(
s
);
return
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
crawler/spider.cpp
+
0
−
2
View file @
1a4a3149
...
...
@@ -47,9 +47,7 @@ void Spider::FuncToRun()
{
if
(
cond
)
{
// markURLSeen( currentUrl );
//StreamReader* reader = request( currentUrl );
StreamReader
*
reader
=
request
(
currentUrl
);
...
...
This diff is collapsed.
Click to expand it.
docMap.txt
+
0
−
0
View file @
1a4a3149
No preview for this file type
This diff is collapsed.
Click to expand it.
main.cpp
+
1
−
1
View file @
1a4a3149
...
...
@@ -84,7 +84,7 @@ unordered_map < string, int > *docMapLookUp = new unordered_map < string, int >(
Crawler
crawler
(
mode
,
&
urlFrontier
);
crawler
.
SpawnSpiders
(
1
,
docMapLookUp
);
crawler
.
SpawnSpiders
(
3
,
docMapLookUp
);
crawler
.
...
...
This diff is collapsed.
Click to expand it.
tests/webSeed.txt
+
1
−
0
View file @
1a4a3149
http://www.dailymail.co.uk/ushome/index.html
http://www.bbc.com/
http://www.bbc.co.uk/news/business-42959138
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment