Created
November 2, 2023 19:46
-
-
Save Birappa87/8d4cc8592f6659937d230a1606b2c9e7 to your computer and use it in GitHub Desktop.
Main Logic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def main_covered_calls(): | |
| try: | |
| urls = { | |
| 'coveredCalls' : 'https://www.optionsplay.com/hub/covered-calls' | |
| } | |
| html = extract_data(url=urls['coveredCalls'], choice='coveredCalls') | |
| data = parse_data(html, choice='coveredCalls') | |
| data.to_csv('data/covered_calls.csv') | |
| dump_data(df=data, choice='coveredCalls', index=False) | |
| except Exception as err: | |
| print(err) | |
| def main_shortput(): | |
| try: | |
| urls = { | |
| 'shortPuts' : 'https://www.optionsplay.com/hub/short-puts' | |
| } | |
| html = extract_data(url=urls['shortPuts'], choice='shortPuts') | |
| data = parse_data(html, choice='shortPuts') | |
| data.to_csv('data/shortput.csv') | |
| dump_data(df=data, choice='shortPuts', index=False) | |
| except Exception as err: | |
| print(err) | |
| def main_cread_spread(): | |
| try: | |
| urls = { | |
| 'CreditSpreadFile' : 'https://www.optionsplay.com/hub/credit-spread-file' | |
| } | |
| html = extract_data(url=urls['CreditSpreadFile'], choice='CreditSpreadFile') | |
| data = parse_data(html, choice='CreditSpreadFile') | |
| data.to_csv('data/credit_spread.csv', index=False) | |
| dump_data(df=data, choice='CreditSpreadFile') | |
| except Exception as err: | |
| print(err) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment