Skip to content

Sourcery refactored main branch #1

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/fb_ads_library_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _get_ad_archives_from_url(
response_data["data"],
)
)
if len(filtered) == 0:
if not filtered:
Copy link
Author

Choose a reason for hiding this comment

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

Function FbAdsLibraryTraversal._get_ad_archives_from_url refactored with the following changes:

# if no data after the after_date, break
next_page_url = None
break
Expand Down
5 changes: 1 addition & 4 deletions python/fb_ads_library_api_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ def main():
print("At least one must be set: --search-term, --search-page-ids")
sys.exit(1)

if not opts.search_term:
search_term = "."
else:
search_term = opts.search_term
search_term = "." if not opts.search_term else opts.search_term
Copy link
Author

Choose a reason for hiding this comment

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

Function main refactored with the following changes:

api = FbAdsLibraryTraversal(
opts.access_token, opts.fields, search_term, opts.country
)
Expand Down