Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Scraper for multiple scam number sites

Project description

ScamNumberScraper

Installation

pip install scamnumberscraper

Sources

List

Page

Search (details)

Model

This project uses many providers

For all providers, we can identify 3 kinds of provider

  • ScamNumberPageScraper : Website that uses a pagination system, each page display an list of scam number
  • ScamNumberListScraper : Website that display all scam numbers on a single page
  • ScamNumberSearchScraper : Website that use an search system, scrape the details page to get more informations like owner, list of comment, etc. (depend on the provider)

Screenshot

Usage

ScamNumberListScraper

import scamnumberscraper

scraper = scamnumberscraper.FauxNumerosScraper()

numbers = scraper.list()

for number in numbers:
    print(number)

"""

0796242217
0126534579
0185326870
0190005999

...

"""

ScamNumberPageScraper

:boom: Make sure to make an pause between all requests like with time.sleep(), some websites can detect bot and block other requests :boom:

import time

import scamnumberscraper

scraper = scamnumberscraper.DixHuitScraper()

for index in range(1, scraper.count() + 1):
    page = scraper.page(index)
    print(page)
    time.sleep(2)

"""

['0559989827', '0559989827', '0559989827', '0559989827', '0681269661', '0531483000', '0771722270', '0899566300', '0642499488', '0642499488']

...

"""

page = scraper.page(42)
print(page)

"""

['0669349263', '00359095673', '0180818903', '0706234221', '0899379624', '0805714011', '0322191813', '0495854641', '0385807285', '0141911453']

"""

ScamNumberSearchScraper

import scamnumberscraper

scraper = scamnumberscraper.DixHuitScraper()

print(scraper.search("0559989827"))

"""

"""

TODO

  • Fix encoding (git bash)
  • Rest of Search
  • Better NumberDetails model ?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for scamnumberscraper, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size scamnumberscraper-0.0.4.tar.gz (8.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page