Skip to main content

Dcard crawler using asyncio(coroutine)

Project description

aiodcard
==============

Dcard crawler using asyncio(coroutine)


Feature
-------
| Get article list and content using coroutine


Dependencies
------------
* Python 3.3 and :mod:`asyncio` or Python 3.4+
* aiohttp


Installation
------------
::

python setup.py install

or

::

pip install aiodcard


Example
-------

::

import asyncio

import aiohttp
import aiodcard

@asyncio.coroutine
def get_funny_articles():
session = aiohttp.ClientSession()
forum_name = 'funny'
page_index = 1
result = yield from aiodcard.get_articles_of_page(session, forum_name, page_index)
print(result)

def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(get_funny_articles())

if __name__ == '__main__':
main()


Todo
----
* test all functions


Authors and License
-------------------
The ``aiodcard`` package is written by Chien-Wei Huang. It’s MIT licensed and freely available.

Feel free to improve this package and send a pull request to GitHub.

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

aiodcard-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file aiodcard-0.1.0.tar.gz.

File metadata

  • Download URL: aiodcard-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for aiodcard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10bdcb942518ffaf71fe90b329b297be3a72808a967f5d3ff1e628dad8a595cd
MD5 4ad6dc1599041bae8ca18392eee7014b
BLAKE2b-256 5bb795d2acd4c653082345d4b27169654d6ab104abb1d6280decda35910266fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page