my8100 / scrapydweb

Web app for Scrapyd cluster management, Scrapy log analysis & visualization, Auto packaging, Timer tasks, Monitor & Alert, and Mobile UI. DEMO :point_right:
https://github.com/my8100/files
GNU General Public License v3.0
3.12k stars 555 forks source link

Got 404 when visiting the Items page #129

Closed tomnattle closed 4 years ago

tomnattle commented 4 years ago

Describe the bug Oops! Something went wrong. http://127.0.0.1:6800/items/ status_code: 404

404 - No Such Resource

No Such Resource

No such child resource.

A clear and concise description of what the bug is.

点击ui左侧的items 会出现404页面,目前我看了scrapyd的接口,没有items.

class ItemsView(BaseView): methods = ['GET']

def __init__(self):
    super(ItemsView, self).__init__()

    self.project = self.view_args['project']
    self.spider = self.view_args['spider']

    self.url = 'http://{}/items/{}{}'.format(self.SCRAPYD_SERVER,
                                             '%s/' % self.project if self.project else '',
                                             '%s/' % self.spider if self.spider else '')
    if self.SCRAPYD_SERVER_PUBLIC_URL:
        self.public_url = re.sub(r'^http.*?/items/', self.SCRAPYD_SERVER_PUBLIC_URL + '/items/', self.url)
    else:
        self.public_url = ''
    self.template = 'scrapydweb/logs_items.html'
    self.text = ''

这个是scrapyd接口 https://github.com/scrapy/scrapyd/blob/4520c45acc115d0fc766eae30788468a77690433/scrapyd/webservice.py

tomnattle commented 4 years ago

版本号: Scrapy 2.0.0 scrapyd 1.2.1 scrapydweb 1.4.0

my8100 commented 4 years ago

You should set up the items_dir option of Scrapyd first. https://scrapyd.readthedocs.io/en/stable/config.html#items-dir

tomnattle commented 4 years ago

3q