Skip to content

Commit 2d67e8d

Browse files
committed
Update main.py
1 parent f2123ad commit 2d67e8d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ async def main():
101101
logger.info("Starting Taiga ind/pictures crawler...")
102102
print(f"Imports: {args.imports}")
103103
await a_moins_b(url, 0, -1, headers)
104-
collection_tasks = [col.get('function')(url, col, headers) for col in collections]
105104

106-
if args.imports == 'ind' or args.imports == 'all':
107-
collection_tasks = [col.get('function')(url, col, headers) for col in collections if col.get('method') != 'ExportPhotos']
108-
if args.imports == 'pictures' or args.imports == 'all':
105+
106+
if args.imports == 'ind':
107+
collection_tasks = [col.get('function')(url, col, headers) for col in collections if col.get('method') != 'ExportPhotos']
108+
elif args.imports == 'pictures':
109109
collection_tasks = [col.get('function')(url, col, headers) for col in collections if col.get('method') == 'ExportPhotos']
110+
else:
111+
collection_tasks = [col.get('function')(url, col, headers) for col in collections]
110112

111113
await asyncio.gather(*collection_tasks)
112114
print("Taiga crawler ended successful !!!")

0 commit comments

Comments
 (0)