GithubHelp home page GithubHelp logo

scrape-do / python-sample Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 123 KB

Best Rotating Proxy & Scraping API Alternative. Python Example.

Home Page: https://scrape.do

Python 100.00%
captcha crawler crawlers data-mining data-science data-scraping freeproxy freeproxylist proxy proxy-list

python-sample's Introduction

Scrape.do python-sample

scrape.do

Web Scraper API

You can send request to any webpages with proxy gateway & web api provided by scrape.do. As you can see from the example, this takes only few lines of code

You can see Example here (test.py)

Usage

first you need to create python_sample as python-sample

and use python_sample class to handle scrape.do api's

from python_sample_scrape_do import Scrape_do_Exception, python_sample

API_TOKEN = "Your_API_TOKEN_FOR_scrape.do"

# create an python-sample object
sample = python_sample()

# set the scrape.do api key
sample.set_api_token(api_token=API_TOKEN)

# Get Scrape.do account statistics
try:
    resp = sample.account_status()
    print("Response Type " + str(type(resp)))
    print(resp)
except ConnectionError as e:
    print(str(e))
    print(traceback.format_exc())

except Scrape_do_Exception as e:
    print(str(e))
    print(traceback.format_exc())

try:
    resp = sample.create_request_url(url='https://docs.scrape.do/', method="GET", payload={}, headers={},
                                     render=False, super_proxies=False, geo_code=None)
    print(resp)
except ConnectionError as e:
    print(str(e))
    print(traceback.format_exc())

except Scrape_do_Exception as e:
    print(str(e))
    print(traceback.format_exc())

Screenshot


python-sample



python-sample's People

Contributors

mertbekci avatar

Stargazers

 avatar

Watchers

 avatar

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.