Database |> Language |> Keywords |> Assignable |> 

RENDER

Contents

Definition

There may be times when you’d like to leverage mobile rendering as part of dealing with antiscraping measures. If you’d like to leverage code that more fits the vibe of “use a thing and call it a day”, then the RENDER assignable keyword is what you’re looking for. If you’re interested in emulating a certain device, then check out our DEVICE assignable keyword.

Usage

To indicate that you’d like to have pages in the traverser render while emulating a mobile device, assign MOBILE to the RENDER keyword like so:

RENDER <| MOBILE |

What this does is emulates the iPhone 6 specifically or, in more precise form, is effectively doing this under the hood.

DEVICE <| iPhone 6 |

Example

For a code example that assigns to the RENDER keyword, let’s say we were interested in retrieving trending repositories from GitHub. Below is how we’d do so while rendering the page as though it were a mobile device:

RENDER <| MOBILE |

gh_trending <| https://github.com/trending |
repository <| article.Box-row |
repository_name <| a.Link |

FROM gh_trending
|> GROUP BY repository
|> SELECT repository_name

Related: