Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Download Tracker 1.0.7 — Minor update available for module download_tracker (1.0.7). Release: Directory2Block Slideshow 1.0.8 — Minor update available for module directory2block_slideshow (1.0.8). Release: Mautic Audiences 1.1.5 — Minor update available for module mautic_audiences (1.1.5). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: RightUp 1.0.2 — Minor update available for module rightup (1.0.2). Release: CronWatch 0.12.1 — Minor update available for module cronwatch (0.12.1). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

The Migrate Process JS Redirect Link module provides a Migrate process plugin to enable to enable you to request and extract a link from a inter-linked JS enabled redirect page commonly found on Google RSS feeds.

Background

e.g. Google will give a link like this on your rss feed:

https://news.google.com/rss/articles/CBMiVWh0dHBzOi8vd3d3LmxvbmRvbi1maXJ...

This page will typically contain a js redirect to:

https://www.london-fire.gov.uk/incidents/2023/january/maisonette-fire-st...

This module enables you to import the second link that comes without the inter-linked google page and cookie consent form etc. It also allows for imported links to show your site as a referrer rather than directing everything through Google.

Example 1

process:
  title: title
  'field_feed_item_description/format':
    plugin: default_value
    default_value: full_html
  'field_feed_item_description/value': summary
  'field_web_link/uri':
   -
     plugin: migrate_process_js_link
     source: link
  'field_web_link/title': title

Example 2 (with migrate_process_html)

process:
  'body/value':
   -
     plugin: migrate_process_js_redirect_link
     source: link
   -
     plugin: migrate_process_html
     jsredirect: false // to be deprecated
   -
     plugin: dom
     method: import
   -
     plugin: dom_select
     selector: //meta[@property="og:image"]/@content
   -
     plugin: skip_on_empty
     method: row
     message: 'Field image is missing'
   -
     plugin: extract
     index:
       - 0
   -
     plugin: skip_on_condition
     method: row
     condition:
       plugin: not:matches
       regex: /^(https?:\/\/)[\w\d]/i
     message: 'We only want a string if it starts with http(s)://[\w\d]'
   -
     plugin: file_remote_url

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jan 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.0 Stable Aug 21, 2024
1.0.x-dev Dev Jan 22, 2024