Did I find the right examples for you? yes no

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)

        def year_from_session(session):
    return int(session.split()[0])
        


src/o/p/openstates-HEAD/openstates/or/bills.py   openstates(Download)
from billy.scrape.utils import convert_pdf
from billy.scrape.bills import BillScraper, Bill
from billy.scrape.votes import Vote
from .utils import year_from_session
 
    def scrape(self, chamber, session):
        sessionYear = year_from_session(session)
        measure_url = self._resolve_ftp_path(sessionYear, 'measures.txt')
        action_url = self._resolve_ftp_path(sessionYear, 'meashistory.txt')
        self.slug = self.metadata['session_details'][session]['slug']

src/o/p/openstates-HEAD/openstates/pr/bills.py   openstates(Download)
# -*- coding: utf-8 -*-
from billy.scrape import ScrapeError, NoDataForPeriod
from billy.scrape.votes import Vote
from billy.scrape.bills import BillScraper, Bill
from .utils import grouper, doc_link_url, year_from_session