use <link> tag to extract the relative post url, fixes #37

The <id> tag does not necessarily contains the full URL, but also
relative URLs:

    <id>http://example.com/foo/bar.html</id>
    <id>/foo/bar.html</id>
    <id>foo/bar.html</id>
This commit is contained in:
Martin Zimmermann 2013-11-16 20:30:48 +01:00
parent 89ffe98106
commit 5e7ee3dffd

View File

@ -30,7 +30,7 @@ comments = set([])
def insert(db, thread, posts):
path = urlparse(thread.find('%sid' % ns).text).path
path = urlparse(thread.find('%slink' % ns).text).path
remap = dict()
if path not in db.threads: