Exemplo n.º 1
0
import requests
from brokest import queue

def count_words_in_page(url):
    resp = requests.get(url)
    return len(resp.text.split())

result = queue(count_words_in_page, 'http://www.google.com')
print result
Exemplo n.º 2
0
import requests
from brokest import queue


def count_words_in_page(url):
    resp = requests.get(url)
    return len(resp.text.split())


result = queue(count_words_in_page, "http://www.jeffknupp.com")
print result
Exemplo n.º 3
0
import requests
from brokest import queue


def count_words_in_page(url):
    resp = requests.get(url)
    return len(resp.text.split())


result = queue(count_words_in_page, 'http://www.google.com')
print result
Exemplo n.º 4
0
import requests
from brokest import queue

def count_words_in_page(url):
    resp = requests.get(url)
    return len(resp.text.split())

print queue(count_words_in_page, 'http://www.jeffknupp.com')
print queue(count_words_in_page, 'http://www.yahoo.com')