test_test.go 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. package main
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "github.com/PuerkitoBio/goquery"
  6. util "jygit.jydev.jianyu360.cn/data_processing/common_utils"
  7. "jygit.jydev.jianyu360.cn/data_processing/common_utils/mongodb"
  8. "log"
  9. "net/http"
  10. "strings"
  11. "testing"
  12. )
  13. func TestGovWeb(T *testing.T) {
  14. //87 竞品`
  15. MgoLua := &mongodb.MongodbSim{
  16. //MongodbAddr: "172.17.4.87:27080",
  17. MongodbAddr: "127.0.0.1:27081",
  18. Size: 10,
  19. DbName: "zxl",
  20. UserName: "",
  21. Password: "",
  22. Direct: true,
  23. }
  24. MgoLua.InitPool()
  25. sess := MgoLua.GetMgoConn()
  26. defer MgoLua.DestoryMongoConn(sess)
  27. it := sess.DB("zxl").C("excel").Find(nil).Select(nil).Iter()
  28. count := 0
  29. for tmp := make(map[string]interface{}); it.Next(&tmp); count++ {
  30. if count%100 == 0 {
  31. log.Println("current:", count, tmp["name"], tmp["href"])
  32. }
  33. where := map[string]interface{}{
  34. "name": tmp["name"],
  35. "href": tmp["href"],
  36. "from": tmp["from"],
  37. }
  38. xd, _ := MgoLua.FindOne("xlsx_html_data", where)
  39. ins := *xd
  40. htmlContent := util.ObjToString(ins["html"])
  41. doc, err := goquery.NewDocumentFromReader(strings.NewReader(htmlContent))
  42. if err != nil {
  43. log.Fatal(err)
  44. }
  45. // 获取 <title>
  46. title := doc.Find("title").Text()
  47. // 查找包含“版权所有”的文本节点
  48. var copyright string
  49. doc.Find("p").Each(func(i int, s *goquery.Selection) {
  50. text := strings.TrimSpace(s.Text())
  51. if strings.Contains(text, "版权所有") {
  52. copyright = text
  53. }
  54. })
  55. if util.ObjToString(ins["title"]) == "" {
  56. ins["title"] = title
  57. }
  58. ins["copyright"] = copyright
  59. //fmt.Println("标题内容:", title)
  60. //fmt.Println("版权信息:", copyright)
  61. MgoLua.SaveByOriID("wcc_html_data", ins)
  62. }
  63. }
  64. func TestA(T *testing.T) {
  65. htmlContent := "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta name=\"keywords\" content=\"China, government, Premier, Premier Li, Chinese Premier, People's Republic of China, Chinese government, China government, Chinese Central Government, State Council, China State Council, China leaders, PRC\">\n <meta name=\"description\" content=\"Get quick, easy access to all services, policies, news and information about the Chinese government and Chinese leaders\">\n <meta name=\"format-detection\" content=\"telephone=no\">\n <title>The State Council of the People's Republic of China</title>\n <link href=\"//english.www.gov.cn/favicon.ico\" rel=\"shortcut icon\" type=\"image/x-icon\">\n <link rel=\"stylesheet\" href=\"/static/2023GW/css/swiper-bundle.min.css?1=1\">\n <link rel=\"stylesheet\" href=\"/static/2023GW/css/public.css\">\n <link rel=\"stylesheet\" href=\"/static/2023GW/css/main.css?i=1\">\n <link rel=\"stylesheet\" href=\"/static/2023GW/css/Mobile_main.css?i=1\">\n \n \n <meta name=\"filetype\" content=\"0\">\n<meta name=\"publishedtype\" content=\"1\">\n<meta name=\"pagetype\" content=\"2\">\n<meta name=\"uctk\" content=\"enabled\"> \n<meta name=\"catalog\" content=\"en_index\">\n \n \n <!-- 20240520 syx jianrong -->\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/static/2023GW/css/gtrs_pc_index.css?i=3\">\n <!-- 20240520 syx jianrong -->\n \n <script async=\"\" src=\"//stat.www.gov.cn/webdig.js?z=1\"></script><script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" xml:space=\"preserve\" src=\"/static/2023GW/js/jquery-3.6.0.min.js\"></script>\n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" xml:space=\"preserve\" src=\"/static/2023GW/js/swiper-bundle.min.js\"></script>\n \n <!-- 20240520 syx jianrong -->\n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" xml:space=\"preserve\" src=\"/static/2023GW/js/jquery.min.js\"></script>\n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" xml:space=\"preserve\" src=\"/static/2023GW/js/slides1.js\"></script>\n <!-- 20240520 syx jianrong -->\n \n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" xml:space=\"preserve\" src=\"/static/2023GW/js/data.js\"></script>\n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" xml:space=\"preserve\" src=\"/static/2023GW/js/initScreen.js\"></script>\n\n</head>\n\n<body>\n <div class=\"PC_Show\">\n <!-- Top_Box -->\n \n <div class=\"Top_Box\">\n <div class=\"Top_Div Cen1280\">\n <div class=\"Top_Logo FLeft\">\n <a href=\"//english.www.gov.cn\">\n <img src=\"/static/common/img/GOV_Logo1.png\">\n </a>\n </div>\n <div class=\"Top_Search_Date FRight\">\n <div class=\"Top_Date_Div\">\n <p class=\"Top_Date\">\n <script type=\"text/javascript\">\n //<![CDATA[\n document.write(\"\"+m[today.getMonth()+1]+\" \"+today.getDate()+\" \"+theYear+\"\");\n //]]>\n </script>July 16 2025\n </p>\n <p class=\"Top_Line\"></p>\n <p class=\"Top_App\"><a href=\"//app.www.gov.cn/download/English.html\"> App</a></p>\n </div>\n <div class=\"Top_Search_Div\">\n <!-- 20230322 -->\n <form method=\"get\" id=\"searchform\" enctype=\"application/x-www-form-urlencoded\" autocomplete=\"off\">\n <div class=\"Top_Search\"> \n <input maxlength=\"110\" type=\"text\" id=\"code\" name=\"code\" value=\"17dbe3acd9d\" style=\"display:none\">\n <input maxlength=\"110\" type=\"text\" id=\"dataTypeId\" name=\"dataTypeId\" value=\"57\" style=\"display:none\">\n <input maxlength=\"200\" type=\"text\" id=\"searchtxt\" name=\"searchWord\">\n </div>\n <input value=\"&nbsp;\" readonly=\"readonly\" id=\"searchBottom\" style=\"\" type=\"text\">\n </form>\n\n <script type=\"text/javascript\" xml:space=\"preserve\">\n //<![CDATA[\n var oSearchForm = document.getElementById('searchform');\n var oSearchInput = document.getElementById('searchBottom');\n var oSearchTxt = document.getElementById('searchtxt');\n oSearchInput.onclick = function (){\n if(oSearchTxt.value != ''){\n oSearchForm.action = 'https://search.english.www.gov.cn/en/search.shtml';\n oSearchForm.target = '_blank';\n oSearchForm.submit();\n }\n else{\n alert('Please enter your search. ');\n\n }\n };\n $(document).keyup(function(event){\n if (oSearchTxt == document.activeElement) {\n if(event.keyCode ==13){\n if(oSearchTxt.value != ''){\n oSearchForm.action = 'https://search.english.www.gov.cn/en/search.shtml';\n oSearchForm.target = '_blank';\n oSearchForm.submit();\n }\n else{\n alert('Please enter your search. ');\n\n }\n }\n }\n });\n //]]>\n </script> \n <!-- 20230322 end-->\n </div>\n </div>\n </div>\n </div>\n \n <!-- Menu_Box -->\n \n <div class=\"Menu_Box\">\n <div class=\"Menu_Div Cen1280\">\n <div class=\"Menu_List FLeft\">\n <ul>\n <li><a href=\"//english.www.gov.cn\">HOME</a></li>\n <li><a href=\"/news/\">NEWS</a></li>\n <li><a href=\"/institutions/\">INSTITUTIONS</a></li>\n <li><a href=\"/policies/\">POLICIES</a></li>\n <li><a href=\"/archive/\">ARCHIVE</a></li>\n </ul>\n </div>\n <div class=\"Menu_Language\">\n <a href=\"//www.gov.cn/\" target=\"_blank\">中文</a>\n </div>\n </div>\n </div>\n \n \n <div class=\"Page_Center_Div Cen1280\">\n <!-- Home_Titlte Homepage-headline-->\n <div class=\"Home_Titlte\">\n <h3 class=\"Font_Georgia\">\n \n \n <a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\">Xi addresses Central Urban Work Conference, listing priorities for urban development</a> \n \n\n \n </h3>\n <div class=\"Home_Title_More Font_Trebuchet\">\n <a href=\"//english.www.gov.cn/headlines\" shape=\"rect\">More&gt;&gt;</a>\n </div>\n </div>\n <!-- Home_Focus_Div Homepage_GALLERY -->\n <div class=\"Home_Focus_Div\">\n <div class=\"Home_Focus_Swiper FLeft\">\n <div class=\"slider_carousel \" tabindex=\"0\" style=\"overflow: hidden;\">\n \n \n \n \n <div class=\"slidesjs-container\" style=\"overflow: hidden; position: relative; width: 660px; height: 370.723px;\"><div class=\"slidesjs-control\" style=\"position: relative; left: 0px; width: 660px; height: 370.723px;\"><div class=\"item slidesjs-slide\" tabindex=\"-1\" slidesjs-index=\"0\" style=\"position: absolute; top: 0px; left: 0px; width: 100%; z-index: 10; display: none;\"> \n <div class=\"pic\" tabindex=\"-1\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\" tabindex=\"-1\"><img src=\"//english.www.gov.cn/images/202507/15/687609a4c6d0868f1eab91cf.jpeg\" title=\"Xi addresses Central Urban Work Conference, listing priorities for urban development\" tabindex=\"-1\"></a>\n </div>\n <h4 class=\"Font_Georgia\" tabindex=\"-1\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\" tabindex=\"0\">Xi addresses Central Urban Work Conference, listing priorities for urban development</a>\n </h4> \n </div><div class=\"item slidesjs-slide\" tabindex=\"-1\" slidesjs-index=\"1\" style=\"position: absolute; top: 0px; left: 0px; width: 100%; z-index: 0; opacity: 0.992998;\"> \n <div class=\"pic\" tabindex=\"-1\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS68760a23c6d0868f4e8f42f8.html\" tabindex=\"-1\"><img src=\"//english.www.gov.cn/images/202507/16/6876f5b9c6d0868f1eab929a.jpeg\" title=\"Xi meets Australian PM in Beijing\" tabindex=\"-1\"></a>\n </div>\n <h4 class=\"Font_Georgia\" tabindex=\"-1\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS68760a23c6d0868f4e8f42f8.html\" tabindex=\"0\">Xi meets Australian PM in Beijing</a>\n </h4> \n </div><div class=\"item slidesjs-slide\" tabindex=\"-1\" slidesjs-index=\"2\" style=\"position: absolute; top: 0px; left: 0px; width: 100%; z-index: 10; opacity: 0.00700198;\"> \n <div class=\"pic\" tabindex=\"-1\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202507/15/content_WS68763c91c6d0868f4e8f4307.html\" tabindex=\"-1\"><img src=\"//english.www.gov.cn/images/202507/15/68763c91c6d0868f1eab922c.jpeg\" title=\"A look at China's economy in H1 of 2025\" tabindex=\"-1\"></a>\n </div>\n <h4 class=\"Font_Georgia\" tabindex=\"-1\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202507/15/content_WS68763c91c6d0868f4e8f4307.html\" tabindex=\"0\">A look at China's economy in H1 of 2025</a>\n </h4> \n </div></div></div> \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n <a class=\"slidesjs-previous slidesjs-navigation\" href=\"#\" title=\"\" style=\"display: none;\"></a><a class=\"slidesjs-next slidesjs-navigation\" href=\"#\" title=\"\" style=\"display: none;\"></a><a class=\"slidesjs-play slidesjs-navigation slidesjs-playing\" href=\"#\" title=\"鎾斁\" style=\"display: none;\">鎾斁</a><a class=\"slidesjs-stop slidesjs-navigation\" href=\"#\" title=\"鏆傚仠\" style=\"display: none;\">鏆傚仠</a><ul class=\"slidesjs-pagination\"><li class=\"slidesjs-pagination-item\"><a href=\"#\" data-slidesjs-item=\"0\" class=\"\">1</a></li><li class=\"slidesjs-pagination-item\"><a href=\"#\" data-slidesjs-item=\"1\" class=\"\">2</a></li><li class=\"slidesjs-pagination-item\"><a href=\"#\" data-slidesjs-item=\"2\" class=\"active\">3</a></li></ul></div>\n \n </div>\n <div class=\"Home_Focus_List FRight\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/news\">NEWS</a>\n \n </div>\n <!-- Homepage_NEWS -->\n <ul> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS68766152c6d0868f4e8f4314.html\">China ready to deepen, expand bilateral cooperation with Australia: Chinese premier</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/16/content_WS6876ddf6c6d0868f4e8f4331.html\">Chinese premier calls on China, Australia to create stronger synergy for development</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS687587e6c6d0868f4e8f423b.html\">China, EU hold high-level environment, climate dialogue</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS6875c080c6d0868f4e8f4294.html\">National Economy Made Steady Improvement Despite Challenges in the First Half Year</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS687619cac6d0868f4e8f42ff.html\">Shenzhou-20 crew enter Tianzhou-9 cargo craft</a></li>\n \n\n \n </ul>\n </div>\n </div>\n <!-- Home_Type_Div Homepage_POLICIES-->\n <div class=\"Home_Type_Div\">\n <div class=\"Home_Type_Item FLeft\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/policies\">POLICIES</a>\n \n \n </div>\n <div class=\"Home_Type_Item_Content\"> \n \n \n \n \n \n <p><a shape=\"rect\" href=\"//english.www.gov.cn/policies/latestreleases/202507/15/content_WS68759534c6d0868f4e8f4252.html\"><img src=\"//english.www.gov.cn/images/202507/15/68759534c6d0868f1eab911b.jpeg\" title=\"China issues guidelines highlighting independent, impartial judicial work\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/latestreleases/202507/15/content_WS68759534c6d0868f4e8f4252.html\">China issues guidelines highlighting independent, impartial judicial work</a></h4> \n \n \n \n \n \n \n \n \n \n \n \n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/latestreleases/202507/09/content_WS686da8a3c6d0868f4e8f3f84.html\">China unveils guidelines to improve one-stop government services</a></h4> \n \n\n </div>\n </div>\n \n <!-- Homepage_STATISTICS-->\n <div class=\"Home_Type_Item FLeft\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics\">STATISTICS</a>\n \n </div>\n <div class=\"Home_Type_Item_Content\">\n \n \n \n \n \n <p><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS68764115c6d0868f4e8f4310.html\"><img src=\"//english.www.gov.cn/images/202507/15/68764115c6d0868f1eab923c.jpeg\" title=\"China's economy in first half 2025\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS68764115c6d0868f4e8f4310.html\">China's economy in first half 2025</a></h4> \n \n \n \n \n \n \n \n \n \n \n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS6875bd9cc6d0868f4e8f4288.html\">China's GDP expands 5.3 pct year on year in H1</a></h4> \n \n\n </div>\n </div>\n <!-- Homepage_INSTITUTIONS-->\n <div class=\"Home_Type_INS FRight\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/institutions\">INSTITUTIONS</a>\n \n </div>\n <div class=\"Home_Type_Institutions\">\n <!-- P 加粗换行,h3加粗接排,h4接排, -->\n <div class=\"Home_Type_Institutions_Line\">\n <h3>PREMIER:</h3>\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/12/content_WS641a9b39c6d0f528699db818.html\" shape=\"rect\">Li Qiang</a></h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <p>VICE-PREMIERS:</p>\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d083cc6d0f528699dc0ac.html\" shape=\"rect\">Ding Xuexiang,</a></h4>&nbsp;\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d0824c6d0f528699dc0ab.html\" shape=\"rect\">He Lifeng,</a></h4>&nbsp;\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d0816c6d0f528699dc0aa.html\" shape=\"rect\">Zhang Guoqing,</a></h4>&nbsp;\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d0809c6d0f528699dc0a9.html\" shape=\"rect\">Liu Guozhong</a></h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <p>STATE COUNCILORS:</p>\n <h4>Wang Xiaohong,</h4>\n <h4>Wu Zhenglong,</h4>\n <h4>Shen Yiqin</h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <h3>SECRETARY GENERAL:</h3>\n <h4>Wu Zhenglong</h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <p><a href=\"//english.www.gov.cn/statecouncil/202303/12/content_WS5f334b75c6d029c1c26379c3.html\" shape=\"rect\">MINISTRIES</a></p>\n </div>\n </div>\n </div>\n\n </div>\n <!-- Home_AD_Div Homepage_special-->\n <div class=\"Home_AD_Div\">\n \n \n \n \n <div class=\"Home_AD FLeft\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202505/16/content_WS6827008ec6d0868f4e8f29a0.html\"><img src=\"//english.www.gov.cn/images/202505/16/6827008ec6d0868f1eab6255.jpeg\" title=\"A Guide to Working and Living in China as Business Expatriates (2025 Edition)\"></a>\n </div>\n \n \n \n \n \n \n \n <div class=\"Home_AD FRight\">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202411/12/content_WS6733220fc6d0868f4e8ecda4.html\"><img src=\"//english.www.gov.cn/images/202411/12/67334404c6d0868f1eaa45d2.jpeg\" title=\"China's public holidays for 2025\"></a>\n </div>\n \n \n \n \n </div>\n <!-- Home_Foreigner_Div -->\n <div class=\"Home_Foreigner_Div\">\n <div class=\"Home_Foreigner_Left\">\n <div class=\"Home_Foreigner_Item\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet Home_Foreigner_Title\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/services\">INDIVIDUALS</a>\n \n </div>\n <div class=\"Home_Foreigner_List\">\n <ul> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202505/22/content_WS682e6113c6d0868f4e8f2b86.html\">Q&amp;A: What to know about China's visa-free policies</a></li> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202506/12/content_WS676548cbc6d0868f4e8ee28f.html\">China extends visa-free transit to 240 hours</a></li> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202504/14/content_WS680dedbfc6d0868f4e8f21c9.html\">Details of mutual visa exemption agreements</a></li> \n \n </ul>\n </div>\n <div class=\"Home_Foreigner_Icons\">\n <ul>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/liveandworkinchina\"><img src=\"/static/2023GW/images/Home_Icon1.png\"></a></p>\n <h4> \n <a shape=\"rect\" href=\"//english.www.gov.cn/services/liveandworkinchina\">LIVE &amp; WORK IN CHINA</a> \n </h4>\n </li> \n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/studyinchina\"><img src=\"/static/2023GW/images/Home_Icon2.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/studyinchina\">STUDY IN CHINA</a></h4>\n </li>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/visitchina\"><img src=\"/static/2023GW/images/Home_Icon3.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/visitchina\">VISIT CHINA</a></h4>\n </li>\n </ul>\n </div>\n </div>\n </div>\n <div class=\"Home_Foreigner_Right\">\n <div class=\"Home_Foreigner_Item\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet Home_Foreigner_Title\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/services\">BUSINESSES</a>\n \n </div>\n <div class=\"Home_Foreigner_List\">\n <ul> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202502/11/content_WS67ab2673c6d0868f4e8ef91a.html\">China rolls out measures to boost foreign investment</a></li> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202411/06/content_WS672ac25fc6d0868f4e8eca19.html\">China revises rules to ease foreign strategic investment in listed firms</a></li> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202410/25/content_WS671b6f0ec6d0868f4e8ec4ce.html\">China to further expand opening-up in value-added telecom services</a></li> \n \n </ul>\n </div>\n <div class=\"Home_Foreigner_Icons\">\n <ul>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/investment\"><img src=\"/static/2023GW/images/Home_Icon4.png\"></a></p>\n <h4> \n <a shape=\"rect\" href=\"//english.www.gov.cn/services/investment\">INVEST IN CHINA</a> \n </h4>\n </li> \n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/doingbusiness\"><img src=\"/static/2023GW/images/Home_Icon5.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/doingbusiness\">DO BUSINESS IN CHINA</a></h4>\n </li>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/thriveinchina\"><img src=\"/static/2023GW/images/Home_Icon6.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/thriveinchina\">THRIVE IN CHINA</a></h4>\n </li> \n </ul>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n <!-- Home_LinkFeedback_Box homepage_link-->\n <div class=\"Home_LinkFeedback_Box\">\n <div class=\"Home_LinkFeedback_Div Cen1280\">\n <div class=\"Home_Link_Div FLeft\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet Home_Link_Title\">\n LINKS\n </div>\n <div class=\"Home_Link_List\">\n <ul>\n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641ac985c6d0f528699db880.html\">Ministry of Foreign Affairs</a></li>\n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641ac9d1c6d0f528699db881.html\">Ministry of Commerce</a></li>\n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641ac9fac6d0f528699db882.html\">National Development and Reform Commission</a></li>\n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641aca31c6d0f528699db883.html\">National Immigration Administration</a></li>\n \n \n </ul>\n </div>\n </div>\n <!-- SERVICES -->\n <div class=\"Home_Feedback_Div FLeft\">\n <div class=\"Home_Feedback_Title Font_Trebuchet\">\n <a href=\"//english.www.gov.cn/feedback/\" shape=\"rect\">FEEDBACK</a>\n </div>\n \n \n <h3 class=\"Font_Trebuchet\"><a shape=\"rect\" href=\"//english.www.gov.cn/services/202412/25/content_WS5e04749bc6d0554996894a1a.html\">RESPONSES</a></h3>\n \n \n <h3 class=\"Font_Trebuchet\"><a shape=\"rect\" href=\"//english.www.gov.cn/services/202406/18/content_WS5f1507b2c6d00bd0989c6404.html\">FAQ</a></h3>\n \n \n </div>\n </div>\n </div>\n <!-- bottom -->\n \n <div class=\"Bottom_Div Cen1280\">\n <!-- 20230329 --> \n <div class=\"Bottom_Right FRight\">\n <h3>Copyright© <a href=\"//www.gov.cn/\" target=\"_blank\">www.gov.cn</a> | <a href=\"//english.www.gov.cn/archive/202303/28/content_WS64227cbfc6d0f528699dc56b.html\">About us</a> | <a href=\"mailto:english@mail.gov.cn\">Contact us</a></h3>\n <h3><span>Website Identification Code bm01000001</span> \n <span><a href=\"//beian.miit.gov.cn/#/Integrated/index\" target=\"_blank\">Registration Number: 05070218</a></span></h3>\n <h3>All rights reserved. The content (including but not limited to text, photo, multimedia information, etc) published in this site belongs to www.gov.cn.</h3>\n <h3>Without written authorization from www.gov.cn, such content shall not be republished or used in any form.</h3>\n </div><!-- 20230329 -->\n </div>\n <!-- 20230327 Back DESKTOP --> \n <div class=\"gwe-dtbackmobile\">\n <div class=\"gwe-pc2m-info\">\n Mobile\n </div>\n <div id=\"gwe-pc2m-phone\">\n <div id=\"gwe-pc2m-red\"></div>\n <div id=\"gwe-pc2m-blue\"></div>\n <div id=\"gwe-pc2m-green\"></div>\n </div>\n </div>\n <!-- 20230327 end --> \n \n </div>\n <div class=\"Mobile_Show\">\n <!-- MB_top.inc -->\n \n <div class=\"mMenu_Box\">\n <div class=\"mMenu_Div\">\n <div class=\"Menu_Close_Div\">\n <img src=\"/static/common/img/Mobile/mMenu_Close.png\">\n </div>\n <ul>\n <li id=\"menu1\">\n <div class=\"Menu_Line\"><a href=\"//english.www.gov.cn\">HOME</a>\n </div>\n </li>\n <li id=\"menu2\">\n <div class=\"Menu_Line\">\n <a href=\"/news/\">NEWS</a>\n\n </div>\n </li>\n <li id=\"menu3\">\n <div class=\"Menu_Line\">\n <a href=\"/institutions/\">INSTITUTIONS</a>\n </div>\n\n </li>\n <li id=\"menu4\">\n <div class=\"Menu_Line\">\n <a href=\"/policies/\">POLICIES</a>\n </div>\n </li>\n <li id=\"menu5\">\n <div class=\"Menu_Line\">\n <a href=\"/archive/\">ARCHIVE</a>\n </div>\n </li>\n <li class=\"menuCN\">\n <div class=\"Menu_Line\">\n <a href=\"//www.gov.cn/\" target=\"_blank\">中文</a>\n </div>\n </li>\n </ul>\n </div>\n </div>\n <div class=\"mBody\">\n <div class=\"Menu_Box\">\n <div class=\"Menu_Div\">\n <div class=\"Menu_Logo FLeft\">\n <a href=\"//english.www.gov.cn\"><img src=\"/static/common/img/Mobile/mGOV_Logo1.png\"></a>\n </div>\n <div class=\"Menu_MenuIcon FRight\">\n <img src=\"/static/common/img/Mobile/mMenu_Icon.png\">\n </div>\n\n <div class=\"Menu_Search FRight\">\n <a href=\"https://search.english.www.gov.cn/en/search.shtml?code=17dbe3acd9d&amp;dataTypeId=57\">\n <img src=\"/static/common/img/Mobile/mMenu_Search.png\">\n </a>\n </div>\n </div>\n </div>\n </div>\n \n <!-- MB_top.inc end -->\n <div class=\"mBody\">\n <div class=\"Page_Center_Div\">\n <!-- Home_Titlte -->\n <div class=\"Home_Titlte\">\n <h3 class=\"Font_Georgia\"> \n \n \n <a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\">Xi addresses Central Urban Work Conference, listing priorities for urban development</a> \n \n \n </h3>\n <div class=\"Home_Title_More Font_Trebuchet\">\n <a href=\"//english.www.gov.cn/headlines\" shape=\"rect\">More&gt;&gt;</a>\n </div>\n </div>\n <!-- Home_Focus_Div -->\n <div class=\"Home_Focus_Div\">\n <div class=\"mHome_Focus_Swiper swiper-container FLeft swiper-initialized swiper-horizontal swiper-pointer-events\">\n <div class=\"swiper-wrapper\" id=\"swiper-wrapper-10c5f9309f7a42457\" aria-live=\"off\" style=\"transition-duration: 300ms;\"><div class=\"swiper-slide swiper-slide-duplicate\" data-swiper-slide-index=\"2\">\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202507/15/content_WS68763c91c6d0868f4e8f4307.html\"><img src=\"//english.www.gov.cn/images/202507/15/68763c91c6d0868f1eab922c.jpeg\" title=\"A look at China's economy in H1 of 2025\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202507/15/content_WS68763c91c6d0868f4e8f4307.html\">A look at China's economy in H1 of 2025</a></h4>\n </div>\n \n \n \n \n \n <div class=\"swiper-slide\" data-swiper-slide-index=\"0\">\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\"><img src=\"//english.www.gov.cn/images/202507/15/687609a4c6d0868f1eab91cf.jpeg\" title=\"Xi addresses Central Urban Work Conference, listing priorities for urban development\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\">Xi addresses Central Urban Work Conference, listing priorities for urban development</a></h4>\n </div> \n \n \n \n \n \n <div class=\"swiper-slide\" data-swiper-slide-index=\"1\">\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS68760a23c6d0868f4e8f42f8.html\"><img src=\"//english.www.gov.cn/images/202507/16/6876f5b9c6d0868f1eab929a.jpeg\" title=\"Xi meets Australian PM in Beijing\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS68760a23c6d0868f4e8f42f8.html\">Xi meets Australian PM in Beijing</a></h4>\n </div> \n \n \n \n \n \n <div class=\"swiper-slide\" data-swiper-slide-index=\"2\">\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202507/15/content_WS68763c91c6d0868f4e8f4307.html\"><img src=\"//english.www.gov.cn/images/202507/15/68763c91c6d0868f1eab922c.jpeg\" title=\"A look at China's economy in H1 of 2025\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202507/15/content_WS68763c91c6d0868f4e8f4307.html\">A look at China's economy in H1 of 2025</a></h4>\n </div> \n \n \n \n \n \n <div class=\"swiper-slide swiper-slide-duplicate\" data-swiper-slide-index=\"0\">\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\"><img src=\"//english.www.gov.cn/images/202507/15/687609a4c6d0868f1eab91cf.jpeg\" title=\"Xi addresses Central Urban Work Conference, listing priorities for urban development\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS6875df35c6d0868f4e8f429c.html\">Xi addresses Central Urban Work Conference, listing priorities for urban development</a></h4>\n </div></div>\n <div class=\"mHome_Focus_pagination swiper-pagination swiper-pagination-clickable swiper-pagination-bullets swiper-pagination-horizontal\"></div> \n <span class=\"swiper-notification\" aria-live=\"assertive\" aria-atomic=\"true\"></span></div>\n <div class=\"Home_Focus_List Cen1280\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/news\">NEWS</a>\n \n </div>\n <ul> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS68766152c6d0868f4e8f4314.html\">China ready to deepen, expand bilateral cooperation with Australia: Chinese premier</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/16/content_WS6876ddf6c6d0868f4e8f4331.html\">Chinese premier calls on China, Australia to create stronger synergy for development</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS687587e6c6d0868f4e8f423b.html\">China, EU hold high-level environment, climate dialogue</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS6875c080c6d0868f4e8f4294.html\">National Economy Made Steady Improvement Despite Challenges in the First Half Year</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202507/15/content_WS687619cac6d0868f4e8f42ff.html\">Shenzhou-20 crew enter Tianzhou-9 cargo craft</a></li>\n \n \n \n </ul>\n </div>\n </div>\n <!-- Home_Type_Div -->\n <div class=\"Home_Type_Div Cen1280\">\n <div class=\"Home_Type_INS \">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/institutions\">INSTITUTIONS</a>\n \n </div>\n <div class=\"Home_Type_Institutions\">\n <!-- P 加粗换行,h3加粗接排,h4接排, -->\n <div class=\"Home_Type_Institutions_Line\">\n <h3>PREMIER:</h3>\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/12/content_WS641a9b39c6d0f528699db818.html\" shape=\"rect\">Li Qiang</a></h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <p>VICE-PREMIERS:</p>\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d083cc6d0f528699dc0ac.html\" shape=\"rect\">Ding Xuexiang,</a></h4>&nbsp;\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d0824c6d0f528699dc0ab.html\" shape=\"rect\">He Lifeng,</a></h4>&nbsp;\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d0816c6d0f528699dc0aa.html\" shape=\"rect\">Zhang Guoqing,</a></h4>&nbsp;\n <h4><a href=\"//english.www.gov.cn/Homepage/202303/13/content_WS641d0809c6d0f528699dc0a9.html\" shape=\"rect\">Liu Guozhong</a></h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <p>STATE COUNCILORS:</p>\n <h4>Wang Xiaohong,</h4>\n <h4>Wu Zhenglong,</h4>\n <h4>Shen Yiqin</h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <h3>SECRETARY GENERAL:</h3>\n <h4>Wu Zhenglong</h4>\n </div>\n <div class=\"Home_Type_Institutions_Line\">\n <p><a href=\"//english.www.gov.cn/statecouncil/202303/12/content_WS5f334b75c6d029c1c26379c3.html\" shape=\"rect\">MINISTRIES</a></p>\n </div>\n </div>\n </div>\n <div class=\"Home_Type_Item \">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/policies\">POLICIES</a>\n \n </div>\n <div class=\"Home_Type_Item_Content\">\n \n \n \n \n \n <p><a shape=\"rect\" href=\"//english.www.gov.cn/policies/latestreleases/202507/15/content_WS68759534c6d0868f4e8f4252.html\"><img src=\"//english.www.gov.cn/images/202507/15/68759534c6d0868f1eab911b.jpeg\" title=\"China issues guidelines highlighting independent, impartial judicial work\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/latestreleases/202507/15/content_WS68759534c6d0868f4e8f4252.html\">China issues guidelines highlighting independent, impartial judicial work</a></h4> \n \n \n \n \n \n \n \n \n\n </div>\n <div class=\"Home_Type_Item_Content\">\n \n \n \n <h5 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/latestreleases/202507/09/content_WS686da8a3c6d0868f4e8f3f84.html\">China unveils guidelines to improve one-stop government services</a></h5>\n \n \n \n </div>\n </div>\n <div class=\"Home_Type_Item \">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\"> \n \n <a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics\">STATISTICS</a>\n \n \n </div>\n <div class=\"Home_Type_Item_Content\"> \n \n \n \n \n <p><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS68764115c6d0868f4e8f4310.html\"><img src=\"//english.www.gov.cn/images/202507/15/68764115c6d0868f1eab923c.jpeg\" title=\"China's economy in first half 2025\"></a></p>\n <h4 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS68764115c6d0868f4e8f4310.html\">China's economy in first half 2025</a></h4> \n \n \n \n \n \n \n \n \n </div>\n <div class=\"Home_Type_Item_Content\">\n \n \n \n <h5 class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/archive/statistics/202507/15/content_WS6875bd9cc6d0868f4e8f4288.html\">China's GDP expands 5.3 pct year on year in H1</a></h5>\n \n \n </div>\n </div>\n </div>\n <!-- Home_AD_Div -->\n <div class=\"Home_AD_Div Cen1280\">\n <div class=\"Home_AD_Swiper swiper-container swiper-initialized swiper-horizontal swiper-pointer-events\">\n <div class=\"swiper-wrapper\" id=\"swiper-wrapper-f2c45d9476ea292a\" aria-live=\"off\" style=\"transition-duration: 300ms;\"><div class=\"swiper-slide swiper-slide-duplicate swiper-slide-duplicate-active\" data-swiper-slide-index=\"1\">\n <div class=\"Home_AD \">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202411/12/content_WS6733220fc6d0868f4e8ecda4.html\"><img src=\"//english.www.gov.cn/images/202411/12/67334404c6d0868f1eaa45d2.jpeg\" title=\"China's public holidays for 2025\"></a>\n </div></div>\n \n \n \n \n <div class=\"swiper-slide\" data-swiper-slide-index=\"0\">\n <div class=\"Home_AD \">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202505/16/content_WS6827008ec6d0868f4e8f29a0.html\"><img src=\"//english.www.gov.cn/images/202505/16/6827008ec6d0868f1eab6255.jpeg\" title=\"A Guide to Working and Living in China as Business Expatriates (2025 Edition)\"></a>\n </div></div>\n \n \n \n \n \n <div class=\"swiper-slide\" data-swiper-slide-index=\"1\">\n <div class=\"Home_AD \">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202411/12/content_WS6733220fc6d0868f4e8ecda4.html\"><img src=\"//english.www.gov.cn/images/202411/12/67334404c6d0868f1eaa45d2.jpeg\" title=\"China's public holidays for 2025\"></a>\n </div></div>\n \n \n \n \n \n <div class=\"swiper-slide swiper-slide-duplicate\" data-swiper-slide-index=\"0\">\n <div class=\"Home_AD \">\n <a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202505/16/content_WS6827008ec6d0868f4e8f29a0.html\"><img src=\"//english.www.gov.cn/images/202505/16/6827008ec6d0868f1eab6255.jpeg\" title=\"A Guide to Working and Living in China as Business Expatriates (2025 Edition)\"></a>\n </div></div></div>\n <!-- <div class='swiper-pagination'></div> -->\n <!-- <div class='TopBanner_BTPrev'></div>\n <div class='TopBanner_BTNext'></div> -->\n <span class=\"swiper-notification\" aria-live=\"assertive\" aria-atomic=\"true\"></span></div>\n\n </div>\n <!-- Home_Foreigner_Div -->\n <div class=\"Home_Foreigner_Div Cen1280\">\n <div class=\"Home_Foreigner_Left\">\n <div class=\"Home_Foreigner_Item\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet Home_Foreigner_Title\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/services\">INDIVIDUALS</a>\n \n </div>\n <div class=\"Home_Foreigner_List\">\n <ul> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202505/22/content_WS682e6113c6d0868f4e8f2b86.html\">Q&amp;A: What to know about China's visa-free policies</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202506/12/content_WS676548cbc6d0868f4e8ee28f.html\">China extends visa-free transit to 240 hours</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/news/202504/14/content_WS680dedbfc6d0868f4e8f21c9.html\">Details of mutual visa exemption agreements</a></li>\n \n \n \n </ul>\n </div>\n <div class=\"Home_Foreigner_Icons\">\n <ul>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/liveandworkinchina\"><img src=\"/static/2023GW/images/Home_Icon1.png\"></a></p>\n <h4> \n <a shape=\"rect\" href=\"//english.www.gov.cn/services/liveandworkinchina\">LIVE &amp; WORK IN CHINA</a> \n </h4>\n </li> \n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/studyinchina\"><img src=\"/static/2023GW/images/Home_Icon2.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/studyinchina\">STUDY IN CHINA</a></h4>\n </li>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/visitchina\"><img src=\"/static/2023GW/images/Home_Icon3.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/visitchina\">VISIT CHINA</a></h4>\n </li>\n </ul>\n \n </div>\n </div>\n </div>\n <div class=\"Home_Foreigner_Right\">\n <div class=\"Home_Foreigner_Item\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet Home_Foreigner_Title\">\n \n <a shape=\"rect\" href=\"//english.www.gov.cn/services\">BUSINESSES</a>\n \n </div>\n <div class=\"Home_Foreigner_List\">\n <ul> \n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202502/11/content_WS67ab2673c6d0868f4e8ef91a.html\">China rolls out measures to boost foreign investment</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202411/06/content_WS672ac25fc6d0868f4e8eca19.html\">China revises rules to ease foreign strategic investment in listed firms</a></li>\n \n \n <li class=\"Font_Georgia\"><a shape=\"rect\" href=\"//english.www.gov.cn/policies/featured/202410/25/content_WS671b6f0ec6d0868f4e8ec4ce.html\">China to further expand opening-up in value-added telecom services</a></li>\n \n \n \n </ul>\n </div>\n <div class=\"Home_Foreigner_Icons\"> \n \n <ul>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/investment\"><img src=\"/static/2023GW/images/Home_Icon4.png\"></a></p>\n <h4> \n <a shape=\"rect\" href=\"//english.www.gov.cn/services/investment\">INVEST IN CHINA</a> \n </h4>\n </li> \n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/doingbusiness\"><img src=\"/static/2023GW/images/Home_Icon5.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/doingbusiness\">DO BUSINESS IN CHINA</a></h4>\n </li>\n \n <li>\n <p><a shape=\"rect\" href=\"//english.www.gov.cn/services/thriveinchina\"><img src=\"/static/2023GW/images/Home_Icon6.png\"></a></p>\n <h4><a shape=\"rect\" href=\"//english.www.gov.cn/services/thriveinchina\">THRIVE IN CHINA</a></h4>\n </li> \n </ul>\n \n </div>\n </div>\n </div>\n </div>\n\n </div>\n <!-- Home_LinkFeedback_Box -->\n <div class=\"Home_LinkFeedback_Box\">\n <div class=\"Home_LinkFeedback_Div Cen1280\">\n <div class=\"Home_Link_Div FLeft\">\n <div class=\"Home_Type_Item_Title Font_Trebuchet\">\n LINKS\n </div>\n <div class=\"Home_Link_List\">\n <ul>\n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641ac985c6d0f528699db880.html\">Ministry of Foreign Affairs</a></li> \n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641ac9d1c6d0f528699db881.html\">Ministry of Commerce</a></li> \n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641ac9fac6d0f528699db882.html\">National Development and Reform Commission</a></li> \n \n \n <li><a shape=\"rect\" href=\"//english.www.gov.cn/Homepage/641ab0f7c6d0f528699db863/202303/22/content_WS641aca31c6d0f528699db883.html\">National Immigration Administration</a></li> \n \n \n </ul>\n </div>\n </div>\n <!-- SERVICES -->\n <div class=\"Home_Feedback_Div FLeft\">\n <div class=\"Home_Feedback_Title Font_Trebuchet\">\n <a href=\"//english.www.gov.cn/feedback/\" shape=\"rect\">FEEDBACK</a>\n </div>\n \n \n <h3 class=\"Font_Trebuchet\"><a shape=\"rect\" href=\"//english.www.gov.cn/services/202412/25/content_WS5e04749bc6d0554996894a1a.html\">RESPONSES</a></h3>\n \n \n <h3 class=\"Font_Trebuchet\"><a shape=\"rect\" href=\"//english.www.gov.cn/services/202406/18/content_WS5f1507b2c6d00bd0989c6404.html\">FAQ</a></h3>\n \n \n </div>\n </div>\n </div>\n \n \n <div class=\"Bottom_Div\">\n <!-- 20230327 DESKTOP --> \n <h4><a href=\"javascript:void(0)\">Desktop</a></h4>\n <h3><span>Copyright© <a href=\"//www.gov.cn/\" target=\"_blank\">www.gov.cn</a></span> | <span><a href=\"mailto:english@mail.gov.cn\">Contact us</a> </span> </h3>\n <h3>Website Identification Code bm01000001</h3> \n <h3><a href=\"//beian.miit.gov.cn/#/Integrated/index\" shape=\"rect\" target=\"_blank\">Registration Number: 05070218</a></h3> \n </div>\n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" src=\"/static/common/js/initBottom.js\"></script>\n \n \n </div>\n </div>\n \n <script xml:space=\"preserve\">\n //<![CDATA[\n PC_init();\n Mobile_init();\n\n if ($(window).width() <= 600) {\n //移动端\n\n } else {\n //转pc端\n\n }\n $('.BackToTop_IMG').click(function () {\n $('html , body').animate({\n scrollTop: 0\n }, 'slow');\n })\n\n function Mobile_init() {\n var swiper1 = new Swiper('.mHome_Focus_Swiper', {\n slidesPerView: 1,\n centeredSlides: false,\n paginationClickable: true,\n spaceBetween: 30,\n loop: true,\n pagination: {\n el: '.mHome_Focus_pagination',\n clickable: true,\n },\n autoplay: {\n delay: 3000,// 3秒切换\n },\n // navigation: {\n // nextEl: '.Home_Focus_BTNext',\n // prevEl: '.Home_Focus_BTPrev',\n // },\n });\n var swiper_AD = new Swiper('.Home_AD_Swiper', {\n slidesPerView: 1,\n centeredSlides: false,\n paginationClickable: true,\n spaceBetween: 30,\n loop: true,\n // pagination: {\n // el: '.mHome_Focus_pagination',\n // clickable: true,\n // },\n autoplay: {\n delay: 3000,// 3秒切换\n },\n // navigation: {\n // nextEl: '.Home_Focus_BTNext',\n // prevEl: '.Home_Focus_BTPrev',\n // },\n });\n }\n\n function PC_init() {\n // var swiper1 = new Swiper('.Home_Focus_Swiper', {\n // slidesPerView: 1,\n // centeredSlides: false,\n // paginationClickable: true,\n // spaceBetween: 30,\n // loop: true,\n // pagination: {\n // el: '.Home_Focus_pagination',\n // clickable: true,\n // },\n // autoplay: {\n // delay: 3000,// 3秒切换\n // },\n // navigation: {\n // nextEl: '.Home_Focus_BTNext',\n // prevEl: '.Home_Focus_BTPrev',\n // },\n // });\n }\n //]]>\n</script>\n \n <!-- 20240520 syx jianrong -->\n <script xml:space=\"preserve\">\n //<![CDATA[\n $(function () {\n trs_home.init();\n })\n\n var trs_home = (function () {\n function init() {\n nFocus()\n }\n \n function nFocus() {\n var sliderElement = $('.slider_carousel');\n sliderElement.find('*').attr(\"tabindex\", \"-1\");\n sliderElement.find('.item>h4>a').attr(\"tabindex\", \"0\");\n var firstIn = true;\n $(document).on(\"keydown\", function (e) {\n var $this = $(e.target);\n // 如果不是无障碍状态,则让轮播图自动播放后返回\n if (!(typeof aria != \"undefined\" && aria.status())) {\n sliderElement.removeAttr(\"cur\")\n sliderElement.find(\".slidesjs-play\").click();\n firstIn = true;\n return;\n }\n // 如果不是 tab键,则返回\n var keycode = event.which || event.keycode\n if (keycode != 9) {\n return;\n }\n // 判断当前事件元素是否在 slider_carousel 及 slider_carousel内,如果是\n // 先停止自动播放\n // 对元素进行无焦点处理(因元素是动态生成的)\n // 同时指定 标题栏元素是有焦点的 \n \n })\n\n sliderElement.slidesjs({\n // width: 240,\n // height: 528,\n play: {\n auto: true,\n swap: true,\n active: true,\n effect: 'fade'\n },\n navigation: {\n effect: \"fade\"\n },\n pagination: {\n effect: \"fade\"\n },\n effect: {\n slide: {\n speed: 400\n }\n },\n });\n var slidernav = sliderElement.find('.slidesjs-navigation');\n slidernav.hide();\n sliderElement.hover(function () {\n slidernav.stop().show()\n }, function () {\n slidernav.stop().hide()\n });\n\n slidernav.hover(function () {\n $(this).show();\n },\n function () {\n $(this).show();\n });\n\n }\n\n return {\n init: init\n }\n })()\n //]]>\n</script>\n <!-- 20240520 syx jianrong -->\n \n<script xml:space=\"preserve\" src=\"/static/2023GW/js/PubFunction.js?i=1\"></script>\n \n\n\n \n <script type=\"text/javascript\" charset=\"utf-8\" rel=\"stylesheet\" async=\"async\" src=\"/static/common/js/gov_webdig.js\"></script>\n \n \n \n \n \n</body></html>"
  66. doc, err := goquery.NewDocumentFromReader(strings.NewReader(htmlContent))
  67. if err != nil {
  68. log.Fatal(err)
  69. }
  70. // 获取 <title>
  71. title := doc.Find("title").Text()
  72. // 查找包含“版权所有”的文本节点
  73. var copyright string
  74. doc.Find("p").Each(func(i int, s *goquery.Selection) {
  75. text := strings.TrimSpace(s.Text())
  76. if strings.Contains(text, "版权所有") {
  77. copyright = text
  78. }
  79. })
  80. fmt.Println("标题内容:", title)
  81. fmt.Println("版权信息:", copyright)
  82. //a := []int{1, 2, 3}
  83. //b := make([]int, 0)
  84. //for _, v := range a {
  85. // b = append(b, v)
  86. //}
  87. //log.Println(b)
  88. }
  89. func TestB(T *testing.T) {
  90. CollArr := []string{"company_base", "company_employee", "company_history_name", "company_partner", "annual_report_base", "annual_report_website",
  91. "special_enterprise", "special_foundation", "special_gov_unit", "special_hongkong_company", "special_law_office", "special_social_organ", "special_trade_union"}
  92. for _, v := range CollArr {
  93. switch v {
  94. case "company_base":
  95. fmt.Println("company_base")
  96. case "company_employee":
  97. fmt.Println("company_employee")
  98. case "special_enterprise", "special_foundation", "special_gov_unit", "special_hongkong_company", "special_law_office", "special_social_organ", "special_trade_union":
  99. fmt.Println("special")
  100. }
  101. }
  102. }
  103. // TestGetArea 获取行政区划 城市区划代码
  104. func TestGetArea(T *testing.T) {
  105. //url := "http://xzqh.mca.gov.cn/getInfo?code=100000&type=2" //省份列表
  106. //url := "http://xzqh.mca.gov.cn/getInfo?code=100000&type=2" //省份列表
  107. //url := "http://xzqh.mca.gov.cn/data/120000_Point.geojson" //
  108. url := "http://xzqh.mca.gov.cn/data/quanguo_Point.geojson" //
  109. resp, err := http.Get(url)
  110. if err != nil {
  111. log.Printf("Error %v", err)
  112. return
  113. }
  114. defer resp.Body.Close()
  115. if resp.StatusCode != http.StatusOK {
  116. log.Printf("Error getting watcher execution status. Status code: %d", resp.StatusCode)
  117. return
  118. }
  119. var result map[string]interface{}
  120. err = json.NewDecoder(resp.Body).Decode(&result)
  121. if err != nil {
  122. log.Printf("Error decoding watcher execution result: %v", err)
  123. return
  124. }
  125. //if len(result) > 0 {
  126. // for k, _ := range result {
  127. // log.Println(k)
  128. // urlD := fmt.Sprintf("http://xzqh.mca.gov.cn/data/%s_Point.geojson", "810000")
  129. // resp, err := http.Get(urlD)
  130. // if err != nil {
  131. // log.Printf("Error %v", err)
  132. // return
  133. // }
  134. // defer resp.Body.Close()
  135. //
  136. // var resultD map[string]interface{}
  137. // err = json.NewDecoder(resp.Body).Decode(&resultD)
  138. // if err != nil {
  139. // log.Printf("Error decoding watcher execution result: %v", err)
  140. // }
  141. //
  142. // }
  143. //}
  144. //log.Println(result)
  145. }