This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from pprint import pprint | |
| import requests | |
| from bs4 import BeautifulSoup as BS | |
| import facebook | |
| class FbBaseCrawler(object): | |
| default_headers = { | |
| 'Accept' :'*/*', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| What industry do you want to find ? : football | |
| crawl_now123123 | |
| {'100002702009223': {'owner_name': 'Lê Hoàng Trung'}, '100014229676316': {'owner_name': 'Hoài Nam'}} | |
| Page 1 completed | |
| {'100014229676316': {'owner_name': 'Hoài Nam'}, '100002702009223': {'owner_name': 'Lê Hoàng Trung'}, '100009394937400': {'owner_name': 'Thuỳ Nguyên'}} | |
| Page 2 completed | |
| {'100014229676316': {'owner_name': 'Hoài Nam'}, '100003842806973': {'owner_name': 'Hữu Nhẫn Võ'}, '100002702009223': {'owner_name': 'Lê Hoàng Trung'}} | |
| Page 3 completed | |
| {'100002702009223': {'owner_name': 'Lê Hoàng Trung'}, '100002217636076': {'owner_name': 'Huỳnh Hanh Thông'}} | |
| Page 4 completed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from pprint import pprint | |
| from datetime import datetime | |
| import requests | |
| from facebook_user_crawler import FbBaseCrawler | |
| """ | |
| FbBaseCrawler can be found here https://gist.github.com/gearazk/7e5a7178dfdee70222bdeb9d8e8d155e | |
| """ | |
| class FbUserListCrawler(FbBaseCrawler): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import concurrent.futures | |
| from time import time | |
| def count_digits(input_str): | |
| count = {} | |
| for s in input_str: | |
| if s.isdigit(): | |
| count[s] = count.get(s, 0) + 1 | |
| return count |
OlderNewer