Error when trying to enter links

11 views
Skip to first unread message

Dc1981

unread,
Jul 20, 2015, 4:20:26 PM7/20/15
to scrapy...@googlegroups.com
Hello I am building a scraper that will download game titles and console. I am trying to go to the next page however, when I set my rules I am getting an error in my terminal. 
line 22
    def parse(self, response):
      ^
 I have placed my code in paste bin http://pastebin.com/fkmPSwPy. Any help will be greatly appreciated. FYI I am using scrapy .24.

Travis Leleu

unread,
Jul 20, 2015, 5:58:08 PM7/20/15
to scrapy-users
You appear to be missing a right parenthesis to close the rules tuple.

--
You received this message because you are subscribed to the Google Groups "scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scrapy-users...@googlegroups.com.
To post to this group, send email to scrapy...@googlegroups.com.
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

David Carlo

unread,
Jul 21, 2015, 1:29:03 PM7/21/15
to scrapy-users
Thank you! I didnt catch that. I fixed it however, I am now getting NameError: name 'Rule' is not defined I have no idea what I am doing wrong. I wrote another spider very similar to this and it worked. What I am trying to accomplish is have the spider go into the link continue crawling to the next page. Eventually I would like it to go into the game links as well. 

--
You received this message because you are subscribed to a topic in the Google Groups "scrapy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scrapy-users/MA6J5CKxOXE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scrapy-users...@googlegroups.com.

To post to this group, send email to scrapy...@googlegroups.com.
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.



--
Sincerely
David B Carlo
Owner - Colossal Point LLC
Phone: (954) 849-3588
Web Site: www.colossalpoint.com

Travis Leleu

unread,
Jul 21, 2015, 6:33:10 PM7/21/15
to scrapy-users
You need to import the Rule class.  Check your import statements in your working spider, should find one that says something like (note: this probably is incorrect so don't copy it!) "from scrapy.contrib import Rule"
Reply all
Reply to author
Forward
0 new messages