Spaces:
Runtime error
Runtime error
Niv Sardi
commited on
Commit
·
d6dde3c
1
Parent(s):
d16b094
deno: take id
Browse filesSigned-off-by: Niv Sardi <xaiki@evilgiggle.com>
- deno/index.ts +2 -2
deno/index.ts
CHANGED
@@ -37,7 +37,7 @@ async function get_logos(page, selector): {}[] {
|
|
37 |
}
|
38 |
|
39 |
|
40 |
-
function process(o: { url: string, bco: string, name: string }): Promise<void> {
|
41 |
const promises: Promise<void>[] = [];
|
42 |
|
43 |
return puppet.run(async page => {
|
@@ -65,7 +65,7 @@ function process(o: { url: string, bco: string, name: string }): Promise<void> {
|
|
65 |
try {
|
66 |
await logos[i].screenshot({ path: `./data/logos/${o.bco}.logo${i}.png` })
|
67 |
annotations +=
|
68 |
-
`${o.
|
69 |
} catch (e) {
|
70 |
console.error(`couldn't screenshot logo: ${e}`);
|
71 |
}
|
|
|
37 |
}
|
38 |
|
39 |
|
40 |
+
function process(o: { id: int, url: string, bco: string, name: string }): Promise<void> {
|
41 |
const promises: Promise<void>[] = [];
|
42 |
|
43 |
return puppet.run(async page => {
|
|
|
65 |
try {
|
66 |
await logos[i].screenshot({ path: `./data/logos/${o.bco}.logo${i}.png` })
|
67 |
annotations +=
|
68 |
+
`${o.id} ${bb.x + bb.width / 2} ${bb.y + bb.height / 2} ${bb.width} ${bb.height}\n`
|
69 |
} catch (e) {
|
70 |
console.error(`couldn't screenshot logo: ${e}`);
|
71 |
}
|