Skip to content

BUG: get_option_data #6012

Closed
Closed
@joejohnson111

Description

@joejohnson111

looked at this this morning some. In the _get_option_data function, when building the url for yahoo, if I try to get current month but forward year, I get the +Options url which returns nearest expiry. The way I quickly fixed it, but i'm not sure its the best way

        if year != CUR_YEAR:
                url += '&m={year}-{m1}'.format(year=year, m1=m1)


        else:
                if m1 != CUR_MONTH and m2 != CUR_MONTH:
                    url += '&m={year}-{m1}'.format(year=year, m1=m1)
                else:
                    url += '+Options'

else:  # Default to current month
      url += '+Options'

I apologize in advance for any bad formatting or etiquette as I'm only just starting to use github.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions