This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
start [2017/10/27 08:25] zoza [Scraping and mining Dezeen articles] |
start [2017/10/27 08:25] zoza [Scraping and mining Dezeen articles] |
||
---|---|---|---|
Line 32: | Line 32: | ||
It is also important to declare fields in pages that will be scraped. This is done in the dezeen/items.py file, using eg (the Class is already declared when you start project). | It is also important to declare fields in pages that will be scraped. This is done in the dezeen/items.py file, using eg (the Class is already declared when you start project). | ||
- | <code>Class DezeenItem(Item): | + | <code python>Class DezeenItem(Item): |
title = Field() | title = Field() | ||
link = Field() | link = Field() | ||
Line 38: | Line 38: | ||
</code> | </code> | ||
- | These fields will be later used as part of the item dictionary (e.g. item['link'] | + | These fields will be later used as part of the item dictionary (e.g. item['link']) |
====== DOCTORAL RESEARCH ====== | ====== DOCTORAL RESEARCH ====== |