I want to use the Python Scrapy module to scrape all the URLs from my website and write the list to a file. I looked in the examples but didn’t see any simple example to do this.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Here’s the python program that worked for me:
Save this in a file called
spider.py.You can then use a shell pipeline to post process this text:
This gives me a list of all the unique urls in my site.