askfmcrawler-0.1.5
توضیحات
Python askfm crawler.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | askfmcrawler-0.1.5 |
| نام | askfmcrawler |
| نسخه کتابخانه | 0.1.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | uehara1414 |
| ایمیل نویسنده | akiya.noface@gmail.com |
| آدرس صفحه اصلی | https://github.com/uehara1414/askfmcrawler |
| آدرس اینترنتی | https://pypi.org/project/askfmcrawler/ |
| مجوز | - |
# askfmcrawler
[](https://pypi.python.org/pypi/askfmcrawler)
Python askfm crawler.
## Install
```
pipenv install askfmcrawler
```
## Requirements
- Python 3.6 or higher
- selenium
## Usage
```python
from selenium import webdriver
from askfmcrawler import Crawler
driver = webdriver.Chrome('./chromedriver')
crawler = Crawler(driver)
# Crawl user questions
for article in crawler.crawl_user_questions('uehara1414test', limit=20):
print(article.question, " => ", article.answer)
# 好きなデザートは? => ガトーショコラ
# 赤信号なのに道路を渡ることはある? => ある
# ...
# Get random users and crawl questions of them
for user in crawler.crawl_random_users():
for article in crawler.crawl_user_questions(user):
print(user, article.question, " => ", article.answer)
driver.quit()
```
## Test
### Setup
- Install requiremnts with `pipenv install --dev`
- Place chromedriver to project root
### Run tests
```sh
pipenv run nosetests
```
نحوه نصب
نصب پکیج whl askfmcrawler-0.1.5:
pip install askfmcrawler-0.1.5.whl
نصب پکیج tar.gz askfmcrawler-0.1.5:
pip install askfmcrawler-0.1.5.tar.gz