scrapinghub / portia

Visual scraping for Scrapy
BSD 3-Clause "New" or "Revised" License
9.3k stars 1.4k forks source link

Bug when clicking "copy" on a spider. #715

Closed SeanBannister closed 7 years ago

SeanBannister commented 7 years ago

I'm currently using Portia on ScrapingHub, when you click copy...

image

The copy button breaks and nothing happens...

image

Using Chrome 56.0.2924.87 (64-bit)

ruairif commented 7 years ago

Hi Sean. Is this your only project in Scrapinghub or do you have another project that you are trying to copy it to?

SeanBannister commented 7 years ago

Hi, yes this is my only project, I presumed this would create a copy of the spider in the current project which I could work from. I'll try creating another project.

SeanBannister commented 7 years ago

Ahh yes, creating a second project works, I can copy to another project but I can't create a duplicate in the current project. I'm new to portia so maybe copying in the same project doesn't make any sense, the reason I was using this feature was to create a temporary backup.

ruairif commented 7 years ago

If you publish before making edits to a spider you can discard the changes to restore the spider to its previous state. If you want to test the modified spider you can press the run button and it will run the edited spider so you can see if it crawls as expected or not. run_spider

I'll discuss with the others and see if we should allow copying a spider to the same project.

SeanBannister commented 7 years ago

As a minimum maybe display a message when there's only 1 project: "Please create a project to copy this spider to"

Thanks for your help.