Python askfm crawler.
Project description
# askfmcrawler
Python askfm crawler.
## Install(not work now)
```
pipenv install askfmcrawler
```
## Requirements
- Python 3.6 or higher
- selenium
## Usage
```python
from selenium import webdriver
from askfmcrawler.crawl 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)
```
Python askfm crawler.
## Install(not work now)
```
pipenv install askfmcrawler
```
## Requirements
- Python 3.6 or higher
- selenium
## Usage
```python
from selenium import webdriver
from askfmcrawler.crawl 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)
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
askfmcrawler-0.1.1.tar.gz
(2.1 kB
view details)
File details
Details for the file askfmcrawler-0.1.1.tar.gz
.
File metadata
- Download URL: askfmcrawler-0.1.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1edeab7d20dac1cdecef0f810eee878d18222bec7ba21d51333b5d3fcdc7eba |
|
MD5 | 542c720cea56d28aa6fa100cae0df139 |
|
BLAKE2b-256 | ecd2f511676288e6fafe3b713a134b88776b2c7e5dff17926ad5dc1d02f61aab |