Hello,
I am a newbie to scrapy (and have little programming background). I want to learn scrapy fast and efficiently and believe start a project is the best way to learn. English is not my mother language so it sometimes makes me feel difficult. But I am trying my best to understand what I read on Tutorial and Stackoverflow. I hope I could be more pythonic and think like most scrapy users think. So if you have any suggestion, please feel free to let me know. If you come to Shanghai someday, I am very glad to buy you a cup of coffee and take you around.
2. for each links I scrape, I call def parse_shop to deal with it. "店名" means the name and “地址” means address. I also use regular expression for the address.
Above two steps are fine for me. However, when I export result to csv file, I found there are quite a few duplicates. I add a class in pipeline.py and activiate it according to
tutorial but doesn't work. What I got is:
exceptions.KeyError: 'id'. I have no idea what to do with it.
My code is below. Any thoughts are welcomed.