Skip to content

Commit 3ebc9e2

Browse files
authored
feat: handle captcha (#6)
* docs(README): fix badge * feat: handle captcha with human in the loop
1 parent 52daddc commit 3ebc9e2

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
# Darwin
1+
# Darwin 🧬
22

3-
A cli tool to download gene sequence datasets
3+
A cli tool to download research papers / datasets from various sources.
44

5-
[![Version](https://img.shields.io/npm/v/darwin.svg)](https://npmjs.org/package/@rpidanny/darwin)
6-
[![Downloads/week](https://img.shields.io/npm/dw/darwin.svg)](https://npmjs.org/package/@rpidanny/darwin)
5+
[![Version](https://img.shields.io/npm/v/@rpidanny/darwin.svg)](https://npmjs.org/package/@rpidanny/darwin)
6+
[![Downloads/week](https://img.shields.io/npm/dw/@rpidanny/darwin.svg)](https://npmjs.org/package/@rpidanny/darwin)
77

88
<!-- toc -->
9-
* [Darwin](#darwin)
10-
* [Usage](#usage)
11-
* [Commands](#commands)
12-
* [Command Topics](#command-topics)
9+
10+
- [Darwin](#darwin)
11+
- [Usage](#usage)
12+
- [Commands](#commands)
13+
- [Command Topics](#command-topics)
1314
<!-- tocstop -->
1415

1516
# Usage
1617

1718
<!-- usage -->
19+
1820
```sh-session
1921
$ npm install -g @rpidanny/darwin
2022
$ darwin COMMAND
@@ -26,14 +28,16 @@ USAGE
2628
$ darwin COMMAND
2729
...
2830
```
31+
2932
<!-- usagestop -->
3033

3134
# Commands
3235

3336
<!-- commands -->
37+
3438
# Command Topics
3539

36-
* [`darwin help`](docs/help.md) - Display help for darwin.
37-
* [`darwin search`](docs/search.md) - Search content (papers / accession numbers / etc)
40+
- [`darwin help`](docs/help.md) - Display help for darwin.
41+
- [`darwin search`](docs/search.md) - Search content (papers / accession numbers / etc)
3842

3943
<!-- commandsstop -->

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@oclif/plugin-help": "^6",
3535
"@oclif/plugin-not-found": "^3.2.1",
3636
"@rpidanny/google-scholar": "^1.0.1",
37-
"@rpidanny/odysseus": "^1.1.1",
37+
"@rpidanny/odysseus": "^1.2.0",
3838
"@rpidanny/quill": "^1.5.0",
3939
"bottleneck": "^2.19.5",
4040
"cheerio": "^1.0.0-rc.12",

src/commands/search/accession.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ export default class SearchAccession extends BaseCommand<typeof SearchAccession>
5555

5656
const { headless } = this.flags
5757

58-
console.log('Initializing Accession Command')
59-
60-
this.webClient = new Odysseus({ headless }, this.logger)
58+
this.webClient = new Odysseus({ headless, waitOnCaptcha: true }, this.logger)
6159
this.scholar = new GoogleScholar(this.webClient, this.logger)
6260
this.ioService = new IoService()
6361

@@ -68,8 +66,6 @@ export default class SearchAccession extends BaseCommand<typeof SearchAccession>
6866
const { maxResults, output } = this.flags
6967
const { keywords } = this.args
7068

71-
console.log('Keywords', keywords)
72-
7369
this.logger.info(`Searching accession numbers for: ${keywords}`)
7470
const result = await this.service.search(keywords, maxResults)
7571

0 commit comments

Comments
 (0)