Skip to content

Commit

Permalink
Merge pull request #11 from Xarrow/search_name
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
Xarrow authored Dec 19, 2018
2 parents 5cd0753 + 61795c1 commit 248cf6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In general , we can inspect mobile site which has it's own API by Chrome.

```shell

$ pip install weibo-scraper
$ pip install weibo-scraper==1.0.7b0

```

Expand All @@ -45,7 +45,7 @@ $ pip install --upgrade weibo-scraper

```shell

$ pipenv install weibo-scraper
$ pipenv install weibo-scraper==1.0.7b0

```
Or Upgrade it.
Expand Down
6 changes: 3 additions & 3 deletions samples/tweets_persistence/tweets_persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import pickle

from weibo_scraper import get_formatted_weibo_tweets_by_name
from weibo_base import rt_logger
from weibo_base import rt_logger,logger,is_debug


DEFAULT_EXPORT_FILENAME = "export_%s" % int(time.time())
Expand Down Expand Up @@ -109,7 +109,7 @@ def execute_with_de(self, *args, **kwargs):

def persistence(self, *args, **kwargs):
# TODO function to AOP
if logging.getLogger().level == logging.DEBUG:
if is_debug:
self.execute_with_de(*args, **kwargs)
else:
self.action.execute(*args, **kwargs)
Expand Down Expand Up @@ -255,7 +255,7 @@ def execute(self):
def dispatch(name: str, pages: int = None, is_simplify: bool = True, persistence_format: str = "txt",
export_file_path: str = None, export_file_name: str = None, is_debug: bool = False):
if not is_debug:
logging.getLogger().setLevel(logging.ERROR)
logger.getLogger().setLevel(logging.DEBUG)
if persistence_format == 'txt':
pst = TxtPersistenceImpl(name=name, pages=pages, is_simplify=is_simplify, export_file_path=export_file_path,
export_file_name=export_file_name)
Expand Down

0 comments on commit 248cf6f

Please sign in to comment.