项目作者: circa10a

项目描述 :
Flask App to scrape hrefs from websites and validate links
高级语言: HTML
项目地址: git://github.com/circa10a/web-link-tester.git
创建时间: 2017-11-04T15:27:13Z
项目社区:https://github.com/circa10a/web-link-tester

开源协议:

下载


web-link-tester

Docker Automated build

Asynchronous Flask App to scrape and validate links via GUI or REST API

Usage

Why use the web-link-tester?

1) Test your production site via GUI or programmatically to ensure no bad page routes or forgotten references.
2) It’s free.

To deploy the Web App/API


Docker

  1. docker run -d --name link-tester -p 8080:8080 circa10a/web-link-tester

Access via http://localhost:8080

Python

  1. python main.py

Access via http://localhost:8080

Set environment variable PORT locally to change listening port from 8080

API Usage

  1. curl -X POST -H "content-type: application/json" --data '{"url": "https://www.github.com"}' http://localhost:8080/api

Example JSON Output

  1. $ curl -s -X POST -H "content-type: application/json" --data '{"url": "https://caleblemoine.dev"}' http://localhost:8080/api
  2. {
  3. "links": [
  4. {
  5. "code": 999,
  6. "url": "https://www.linkedin.com/in/caleblemoine/"
  7. },
  8. {
  9. "code": 200,
  10. "url": "https://github.com/circa10a"
  11. },
  12. {
  13. "code": 200,
  14. "url": "https://github.com/circa10a/express-jwt"
  15. },
  16. {
  17. "code": 200,
  18. "url": "https://github.com/pyouroboros/ouroboros"
  19. },
  20. {
  21. "code": 200,
  22. "url": "https://github.com/circa10a/filter-object-array"
  23. },
  24. {
  25. "code": 200,
  26. "url": "https://github.com/circa10a/easy-soap-request"
  27. },
  28. {
  29. "code": 200,
  30. "url": "https://medium.com/better-programming/how-to-perform-soap-requests-with-node-js-4a9627070eb6"
  31. },
  32. {
  33. "code": 200,
  34. "url": "https://github.com/circa10a/web-link-tester"
  35. },
  36. {
  37. "code": 200,
  38. "url": "https://github.com/circa10a/Device-Monitor-Dashboard"
  39. },
  40. {
  41. "code": 200,
  42. "url": "https://caleblemoine.dev/monitor/"
  43. },
  44. {
  45. "code": 200,
  46. "url": "https://hub.docker.com/u/circa10a"
  47. },
  48. {
  49. "code": 200,
  50. "url": "https://caleblemoine.dev/gitfolio/"
  51. },
  52. {
  53. "code": 999,
  54. "url": "https://www.linkedin.com/in/caleblemoine/"
  55. },
  56. ]
  57. }

Stack

  • Utilizes gunicorn for multiple workers/threading.
  • Python 3
  • BeautifulSoup4
  • Jquery

Screenshots

alt text
alt text