From acd29067f55caeb46d359407becf94d850abde4f Mon Sep 17 00:00:00 2001 From: jarbasal Date: Wed, 18 Apr 2018 17:51:41 +0100 Subject: [PATCH] SEARCH --- pyerowid/__init__.py | 6 +----- readme.md | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pyerowid/__init__.py b/pyerowid/__init__.py index 40a7a58..b31d312 100644 --- a/pyerowid/__init__.py +++ b/pyerowid/__init__.py @@ -187,11 +187,7 @@ class Erowid(object): report["substance"] = fields[2].getText() report["date"] = fields[3].getText() report["url"] = base_url + r.find("a")["href"] + report["exp_id"] = report["url"].split("=")[1] reports.append(report) return reports - -reports = Erowid.search_reports("1P-LSD") -print reports[0].keys() -for report in reports[:5]: - print report["substance"], report["url"], report["date"] \ No newline at end of file diff --git a/readme.md b/readme.md index 1ce9531..2cba205 100644 --- a/readme.md +++ b/readme.md @@ -51,7 +51,7 @@ searching experience reports output - ['date', 'url', 'substance', 'name', 'author'] + ['substance', 'name', 'author', 'url', 'date', 'exp_id'] 1P-ETH-LAD https://erowid.org/experiences/exp.php?ID=109647 Dec 9 2016 1P-LSD https://erowid.org/experiences/exp.php?ID=108914 Aug 1 2016 1P-LSD https://erowid.org/experiences/exp.php?ID=108138 Mar 16 2016