Fallen Scraper Fix

Bug #490427 reported by Ged Walsh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dosage
Fix Committed
Medium
Tristan Seligmann

Bug Description

class Fallen(BasicScraper):
    imageUrl = 'http://www.fallencomic.com/pages/part%s/%s-p%s.htm'
    imageSearch = compile(r'<IMG SRC="(page/.+?)"', IGNORECASE)
    prevSearch = compile(r'<A HREF="(.+?)"><FONT FACE="Courier">Back', IGNORECASE)
    help = 'Index format: nn-m (comicNumber-partNumber)'
    starter = indirectStarter('http://www.fallencomic.com/fal-page.htm',
                              compile(r'\(NEW \d{2}/\d{2}/\d{2}\)\s*\n*\s*<a href="(pages/part\d+/\d+-p\d+\.htm)">\d+</a>', MULTILINE))

    def namer(cls, imageUrl, pageUrl):
  num = pageUrl.split('/')[-1].split('-')[0]
  part = pageUrl.split('-')[-1].split('.')[0]
  return '%s-%s' % (part, num)

    def setStrip(self, index):
        index, part = index.split('-')
        self.currentUrl = self.imageUrl % (part, index, part)

No longer quits when the image is named rather than numbered, namer changed to make it easier to read back.

Related branches

Changed in dosage:
assignee: nobody → Tristan Seligmann (mithrandi)
importance: Undecided → Medium
milestone: none → 1.7.0
status: New → In Progress
Changed in dosage:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.