diff --git a/fbcrawl/__pycache__/__init__.cpython-37.pyc b/fbcrawl/__pycache__/__init__.cpython-37.pyc index 2b54685..79fc607 100644 Binary files a/fbcrawl/__pycache__/__init__.cpython-37.pyc and b/fbcrawl/__pycache__/__init__.cpython-37.pyc differ diff --git a/fbcrawl/__pycache__/items.cpython-37.pyc b/fbcrawl/__pycache__/items.cpython-37.pyc index 4006724..af6c834 100644 Binary files a/fbcrawl/__pycache__/items.cpython-37.pyc and b/fbcrawl/__pycache__/items.cpython-37.pyc differ diff --git a/fbcrawl/__pycache__/settings.cpython-37.pyc b/fbcrawl/__pycache__/settings.cpython-37.pyc index b18e5e5..f397cbc 100644 Binary files a/fbcrawl/__pycache__/settings.cpython-37.pyc and b/fbcrawl/__pycache__/settings.cpython-37.pyc differ diff --git a/fbcrawl/items.py b/fbcrawl/items.py index 360f41f..6e77c88 100644 --- a/fbcrawl/items.py +++ b/fbcrawl/items.py @@ -647,3 +647,6 @@ class EventsItem(scrapy.Item): start_date = scrapy.Field() end_date = scrapy.Field() description = scrapy.Field() + going = scrapy.Field() + interested = scrapy.Field() + shared = scrapy.Field() diff --git a/fbcrawl/spiders/__pycache__/__init__.cpython-37.pyc b/fbcrawl/spiders/__pycache__/__init__.cpython-37.pyc index ef2c244..fe83969 100644 Binary files a/fbcrawl/spiders/__pycache__/__init__.cpython-37.pyc and b/fbcrawl/spiders/__pycache__/__init__.cpython-37.pyc differ diff --git a/fbcrawl/spiders/__pycache__/comments.cpython-37.pyc b/fbcrawl/spiders/__pycache__/comments.cpython-37.pyc index 2e928fc..cf739aa 100644 Binary files a/fbcrawl/spiders/__pycache__/comments.cpython-37.pyc and b/fbcrawl/spiders/__pycache__/comments.cpython-37.pyc differ diff --git a/fbcrawl/spiders/__pycache__/fbcrawl.cpython-37.pyc b/fbcrawl/spiders/__pycache__/fbcrawl.cpython-37.pyc index 826194a..0ddfcb0 100644 Binary files a/fbcrawl/spiders/__pycache__/fbcrawl.cpython-37.pyc and b/fbcrawl/spiders/__pycache__/fbcrawl.cpython-37.pyc differ diff --git a/fbcrawl/spiders/events.py b/fbcrawl/spiders/events.py index da381e6..b3a2d3a 100644 --- a/fbcrawl/spiders/events.py +++ b/fbcrawl/spiders/events.py @@ -14,7 +14,8 @@ class EventsSpider(FacebookSpider): name = "events" custom_settings = { 'FEED_EXPORT_FIELDS': ['name','where','location','photo','start_date', \ - 'end_date','description'], + 'end_date','description', 'going', 'interested', \ + 'shared'], 'DUPEFILTER_CLASS' : 'scrapy.dupefilters.BaseDupeFilter', 'CONCURRENT_REQUESTS' : 1 } @@ -44,7 +45,7 @@ class EventsSpider(FacebookSpider): EVENT_COVER='/html/body/div/div/div[2]/div/table/tbody/tr/td/div[2]/div[1]/a/img/@src' GOING='/html/body/div/div/div[2]/div/table/tbody/tr/td/table/tbody/tr/td/div[2]/div[2]/div/div/div/div[2]/a/text()' INTERESTED='/html/body/div/div/div[2]/div/table/tbody/tr/td/table/tbody/tr/td/div[2]/div[2]/div/div/div[2]/div[2]/a/text()' - SHARED='/html/body/div/div/div[2]/div/table/tbody/tr/td/table/tbody/tr/td/div[2]/div[2]/div/div/div[3]/div[2]/a/text()' + SHARED='/html/body/div/div/div[2]/div/table/tbody/tr/td/table/tbody/tr/td/div[2]/div[2]/div/div/div[3]/div[2]/div/text()' date = response.xpath(DATE).extract_first() start_date = date.split('–')[0] or None end_date = date.split('–')[1] or None @@ -57,8 +58,8 @@ class EventsSpider(FacebookSpider): photo=response.xpath(EVENT_COVER).extract_first(), start_date=start_date, end_date=end_date, - description=response.xpath(EVENT_DESCRIPTION).extract_first() - going=response.xpath(GOING).extract_first() - interested=response.xpath(INTERESTED).extract_first() + description=response.xpath(EVENT_DESCRIPTION).extract_first(), + going=response.xpath(GOING).extract_first(), + interested=response.xpath(INTERESTED).extract_first(), shared=response.xpath(SHARED).extract_first() )