0
a=1964
for yea in range(1964,2018):
  class StackSpider(Spider):
    name = "stack2"
    allowed_domains = ["melon.com","youtube.com"]
    global n
    start_urls = ['https://www.melon.com/chart/age/list.htm?chartType=YE&chartGenre=KPOP&chartDate='+str(i),                                    ]

start_urls is https://www.melon.com/chart/age/list.htm? 
chartType=YE&chartGenre=KPOP&chartDate=2017 Only start

The variable i should also be used in def of the code added below. How is it possible?

GhostCat
  • 137,827
  • 25
  • 176
  • 248
  • Welcome to Stack Overflow! Other users marked your question for low quality and need for improvement. I re-worded/formatted your input to make it easier to read/understand. Please review my changes to ensure they reflect your intentions. But I think your question is still not answerable. **You** should [edit] your question now, to add missing details (see [mcve] ). Feel free to drop me a comment in case you have further questions or feedback for me. – GhostCat Sep 20 '18 at 07:23
  • You want others to spend their time to help you with your problem. So you please all the time required to come up with a proper, clear, precise question. Your source code looks really dubious. So, please have a second look and make sure you provide input we can help with! – GhostCat Sep 20 '18 at 07:23

1 Answers1

0

You can use start_requests method instead of start urls. To read more about the precise way to use this method, I'd suggest you to visit this link.