Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webmagic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
webmagic
Commits
cff943f6
Commit
cff943f6
authored
Aug 07, 2013
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix path format error
parent
36384246
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
0 deletions
+12
-0
FilePipeline.java
...ain/java/us/codecraft/webmagic/pipeline/FilePipeline.java
+3
-0
FileDownloader.java
...java/us/codecraft/webmagic/downloader/FileDownloader.java
+3
-0
JsonFilePipeline.java
...java/us/codecraft/webmagic/pipeline/JsonFilePipeline.java
+3
-0
FileCacheQueueScheduler.java
...codecraft/webmagic/scheduler/FileCacheQueueScheduler.java
+3
-0
No files found.
webmagic-core/src/main/java/us/codecraft/webmagic/pipeline/FilePipeline.java
View file @
cff943f6
...
...
@@ -37,6 +37,9 @@ public class FilePipeline implements Pipeline {
* @param path 文件保存路径
*/
public
FilePipeline
(
String
path
)
{
if
(!
path
.
endsWith
(
"/"
)&&!
path
.
endsWith
(
"\\"
)){
path
+=
"/"
;
}
this
.
path
=
path
;
}
...
...
webmagic-extension/src/main/java/us/codecraft/webmagic/downloader/FileDownloader.java
View file @
cff943f6
...
...
@@ -34,6 +34,9 @@ public class FileDownloader implements Downloader {
}
public
FileDownloader
(
String
path
,
Downloader
downloaderWhenFileMiss
)
{
if
(!
path
.
endsWith
(
"/"
)&&!
path
.
endsWith
(
"\\"
)){
path
+=
"/"
;
}
this
.
path
=
path
;
this
.
downloaderWhenFileMiss
=
downloaderWhenFileMiss
;
}
...
...
webmagic-extension/src/main/java/us/codecraft/webmagic/pipeline/JsonFilePipeline.java
View file @
cff943f6
...
...
@@ -37,6 +37,9 @@ public class JsonFilePipeline implements Pipeline {
* @param path 文件保存路径
*/
public
JsonFilePipeline
(
String
path
)
{
if
(!
path
.
endsWith
(
"/"
)&&!
path
.
endsWith
(
"\\"
)){
path
+=
"/"
;
}
this
.
path
=
path
;
}
...
...
webmagic-extension/src/main/java/us/codecraft/webmagic/scheduler/FileCacheQueueScheduler.java
View file @
cff943f6
...
...
@@ -47,6 +47,9 @@ public class FileCacheQueueScheduler implements Scheduler {
private
Set
<
String
>
urls
;
public
FileCacheQueueScheduler
(
String
filePath
)
{
if
(!
filePath
.
endsWith
(
"/"
)&&!
filePath
.
endsWith
(
"\\"
)){
filePath
+=
"/"
;
}
this
.
filePath
=
filePath
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment