test sessione condivisa

This commit is contained in:
marco
2019-12-06 18:29:43 +01:00
parent 406d003fd0
commit d64e3a6629
3 changed files with 13 additions and 7 deletions
Regular → Executable
+1 -1
View File
@@ -377,7 +377,7 @@ def scrape(func):
log('PATRON= ', patron)
if not data:
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data.replace("'", '"')
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True, session=item.session).data.replace("'", '"')
data = re.sub('\n|\t', ' ', data)
data = re.sub(r'>\s+<', '> <', data)
# replace all ' with " and eliminate newline, so we don't need to worry about