Get info from a web page


How to get info from a web page using hubl variables?


Hi @cgrodriguez

What information are you looking to get from your pages? HubL tokens are used to display information on a web page (the full reference for HubL is here), not get data for the page.


Using following code we get information from a blog:

{% set posts = blog_recent_posts('3983717838', 4) %}
{% for content in posts %}
    {{ }}
{% endfor %}

Can I get data from another web site with similar code?


The only data that can be pulled from an external site using HubL would be from an RSS feed. You can use an RSS listing module to display data from any RSS feed (including one from an external site).


We’re using this method but are having issues displaying the featured_image. This is our HubL module implementation:

{% rss_listing "my_rss_listing" rss_url='{{ widget.rss_url }}', publish_date_text='posted at', click_through_text='Read more', show_date=True, include_featured_image=True, overrideable=False, publish_date_format='short', show_detail=True, show_author=True, number_of_items='{{ widget.count }}', is_external=True, title='', label='RSS Listing', limit_to_chars='200', attribution_text='by' %}

This is what our <item> looks like:

      <title><![CDATA[THIS IS THE TITLE]]></title>
      <description><![CDATA[This is the description]]></description>
      <media:content url="" type="image/jpeg"/>
      <pubDate>Wed, 14 Sep 2016 16:00:58 -0500</pubDate>


I am having the same issue with the image. When creating a Custom Module only the title and description shows up, but when using HS preset modules on an email, the image shows up:

  1. Create new EMAIL with RSS feed:

  2. Email RSS module has Title and Description. My image is a DIV inside the RSS description feed and it shows up just fine:

BUT, creating a page template and a custom RSS feed with ncivan example:

Then the image does not show at all: