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

Code fails for disabled autosubmit #2

Open
maurerben opened this issue Nov 21, 2022 · 0 comments
Open

Code fails for disabled autosubmit #2

maurerben opened this issue Nov 21, 2022 · 0 comments

Comments

@maurerben
Copy link
Collaborator

For

auto_submit:
  enable: False

the code fails with

Traceback (most recent call last):
  File "/Users/benedikt/codes/apaFin/flathunt.py", line 110, in <module>
    main()
  File "/Users/benedikt/codes/apaFin/flathunt.py", line 106, in main
    launch_flat_hunt(config, heartbeat)
  File "/Users/benedikt/codes/apaFin/flathunt.py", line 30, in launch_flat_hunt
    hunter.hunt_flats()
  File "/Users/benedikt/codes/apaFin/flathunter/hunter.py", line 56, in hunt_flats
    for expose in processor_chain.process(self.crawl_for_exposes(max_pages)):
  File "/Users/benedikt/codes/apaFin/flathunter/hunter.py", line 35, in crawl_for_exposes
    return chain(*[try_crawl(searcher, url, max_pages)
  File "/Users/benedikt/codes/apaFin/flathunter/hunter.py", line 35, in <listcomp>
    return chain(*[try_crawl(searcher, url, max_pages)
  File "/Users/benedikt/codes/apaFin/flathunter/hunter.py", line 27, in try_crawl
    return searcher.crawl(url, max_pages)
  File "/Users/benedikt/codes/apaFin/flathunter/abstract_crawler.py", line 240, in crawl
    return self.get_results(url, max_pages)
  File "/Users/benedikt/codes/apaFin/flathunter/crawl_immobilienscout.py", line 74, in get_results
    self.submit_to_entries(entries)
  File "/Users/benedikt/codes/apaFin/flathunter/abstract_crawler.py", line 228, in submit_to_entries
    self.log_success_rate(entries)
  File "/Users/benedikt/codes/apaFin/flathunter/abstract_crawler.py", line 443, in log_success_rate
    succesful = len([entry for entry in entries if entry['applied']])
  File "/Users/benedikt/codes/apaFin/flathunter/abstract_crawler.py", line 443, in <listcomp>
    succesful = len([entry for entry in entries if entry['applied']])
KeyError: 'applied'
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

No branches or pull requests

1 participant