Extract title from URL in TEXT format

Hello,

I am new to the CODA community.
I have been studying how CODA works for several days.

I have a question that is certainly easy for some.

Column A = URL (URL format) = Data that I insert manually = www.google.fr
Column B = URL (Format Title) = Title generated automatically via the URL present in column A = GOOGLE

The problem is :
When I want to call on the value of column B, the URL (www.google.fr) is sent (at the end of the chain, the value comes from column A).

I want the returned value to be the URL title in “TEXT” format
Therefore I say to myself, perhaps, that I have to put column B in “Text” format and insert a formula to extract the title from a URL.

From there I’m stuck, I haven’t found an adequate formula.

A little help would be appreciated.

Thanks in advance.

Dear @Coda_Whim, welcome to the Coda Make Community :building_construction:

1 Like

Hello,

Sorry for the delay, thanks for the answer, but that doesn’t really answer the question.

When we put a column with the “URL format” with the display option “Title”, it is displayed the title of the web page and not the URL.

Example
I enter:
"https://community.coda.io/t/extract-title-from-url-in-text-format/29409"

I see this text:
"Extract title from URL in TEXT format"

I would like to be able to manipulate this text in another column, but the returned value is the URL, it is the title of the web page that interests me.

I am still looking for a solution.

thanks in advance
Cordially.

Hey @Coda_Whim ,
very good question actually.

Just to make sure we talk about the same thing:

1. There is HTML Title of a Website

Bildschirmfoto 2022-04-26 um 08.35.17
Like “Coda Maker Community”. Ths is an information in the head element of a website and stored in the same way for all websites. To access this part, you’d somehow need to open the website/fetch the html from the website.
The Coda Link Column (and Cards etc) fetches this information for you and shows it in the Coda UI. BUT there is no way I know of, to extract this information in Coda outside a URL column or Card. Not even with “Black Magic”, because even in the object of a Link Column you can only find the url, not the title.

Bildschirmfoto 2022-04-26 um 08.48.17

2. There can be a “Speaking URL” segment in an url

Bildschirmfoto 2022-04-26 um 08.42.59
For SEO and UI reasons, URLs often show some readable information. In many cases, a website uses the same information as the title, but this is highly individual. Some URLs have multiple “speaking” segments.

Theoretically you can parse this information. E.g. to get the segment from a community link, you can do it with

thisRow.URL.ToText().Split("/").Nth(5).Regexreplace("-", " ")

BUT this formula only works for links from the Coda Community and you will need a different formula for different websites.

Conclusion:
What sounds like a simple task (especially since you see the title in the column already!) is actually not easy to pull off.

As far as i know: If you want to get the speaking url segment from URLs that are always build in the same way, you can do it. If you want the speaking segment from multiple websites or even the HTML title, I don’t think you can do it right now.

You can post a feature request in the Suggestion Box!

4 Likes

Thank you for the answer.

Indeed, I want to retrieve the title which is stored in the HTML page, as it is done with a URL column with the display “Title”.

The “Wikipedia” package can create columns based on the structure of wikipedia pages.
See result below.

It only works with wikipedia URLs, but the data in the “Title” column is retrievable, for example, with a named formula.

I didn’t think it was so difficult to retrieve a result already stored in memory, display in a URL column with the “Title” display.

Cordially.

1 Like

Hey @Coda_Whim
yeah that is a third case but technically very different to the two mentioned cases last time.

The Wikipedia pack is reading data from the Wikipedia API and returns an Object with a lot of information. The title is also fetched from the API, not from the weblink. The title of the link would always have a „ - Wikipedia“ at the end while the title in the pack only shows the article title.

The regular link column fetches the title directly from the link and does not create an object out of it.

I created a suggestion now:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.