dennis-tra / alfred-dict.cc-workflow

🌍 Alfred 4/5 workflow to get translations from dict.cc
137 stars 4 forks source link

"word" not found for every word #19

Closed felixkempf closed 5 months ago

felixkempf commented 5 months ago

I'm not using this awesome workflow regularly, so I have no idea what change might have triggered it, but today I suddenly got

"word" not found

for every "word", with and without explicit languages, with all language pairs I tried.

macOS Monterey (12.7.4) Intel processor Alfred 5.5 [2257] workflow versions 2.0.0 and 2.1.0 Internet works fine and I can reach dict.cc in browser

See debug output below for some examples:

[21:00:53.272] Dict.cc[Script Filter] Queuing argument 'ger eng Koma'
[21:00:53.560] Dict.cc[Script Filter] Script with argv '(null)' finished
[21:00:53.572] STDERR: Dict.cc[Script Filter] 🍺
21:00:53 workflow.go:328: ---------- Dict.cc/2.0.0 (AwGo/0.27.1) -----------
21:00:53 feedback.go:509: Sent 1 result(s) to Alfred
21:00:53 feedback.go:499: Feedback already sent. Ignoring.
21:00:53 feedback.go:499: Feedback already sent. Ignoring.
21:00:53 workflow.go:405: ------------------ 260.158323ms ------------------
[21:00:53.574] Dict.cc[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "xxx"
  },
  "items": [
    {
      "title": "\"Koma\" not found",
      "subtitle": "German \u003c-\u003e English",
      "valid": false
    }
  ]
}

[21:13:45.598] Dict.cc[Script Filter] Queuing argument 'blau'
[21:13:45.812] Dict.cc[Script Filter] Script with argv '(null)' finished
[21:13:45.817] STDERR: Dict.cc[Script Filter] 🍺
21:13:45 workflow.go:328: ---------- Dict.cc/2.1.0 (AwGo/0.27.1) -----------
21:13:45 feedback.go:509: Sent 1 result(s) to Alfred
21:13:45 feedback.go:499: Feedback already sent. Ignoring.
21:13:45 feedback.go:499: Feedback already sent. Ignoring.
21:13:45 workflow.go:405: ------------------ 94.883794ms -------------------
[21:13:45.818] Dict.cc[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "xxx"
  },
  "items": [
    {
      "title": "\"blau\" not found",
      "subtitle": "English \u003c-\u003e German",
      "valid": false
    }
  ]
}

[21:28:37.592] Dict.cc[Script Filter] Queuing argument 'fr de bleu'
[21:28:37.693] Dict.cc[Script Filter] Script with argv '(null)' finished
[21:28:37.704] STDERR: Dict.cc[Script Filter] 🍺
21:28:37 workflow.go:328: ---------- Dict.cc/2.1.0 (AwGo/0.27.1) -----------
21:28:37 feedback.go:509: Sent 1 result(s) to Alfred
21:28:37 feedback.go:499: Feedback already sent. Ignoring.
21:28:37 feedback.go:499: Feedback already sent. Ignoring.
21:28:37 workflow.go:405: ------------------ 75.156092ms -------------------
[21:28:37.705] Dict.cc[Script Filter] {
  "variables": {
    "AW_SESSION_ID": "xxx"
  },
  "items": [
    {
      "title": "\"bleu\" not found",
      "subtitle": "French \u003c-\u003e German",
      "valid": false
    }
  ]
}

Is it something with my local setup? Any help appreciated

jmeischner commented 5 months ago

+1

dv0d commented 5 months ago

+1

RomanBoegli commented 5 months ago

+1

DerToti commented 5 months ago

+1

PAtB1992 commented 5 months ago

+1

msakowski commented 5 months ago

+1

mollibesnering commented 5 months ago

+1

dennis-tra commented 5 months ago

Hey everyone, just here to ack that I've seen this issue. I'm currently travelling and can't really give an ETA when I'll be able to look into it. For reassurance, I'm using this workflow extensively myself so I'm definitely interested in a fix 👍

dennis-tra commented 5 months ago

Okay, just had a quick look, and dict.cc now returns the following message for requests made from Alfred:

Please don't run crawlers against dict.cc and don't try to make the dictionary available offline.

It's quite trivial to circumvent but because they seem to deliberately target this workflow with that warning message, I'll need to think about what to do. I might reach out to them and see if there's a way to find an agreement. However, this will take time and I guess the workflow is broken for now :/

dennis-tra commented 5 months ago

Well, I changed my mind. This workflow is not crawling dict.cc nor making the dictionary available offline. It's doing regular queries.

When setting a user agent on the HTTP request the query works again. I'm making it transparent that the request comes from this workflow by setting the user agent to alfred-dict.cc-workflow. If that's undesireable for dict.cc then they can easily block it again.

I guess this workflow is used by only a few hundred people anyway - shouldn't be a big deal. Check out this release: https://github.com/dennis-tra/alfred-dict.cc-workflow/releases/tag/v2.1.1

jmeischner commented 5 months ago

Thank you 🙏

felixkempf commented 5 months ago

Works flawlessly. Thank you for your time and effort

PAtB1992 commented 5 months ago

Thank you so much!