Skip to content

Form plugin says "Unable to post login form" #1576

Description

@adamwinn

Expected behaviour:

Form plugin executes commands and succeeds

Actual behaviour:

Form plugin says "Unable to post login form"

Steps to reproduce:

Be on flexget 2.8.6.
Use form plugin with below config
Form plugin will say "Unable to post login form"
Note: I downgraded to flexget 2.6.1 and it works great, so something broke recently.

Config:

templates:

  transmission:
    transmission:
      host: localhost
      port: 9091
      username: ****
      password: ****

tasks:
  tyt_highlight_shows:
    form:
      url: http://tenyardtracker.com/members.php?action=login
      username: ****
      password: ****
    html:
      url: http://tenyardtracker.com/browse.php?page=0  #the browse homepage is listed in order by upload date
      title_from: link
    regexp:
      accept:
        - The.Blitz
        - Football.Night.in.America
        #- College.Football.Final
        #- College.Gameday
        - Inside.the.NFL
        - Monday.QB
        - GameDay.Highlights
      reject:
        - french
    #quality:
    #  - 720p
    urlrewrite:
      sitename:
        regexp: details.php\?id=(?P<id>\d+).*
        format: download.php?torrent=\g<id>
    template:
      - transmission
    transmission:
      path: /Volumes/TV
      ratio: 1.0
      bandwidthpriority: 1

Log:

http://pastebin.com/vsGWG37F

Additional information:

  • Flexget Version: 2.8.6
  • Python Version: 2.7.12
  • Installation method: pip
  • OS and version: macOS 10.12.2
  • Link to crash log: http://pastebin.com/vsGWG37F

Activity

  1. adamwinn commented on Dec 19, 2016

    @adamwinn
    Author

    Using the latest build (2.8.7.dev), I now get:

    2016-12-18 21:37 INFO     ipc.rpyc                      server started on [127.0.0.1]:61680
    2016-12-18 21:37 DEBUG    task          tyt_highlight_shows executing tyt_highlight_shows
    2016-12-18 21:37 DEBUG    template      tyt_highlight_shows Merging template transmission into task tyt_highlight_shows
    2016-12-18 21:37 INFO     transmission  tyt_highlight_shows Trying to connect to transmission...
    2016-12-18 21:37 INFO     transmission  tyt_highlight_shows Successfully connected to transmission.
    2016-12-18 21:37 DEBUG    urlrewrite    tyt_highlight_shows Added rewrite sitename
    2016-12-18 21:37 DEBUG    formlogin     tyt_highlight_shows Exception posting login form.
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/FlexGet-2.8.7.dev0-py2.7.egg/flexget/plugins/operate/formlogin.py", line 66, in on_task_start
        br.open(url)
      File "/usr/local/lib/python2.7/site-packages/mechanize/_mechanize.py", line 203, in open
        return self._mech_open(url, data, timeout=timeout)
      File "/usr/local/lib/python2.7/site-packages/mechanize/_mechanize.py", line 230, in _mech_open
        response = UserAgentBase.open(self, request, data)
      File "/usr/local/lib/python2.7/site-packages/mechanize/_opener.py", line 204, in open
        response = meth(req, response)
      File "/usr/local/lib/python2.7/site-packages/FlexGet-2.8.7.dev0-py2.7.egg/flexget/plugins/operate/formlogin.py", line 29, in http_response
        response.set_data(soup.prettify())
      File "/usr/local/lib/python2.7/site-packages/mechanize/_response.py", line 288, in set_data
        cache.write(data)
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xbb' in position 981: ordinal not in range(128)
    2016-12-18 21:37 CRITICAL formlogin     tyt_highlight_shows Unable to post login form
    2016-12-18 21:37 WARNING  task          tyt_highlight_shows Aborting task (plugin: form)
    2016-12-18 21:37 DEBUG    task_queue                    task tyt_highlight_shows aborted: TaskAbort(reason=Unable to post login form, silent=False)
    2016-12-18 21:37 DEBUG    task_queue                    task queue shut down
    2016-12-18 21:37 INFO     ipc.rpyc                      listener closed
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions