Giter Club home page Giter Club logo

askfm.py's Introduction

askfm.py Test PyPI version

Ask.fm crawler

WARNING: this library is no longer maintained

askfm.py is no longer maintained. Please consider using other library if you want to crawl ask.fm.

Install

$ pip install askfm.py

Example

This program shows recent 25 answers of ezoeryou.

import askfm
crawler = askfm.Crawler('ezoeryou')

for pair in crawler.crawl():
  print(pair.question, '->', pair.answer)

Document

askfm.Crawler(username)

Initializes ask.fm crawler.

  • username: the username you want to crawl answers.

askfm.Crawler.crawl(page)

Fetches at most 25 answers and returns iterator of list of answers.

  • page: the offset page. The default value is 0, this means crawing at the top of answers.

askfm.Crawler.pager(page)

A generator that yields askfm.Crawler.crawl(page) continuously. Uses like this:

# offset_page is given
for page in crawler.pager(offset_page):
  for pair in page:
    print(pair.question, pair.answer)
  • page: the offset page. The default value is 0, this means crawing at the top of answers.

askfm.Answers

An iterator of continuous askfm.Pair objects.

askfm.Pair

An object representing for pair of question and answer. You can get them with askfm.Pair.question and askfm.Pair.answer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.