crawler: stop at first alternative link
Should save a few ms and the first one is usually (?) the most relevant/genericmaster
parent
325a373e3e
commit
8187876a06
|
@ -252,6 +252,7 @@ class AlternateHandler(BaseHandler):
|
||||||
resp.code = 302
|
resp.code = 302
|
||||||
resp.msg = 'Moved Temporarily'
|
resp.msg = 'Moved Temporarily'
|
||||||
resp.headers['location'] = link.get('href')
|
resp.headers['location'] = link.get('href')
|
||||||
|
break
|
||||||
|
|
||||||
fp = BytesIO(data)
|
fp = BytesIO(data)
|
||||||
old_resp = resp
|
old_resp = resp
|
||||||
|
|
Loading…
Reference in New Issue