Jump to content
dingyi

Domainr Workflow

Recommended Posts

Hi folks, it looks like this workflow has got broken somewhere along the line. I ran a debug and got this - can anyone help me fix it?

 

Starting debug for 'Domainr v1.1'
 
[ERROR: alfred.workflow.input.scriptfilter] XML Parse Error 'The operation couldn’t be completed. (NSXMLParserErrorDomain error 4.)'. Row 1, Col 1: 'Document is empty' in XML:
Warning: Invalid argument supplied for foreach() in Command line code on line 24
 
Thanks!
 
Nick

Share this post


Link to post

Domainr changed the API url and the workflow doesn't follow the redirect. So, change:

$url = "https://domai.nr/api/json/search?q=$query";

to

 

$url = "https://domainr.com/api/json/search?q=$query";
Then it should work. You might get some random notices still when variables are empty, but you can ignore them.

Share this post


Link to post

Hi @Shawn, that works - thanks. It's been over a year since @dingyi has visited these forums, is this a workflow that you might want to re-create under Packal?

Share this post


Link to post

Hi @Shawn, that works - thanks. It's been over a year since @dingyi has visited these forums, is this a workflow that you might want to re-create under Packal?

 

As a policy, I don't want to submit others' workflows to Packal (even if I really think that they would be good to have up there), but if the workflow seems neglected and I can rewrite it for performance or other reasons, then I'm open to doing so. Maybe I'll do the latter. The workflow does throw quite a few warnings, meaning that it could do with some much better error checking. I did the same with the f.lux workflow...

Share this post


Link to post

Unfortunately, Domainr changed their API. So, a rewrite is needed. The new version of the API also requires an API key, which means users will have to register for the API, etc... It's kind of a pain.

Share this post


Link to post

Unfortunately, Domainr changed their API. So, a rewrite is needed. The new version of the API also requires an API key, which means users will have to register for the API, etc... It's kind of a pain.

I'm not sure if anyone else would be... but if you did like a gofundme or something I'd totally pitch in. I'd love to have this tool updated :)

I'll even promote it to some people I know who'd use it :)

Share this post


Link to post

If anyone is interested. I resolved the issues. It works the same, except now we have to do two calls to the API end point because we're calling two different methods. So it may be a little slower. I submitted a pull request to @dingyi to get the official one updated.

 

Download it here

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...