Skip to content

Instantly share code, notes, and snippets.

@akira02
Last active August 1, 2023 14:56
Get Melonbooks page infos with Google Sheets Named function

Get Melonbooks page infos with Google Sheets Named function

These Google Sheets functions can help you get infos from Melonbooks website. image

Get cover image of melonbooks:

Argument placeholders: url

=IMAGE(CONCAT("https:",IMPORTXML(IF(RIGHT(url,12)="adult_view=1", url, CONCAT(url,"&adult_view=1")),"(//figure[1]//img/@src)[1]")),1)

Get title of melonbooks:

Argument placeholders: url

=IMPORTXML(IF(RIGHT(url,12)="adult_view=1", url, CONCAT(url,"&adult_view=1")),"//h1")

Get price of melonbooks(number):

Argument placeholders: url

=VALUE(SUBSTITUTE(importxml(IF(RIGHT(url,12)="adult_view=1", url, CONCAT(url,"&adult_view=1")),"//span[contains(@class,'yen')]"),"¥",""))

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