PNA.fi koodi

pikante.py 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 2018 Toni Fadjukoff. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. import pnalib
  15. import html.parser
  16. # Pikante does not have any student restaurants at the moment
  17. pikante_url = "http://www.pikante.fi/lounaslistat-pdf";
  18. restaurant_info = [
  19. [ "(TAYS) Finnmedin ravintola", "$pky_url", "all", "middle" ],
  20. [ "(TAYS) Café Olive", "$pky_url", "all", "middle" ],
  21. [ "(TAYS) Ellipsi", "$pky_url", "all", "middle" ]
  22. ]
  23. class PikanteHTMLParser(html.parser.HTMLParser):
  24. def handle_starttag(self, tag, attrs):
  25. pass
  26. def handle_endtag(self, tag):
  27. pass
  28. def handle_data(self, data):
  29. pass
  30. def get_restaurants(use_old, week):
  31. #data = pnalib.get_file(pikante_url, "pikante.html", use_old)
  32. #parser = PikanteHTMLParser()
  33. #parser.feed(data)
  34. return []