Skip to content

Instantly share code, notes, and snippets.

@akira02
Last active August 1, 2023 14:56
Show Gist options
  • Save akira02/cb213d46948b732aa92a4edf7a476bb9 to your computer and use it in GitHub Desktop.
Save akira02/cb213d46948b732aa92a4edf7a476bb9 to your computer and use it in GitHub Desktop.
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