Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-cn-database-generator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-cn-database-generator
Commits
e688f94d
Commit
e688f94d
authored
Oct 20, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
bcfeac62
Pipeline
#936
passed with stages
in 1 minute and 28 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
run.ts
run.ts
+2
-2
src/nwfetcher.ts
src/nwfetcher.ts
+1
-1
No files found.
run.ts
View file @
e688f94d
import
{
DBReader
}
from
"
./src/dbreader
"
;
import
{
DBReader
}
from
"
./src/dbreader
"
;
import
{
CNFetcher
}
from
"
./src/
fetcher
"
;
import
{
NWFetcher
}
from
"
./src/nw
fetcher
"
;
import
_
from
"
underscore
"
;
import
_
from
"
underscore
"
;
async
function
fetchCardsFromNW
(
dbreader
:
DBReader
)
{
async
function
fetchCardsFromNW
(
dbreader
:
DBReader
)
{
const
fetcher
=
new
CN
Fetcher
({
name
:
"
Fetcher
"
,
level
:
"
debug
"
});
const
fetcher
=
new
NW
Fetcher
({
name
:
"
Fetcher
"
,
level
:
"
debug
"
});
await
fetcher
.
init
();
await
fetcher
.
init
();
const
strings
=
await
fetcher
.
fetch
();
const
strings
=
await
fetcher
.
fetch
();
return
await
dbreader
.
getAllCardsFromJapaneseNames
(
strings
);
return
await
dbreader
.
getAllCardsFromJapaneseNames
(
strings
);
...
...
src/fetcher.ts
→
src/
nw
fetcher.ts
View file @
e688f94d
...
@@ -13,7 +13,7 @@ function convertCharToFullSize(char: string) {
...
@@ -13,7 +13,7 @@ function convertCharToFullSize(char: string) {
return
char
;
return
char
;
}
}
export
class
CN
Fetcher
extends
Base
{
export
class
NW
Fetcher
extends
Base
{
private
async
fetchPage
(
url
:
string
):
Promise
<
string
>
{
private
async
fetchPage
(
url
:
string
):
Promise
<
string
>
{
this
.
log
.
debug
(
`Downloading content from
${
url
}
.`
);
this
.
log
.
debug
(
`Downloading content from
${
url
}
.`
);
const
{
data
}
=
await
axios
.
get
(
url
,
{
const
{
data
}
=
await
axios
.
get
(
url
,
{
...
...
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