Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save results as json #215

Merged
merged 1 commit into from
Jul 9, 2021
Merged

Save results as json #215

merged 1 commit into from
Jul 9, 2021

Conversation

KingAkeem
Copy link
Member

Issue #196

Changes Proposed

  • Adds the ability to save the link tree as a JSON file
  • If the tree is saved as a file then it will not be displayed within the terminal.

Explanation of Changes

  • Saving as a file requires using the -s flag

for anchor_tag in node._node.find_all('a'):
link = anchor_tag.get('href')
json.append({"link":link,"tag":anchor_tag})
json.append({"link":link,"tag":anchor_tag.string})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing whitespace after ','
missing whitespace after ':'

@@ -45,10 +45,10 @@ def get_json_data(node):
Returns:
titles (list): List of Titles.
"""
json = []
json = []
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

@KingAkeem KingAkeem merged commit 4eb6cdc into dev Jul 9, 2021
@KingAkeem KingAkeem deleted the save_json branch July 9, 2021 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant