Skip to content

Save results as json#215

Merged
KingAkeem merged 1 commit intodevfrom
save_json
Jul 9, 2021
Merged

Save results as json#215
KingAkeem merged 1 commit intodevfrom
save_json

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 ':'

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