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

URLs are a bit wrong #209

Open
erip opened this issue Sep 22, 2020 · 0 comments
Open

URLs are a bit wrong #209

erip opened this issue Sep 22, 2020 · 0 comments

Comments

@erip
Copy link

erip commented Sep 22, 2020

  • Opus API version: 0.6.2
  • Python version: 3.6.12
  • Operating System: OS X 10.15.6

Description

I want pipe the opus_api to wget after extracting the URL from the resulting JSON object, but the urls are wrong because they are prefixed by http://opus.nlpl.eu/. Stripping this results in an appropriate URL.

What I Did

$ opus_api get en fa | jq '.corpora[].url'
/Users/erippeth/miniconda3/envs/opus-dl/lib/python3.6/site-packages/selenium/webdriver/phantomjs/webdriver.py:49: UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
  warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless '
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-OpenSubtitles/v2018/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-Tanzil/v1/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-TEP/v1/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-QED/v2.0a/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-Wikipedia/v1.0/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-GNOME/v1/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-TED2013/v1.1/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-infopankki/v1/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-KDE4/v2/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-Ubuntu/v14.10/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-GlobalVoices/v2017q3/moses/en-fa.txt.zip"
"http://opus.nlpl.eu/https://object.pouta.csc.fi/OPUS-ELRC_2922/v1/moses/en-fa.txt.zip"
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