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
"""This module contains the ``SeleniumMiddleware`` scrapy middleware""" | |
import asyncio | |
from pyppeteer import launch | |
from scrapy import signals | |
from scrapy.http import HtmlResponse | |
from twisted.internet import defer | |
from .http import PuppeteerRequest |
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
from billiard.context import Process | |
from scrapy.crawler import Crawler | |
from scrapy import signals | |
from scrapy.utils.project import get_project_settings | |
from twisted.internet import reactor | |
from celery_app import app | |
class CrawlerProcess(Process): |
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
# -*- coding: utf-8 -*- | |
import re | |
import dateparser | |
from scrapy import Request | |
from scrapy.spider import CrawlSpider | |
from urlparse import urljoin |
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 re | |
from scrapy import Request | |
from scrapy.spider import CrawlSpider | |
from urlparse import urljoin | |
class TripAdvisorSpider(CrawlSpider): |
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 | |
class LinkItem(scrapy.Item): | |
href = scrapy.Field() |