Topic: https://brettterpstra.com/2011/08/27/auto-link-text-service-updated/
hide preview

What's next? verify your email address for reply notifications!

Lri 13y, 205d ago

I don't know if it's intentional, but the output links aren't separated by newlines if the input has multiple lines.

The Bing API seems to get the locale automatically from the IP address or something. It can be overridden with a parameter like mkt=en-US.

Yeah and I'm using these with a text filter script: Get a lucky link via Google AJAX API, scrape osx.iusethis for an app website link — Gist

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 13y, 205d ago

The script is intended to run on inline links, so inserting line breaks in the output would break sentences. It's not really intended to run on multiple lines, although it kind of works...

I'll check out the text filters, looks cool.

hide preview

What's next? verify your email address for reply notifications!

Dr. Drang 13y, 206d ago

I'm curious why you're not using Google for the lucky search result. I've had a lucky link command in TextMate for ages based on this little script by Haris Skiadas. I'm sure it could be adapted into a Service.

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 13y, 206d ago

<ol>
<li>The results are rarely what I'm looking for, for whatever reason. For example, when I run it on "Marked.app," Bing/Yahoo return markedapp.com, Google returns the Android Marketplace.</li>
<li>Google doesn't have an official API that's nearly as robust as Bing or Yahoo's former API (that I know of, I haven't looked for a while). Granted, for this particular purpose that's mostly irrelevant, but as a general rule I stick to API's and prefer not to scrape.</li>
</ol>

hide preview

What's next? verify your email address for reply notifications!