Changeset 45125


Ignore:
Timestamp:
01/12/21 21:36:30 (16 months ago)
Author:
obi
Message:

fix helpers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/mediathek/localhoster/lib/helpers.py

    r45124 r45125  
    3838
    3939    for i, form in enumerate(re.finditer(pattern, html, re.DOTALL | re.I)):
    40         common.logger.log(form.group(1))
     40#        common.logger.log(form.group(1))
    4141        if index is None or i == index:
    4242            for field in re.finditer('''<input [^>]*type=['"]?hidden['"]?[^>]*>''', form.group(1)):
     
    5454                        hidden[name.group(1)] = value.group(1)
    5555
    56     common.logger.log_debug('Hidden fields are: %s' % (hidden))
     56#    common.logger.log_debug('Hidden fields are: %s' % (hidden))
    5757    return hidden
    5858
    5959
    6060def pick_source(sources, auto_pick=None):
    61     if auto_pick is None:
    62         auto_pick = common.get_setting('auto_pick') == 'true'
     61#    if auto_pick is None:
     62#        auto_pick = common.get_setting('auto_pick') == 'true'
    6363
    6464    if len(sources) == 1:
     
    100100            sources.sort(key=lambda x: int(re.sub(r"\D", "", x[0])), reverse=True)
    101101        except:
    102             common.logger.log_debug(r'Scrape sources sort failed |int(re.sub("\D", "", x[0])|')
     102            dummy = 1
     103#            common.logger.log_debug(r'Scrape sources sort failed |int(re.sub("\D", "", x[0])|')
    103104            try:
    104105                sources.sort(key=lambda x: re.sub("[^a-zA-Z]", "", x[0].lower()))
    105106            except:
    106                 common.logger.log_debug('Scrape sources sort failed |re.sub("[^a-zA-Z]", "", x[0].lower())|')
     107                 dummy = 1
     108#                common.logger.log_debug('Scrape sources sort failed |re.sub("[^a-zA-Z]", "", x[0].lower())|')
    107109    return sources
    108110
     
    158160
    159161        matches = zip(labels, streams) if six.PY2 else list(zip(labels, streams))
    160         if matches:
    161             common.logger.log_debug('Scrape sources |%s| found |%s|' % (regex, matches))
     162#        if matches:
     163#            common.logger.log_debug('Scrape sources |%s| found |%s|' % (regex, matches))
    162164        return matches
    163165
     
    183185    source_list = list(set(source_list))
    184186
    185     common.logger.log(source_list)
     187#    common.logger.log(source_list)
    186188    source_list = sort_sources_list(source_list)
    187189
Note: See TracChangeset for help on using the changeset viewer.