GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — my-python-code/DYTT8/main.py at master · sosoho/my-python-code

Expand file tree

/

main.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
34 lines (28 loc) · 1.01 KB
/

main.py

Copy path

File metadata and controls

34 lines (28 loc) · 1.01 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/env python
# -*- coding:utf-8 -*-
import geturldytt
import getexceldytt
#获取url字典
def get_dic():
blog = geturldytt.get_urldic()
urllist, search = blog.get_url()
html_doc = blog.get_html(urllist)
result = blog.get_soup(html_doc)
info_list= blog.get_info(result)
return result,search,info_list
#写入excle
def write_excle(urldic,search,info_list):
excle = getexceldytt.create_excle()
workbook, worksheet, worksheet_info = excle.create_workbook(search)
excle.col_row(worksheet)
merge_format, name_format, normal_format = excle.shell_format(workbook)
excle.write_title(worksheet,search,merge_format)
excle.write_tag(worksheet,name_format)
excle.write_context(worksheet,urldic,normal_format)
excle.write_info(worksheet_info,info_list,normal_format)
excle.workbook_close(workbook)
def main():
url_dic ,search_name, info_list = get_dic()
write_excle(url_dic,search_name,info_list)
if __name__ == '__main__':
main()
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.