Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Spider
- import json
- import base64
- import scrapy
- import requests
- import logging
- from tutorial.items import ProxyTestItem
- from scrapy_splash import SplashRequest
- class SplashSpider(scrapy.Spider):
- http_user = '5b0056be4659470ab4aaabfaf71239b1'
- http_pass = ''
- name = "proxy_test"
- download_delay = 2
- start_urls = [ "http://scrapinghub.com" ]
- def start_requests(self):
- for url in self.start_urls:
- splash_args = {
- 'html': 1,
- 'png': 1,
- 'width': 600,
- 'render_all': 1,
- }
- yield SplashRequest(url, self.parse, endpoint='render.html', args=splash_args)
- def parse(self, response):
- print(logging.info(response.text))
- print('HELLOOOOOOOOOOOO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement