Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative path for scraper definition resolved to wrong location #56

Open
dan2097 opened this issue Sep 19, 2015 · 0 comments
Open

Relative path for scraper definition resolved to wrong location #56

dan2097 opened this issue Sep 19, 2015 · 0 comments

Comments

@dan2097
Copy link

dan2097 commented Sep 19, 2015

When using the example command i.e.
quickscrape
--url https://peerj.com/articles/384
--scraper journal-scrapers/scrapers/peerj.json
--output peerj-384
--outformat bibjson

I encountered an issue where the scaper was instead resolved to:
/home/workshop/peerj-384/journal-scrapers/scrapers/peerj.json
(instead of /home/workshop/journal-scrapers/scrapers/peerj.json)

This was reported as a failure at this line
program.scraperdir = path.resolve(program.scraperdir);

I believe the issue is caused by the following line which changes the working directory to the output directory:
process.chdir(program.output);
tld = process.cwd();

Moving these two lines till after all absolute paths are determined fixed the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant