From da959f80c8b3fa8908b5a56cda31eac4a4225141 Mon Sep 17 00:00:00 2001 From: Son Nguyen Kim Date: Thu, 28 Jan 2016 11:56:06 +0100 Subject: [PATCH] fix README fix config file and iteration code --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c6c082c6..d0844cff 100644 --- a/README.md +++ b/README.md @@ -244,11 +244,11 @@ def basic_usage(): # See in the config.cfg file for possible values config = { 'SCRAPING': { - 'use_own_ip': 'True', - 'keyword': 'Let\'s go bubbles!', + 'use_own_ip': 'True', 'search_engines': 'yandex', 'num_pages_for_keyword': 1 }, + 'keyword': 'Let\'s go bubbles!', 'SELENIUM': { 'sel_browser': 'chrome', }, @@ -263,12 +263,10 @@ def basic_usage(): print(e) # let's inspect what we got - - for search in sqlalchemy_session.query(ScraperSearch).all(): - for serp in search.serps: - print(serp) - for link in serp.links: - print(link) + for serp in sqlalchemy_session.serps: + print(serp) + for link in serp.links: + print(link) # simulating a image search for all search engines that support image search