Created
August 21, 2020 05:32
-
-
Save eupendra/7ac89eb410e9d0067f52f950b1cf79d9 to your computer and use it in GitHub Desktop.
This file contains 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 scrapy | |
from .config import API | |
from scraper_api import ScraperAPIClient | |
client = ScraperAPIClient(API) | |
class ApiSpider(scrapy.Spider): | |
name = 'api' | |
def start_requests(self): | |
for i in range(5): | |
yield scrapy.Request(client.scrapyGet(url='http://httpbin.org/ip?i='+str(i))) | |
def parse(self, response): | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment