Skip to content

URLs are a bit wrong #209

Open
Open
@erip

Description

  • 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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions