Im rusty on classes, and thus I dont understand how to properly
instantiate my own right now.
Here is the class
import scrapy class Se(scrapy.Spider): def parse(self, seach_engine, site_to_parse, page_start, page_end, response): seach_engine = [ 'se1.com', 'se2.com', ] site = str(seach_engine+site_to_parse) if site_to_parse == seach_engine: print("executing against se1!") elif site_to_parse == searh_engine: print("executing against se2!") else: print("Something bad happened.")
I've learned I can instantiate this class via terminal like
>>> from Scrapse import Se >>> s = Se.parse()
The problem is, for the first param (technically the second) for
search_engine i want to instantiate
s var for the first
indice value in
search_engine for se1.com.
How can i do this?