Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6886323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:44:41+00:00 2026-05-27T05:44:41+00:00

I am using CrawlSpider to crawl and extract data from a webpage. The start

  • 0

I am using CrawlSpider to crawl and extract data from a webpage.

The start url has only one link (which is a direct link) and from that link data has to be scraped (data is being successfully scraped if I use BaseSpider and give the direct link). However, when I run the CrawlSpider, it is getting some weired 301 request and control is not coming to parse_item() which does the scraping.

I have a localhost page called main_page.html which has a link to http://www.flipkart.com/office-supplies/pen/faber-castell/itmd4fpkgkd7e3fj?pid=pend4fpkyk2w9fd4&_l=U0SclLhlhi7jGPVIA8xWyA--&_r=tcVDd6I7AkBG9cR2hX21MA--&ref=5b471a78-5264-4e09-ba61-03f8965e10d0 which I think it a direct link. On running the crawl spider, I see the following output at scrapy-

2011-12-05 15:54:34+0530 [flipkart_spider] DEBUG: Crawled (200) http://localhost/main_page.html> (referer: None)
2011-12-05
15:54:35+0530 [flipkart_spider] DEBUG: Redirecting (301) to http://www.flipkart.com/office-supplies/pen/faber-castell/itmd4fpkgkd7e3fj?pid=pend4fpkyk2w9fd4&_l=U0SclLhlhi7jGPVIA8xWyA–&_r=tcVDd6I7AkBG9cR2hX21MA–&ref=5b471a78-5264-4e09-ba61-03f8965e10d0>
from http://www.flipkart.com/office-supplies/pen/faber-castell/itmd4fpkgkd7e3fj?_l=U0SclLhlhi7jGPVIA8xWyA–&_r=tcVDd6I7AkBG9cR2hX21MA–&pid=pend4fpkyk2w9fd4&ref=5b471a78-5264-4e09-ba61-03f8965e10d0>

I have a print statement in parse_item() which is not called. what is wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T05:44:42+00:00Added an answer on May 27, 2026 at 5:44 am

    I think you should remove everything after ? in your url so it will become: http://www.flipkart.com/office-supplies/pen/faber-castell/itmd4fpkgkd7e3fj

    Update:

    In most cases attributes in query string are only used for things that do not affect content, for example: from which page you came here, which menu item is active, session id. If you copy urls from your browser into crawler it is possible that some of arguments in url has something to do with your user-agent and give unpredictable results when the same url is opened with different agent.

    You will also save your self from lots of duplicate pages if you know which arguments are safe to be removed from url. Usually you can access same items from different categories, but every time the url of item will be different because argument ref= I think tells information from which page you came here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

using php, i have a sql query which works fine, dateentry only has the
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using mercurial, I've run into an odd problem where a line from one committer
Using Java, how can I extract all the links from a given web page?
I was wondering if anyone ever tried to extract/follow RSS item links using SgmlLinkExtractor/CrawlSpider.
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using C#, I need a class called User that has a username, password, active
Using Rails 3.2.0 with haml and sass: I Would like to link an external
Using jQuery, one can easily find out whether a particular element is visible using
Using Android TelephonyManager an application can obtain the state of data activity over the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.