Skip to content

WARC: from_response incompatible with Requests>=1.0.0 #13

@ersi

Description

@ersi

Description/Summary

Seems like warc-0.2.1 is incompatible with requests>=1.0.0. All that needs to be changed is to strip 'full' from 'full_url' and everything will work just fine again.

Environment details:

Python 2.7
warc 0.2.1
Requests 1.0.4

Example code

#!/usr/bin/python
import warc, requests

print warc.WARCRecord.from_response(requests.get("http://archive.org"))

Traceback

>>> warc.WARCRecord.from_response(requests.get("http://archive.org"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ersi/venv/lib/python2.7/site-packages/warc/warc.py", line 240, in from_response
    "WARC-Target-URI": response.request.full_url.encode('utf-8')
AttributeError: 'PreparedRequest' object has no attribute 'full_url'

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