Quantcast
Channel: uncategorized - Forum - FlexGet
Viewing all articles
Browse latest Browse all 376

Manipulate / -id-regexp problem

$
0
0

@softair wrote:

Tearing my hair out here. Trying to use flexget to automate downloading of some magazines, but stymied by (a) variety of date formats and (b) flexget's refusal to contemplate dates in the future (for reasons I don't fully understand). I have been looking at the suggestion elsewhere to use manipulate plugin to try and get some order, but am getting nowhere. Scanning a collection of files in a directory, a simple example...

   series_mag_test:
     series:
       settings:
         mag_month:
           identified_by: id
           id_regexp: (?i)(january|february|march|april|may|june|july|august|september|october|november|december).+(201[6-9])
       mag_month:
         - Digital SLR Photography

correctly locates Digital SLR Photography - December 2017.pdf and processes it.

However, if I try and manipulate the date, as per

  series_mag_test:
    manipulate:
      - title:
          replace:
            # <monthname> <year> case: truncate to three letter month name and reorder yyyy-mmm-dd
            regexp: (?P<mag>.+)\b(?P<month>jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec).+\b(?P<year>201[6-9])(?P<tail>.*)
            format:  \g<mag>\g<year>-\g<month>\g<tail>
      - title:
          replace:
            # <monthnumber>-<year> reorder yyyy-mmm
            regexp: (?P<mag>.+)\b(?P<month>[0[1-9]|1[0-2])\b.+(?P<year>201[6-9])(?P<tail>.*)
            format:  \g<mag>\g<year>-\g<month>\g<tail>
    series:
      settings:
        mag_month:
           id_regexp:
            - (?i)(201[6-9])-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)
            - (?i)(201[6-9])-(\b0[1-9]|1[0-2]\b)
      mag_month:
        - Digital SLR Photography

Flexget correctly reformats the title

2017-12-10 14:35 DEBUG    manipulate    copy_manual_mag_test field: `title` from_field: `title` field_value: `Digital SLR Photography - February 2017`
2017-12-10 14:35 DEBUG    manipulate    copy_manual_mag_test field `title` after replace: `Digital SLR Photography - 2017-Feb`

but then says it can't fine an id

2017-12-10 14:35 DEBUG    parser_internal copy_manual_mag_test Parsing series: `Digital SLR Photography - 2017-Feb` kwargs: {'identified_by': u'id', u'date_regexps': [], 'strict_name': False, 'name': u'Digital SLR Photography', 'prefer_specials': None, 'special_ids': [], 'alternate_names': [], u'sequence_regexps': [], 'date_dayfirst': None, u'id_regexps': [u'(?i)(201[6-9])-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)', u'(?i)(201[6-9])-(\\b0[1-9]|1[0-2]\\b)'], 'assume_special': None, 'name_regexps': [], 'date_yearfirst': None, 'allow_groups': [], u'ep_regexps': []}
2017-12-10 14:35 INFO     parser_internal copy_manual_mag_test Title `Digital SLR Photography - 2017-Feb` looks like series `Digital SLR Photography` but cannot find a(n) `id` style identifier.
2017-12-10 14:35 DEBUG    parser_internal copy_manual_mag_test Parsing result: <SeriesParser(data=Digital SLR Photography - 2017-Feb,name=Digital SLR Photography,id=None,season=None,season_pack=None,episode=None,quality=unknown,proper=0,status=INVALID)> (in 23.644 ms)

Closely followed by

2017-12-10 14:35 VERBOSE task copy_manual_mag_test REJECTED: Digital SLR Photography - 2017-Feb by require_field plugin because required field series_name is not present

Which suggests it is now trying to match a series name with a manipulated date in it.

Am I missing something blindingly obvious?

Alternatively, has anyone cracked downloading magazines with variably formatted future dates by some other means?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 376

Trending Articles