how can i config scraper and crawl this articles?

60 views
Skip to first unread message

mighty wen

unread,
Aug 8, 2016, 11:42:42 AM8/8/16
to django-dynamic-scraper
First of all,Thanks for author sharing this resource.It's helpful. I Meet a question like that:
for example:
<div class="date">2016-1-1</div>
<div class="fruit" >
<ul>
<li><span class="name">apple</span><span class="price">1.23</span><span class="minute">11:12 AM</span></li>
<li><span class="name">Lemon</span><span class="price">2.12</span><span class="minute">11:13 AM</span></li>
.......
</ul>
</div>
<div class="date">2016-1-2</div>
<div class="fruit" >
<ul>
<li><span class="name">apple</span><span class="price">1.33</span><span class="minute">06:12 AM</span></li>
<li><span class="name">Lemon</span><span class="price">2.42</span><span class="minute">09:13 AM</span></li>
.......
</ul>
</div>
the question is :1、how can i config SCRAPER ELEMS for scrapy the data,i want the data like:
[{'Name':'Apple','Price':'1.21','DateTime':'2016-01-01 11:12' }......]
2、in the model i set only datetime for storage date,so how can i combine date and minute?
I read the code and can't find any perfect solution.
Reply all
Reply to author
Forward
0 new messages