Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scrapy
- from scrapy_requests import HtmlRequest
- cookies = {my_cookies}
- class RusSpider(scrapy.Spider):
- name = 'rus'
- def __init__(self):
- self.start_time = time.time()
- def start_requests(self):
- url = 'https://www.rusprofile.ru/id/2088578'
- yield HtmlRequest(
- url=url,
- callback=self.parse_company,
- cookies=cookies,
- )
- def parse_company(self, response):
- page = response.request.meta['page']
- html = page.html
- print(html.xpath('//a[@itemprop="email"]/@href'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement