Workaround for missing search_rss jinga replacement

I’ve been running flexget for a while using rss for series and discover for movies.
I’m now trying to add nzbget capability, but first I need to search for nzb’s. I subscribe to nzbgeek, which does not have a dedicated plugin (perhaps I can develop one), but that shouldn’t be a problem if I use rss_search with jinja replacement, but current capability only provides access to {{ search_term }}.

I was able to overcome this limitation by making a copy of ‘…/components/sites/sites/rss.py’
I renamed it ‘my_rss.py’, renamed the class to ‘MySearchRSS’ (line 13), and updated the plugin register to ‘my_search_rss’ (line 48).

Then, I replaced the following code at line 24 with ‘imdb_id’ instead of ‘title’

        search_strings = [
            quote(normalize_unicode(s).encode('utf-8'))
            for s in entry.get('search_strings', [entry['imdb_id']])

Obviously, this requires imdb_id to be present, but it seems to do the trick.

I’m using it with movie list.

config:

  nzbgeek_search:
    discover:
      limit: 10
      what:
        - movie_list: imdb_movies
      from: 
        - my_search_rss: "https://api.nzbgeek.info/rss?dl=1&imdb={{ search_term }}&num=10&r=<private>"
    quality: 720p+ !cam
    content_size:
      min: 500
      max: 2500
      strict: no
    sort_by: size
    list_match:
      from:
        - movie_list: imdb_movies
    metainfo_movie: yes
    imdb_lookup: yes
    manipulate:
      - title:
          replace:
            regexp: ' - '
            format: ''
      - title:
          replace:
            regexp: ': '
            format: ''
      - title:
          replace:
            regexp: '\s+'
            format: '.'
    nzbget:
      url: http://nzbget:<private>@localhost:6789/xmlrpc
      category: movies