Advertisement
Guest User

Untitled

a guest
Apr 28th, 2019
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. >>> import requests
  2. >>> from bs4 import BeautifulSoup
  3. >>> news_html=requests.get("https://tw.stock.yahoo.com/rss/url/d/e/N2.html#")
  4. >>> soup=BeautifulSoup(news_html.text,"html.parser")
  5. >>> soup
  6. <?xml version="1.0" encoding="Big5" ?>
  7. <?xml-stylesheet title="XSL_formatting" type="text/xsl" href="https://tw.stock.yahoo.com//nolsol.xsl"?>
  8. <rss version="2.0">
  9. <channel>
  10. <language>zh-tw</language>
  11. <lastbuilddate>Sun, 28 Apr 2019 07:58:36 GMT</lastbuilddate>
  12. <title>Yahoo!奇摩股市 - 台股盤勢</title>
  13. <link/>https://tw.stock.yahoo.com/
  14. <description>Yahoo!奇摩股市</description>
  15. <ttl>5</ttl>
  16. <image/>
  17. <title>Yahoo!奇摩股市 - 台股盤勢</title>
  18. <url>https://s.yimg.com/rz/d/yahoo_finance_zh-Hant-TW_s_f_p_bestfit_stock.png</url>
  19. <link/>https://tw.stock.yahoo.com/
  20.  
  21. <item>
  22. <title><![CDATA[《台北股市》台股止跌,聚焦摩台期結算、法說會]]></title>
  23. <link/>https://tw.stock.yahoo.com/news/台北股市-台股止跌-聚焦摩台期結算-法說會-075836219.html
  24. <pubdate>Sun, 28 Apr 2019 15:58:36 CST</pubdate>
  25. <guid ispermalink="false"></guid>
  26. <description><![CDATA[【時報-台北電】台股上周連四日維持緩步上揚走勢,但26日受前一日美半導體股大幅下挫影響,指數跌破11,000點關卡。本周盤勢拚止跌回穩,聚焦摩台期結算以及科技法說會兩大因素,前者留意外資操作動向,後者...]]></description>
  27. </item><item>
  28. <title><![CDATA[《各報要聞》美日貿談順利,5月底簽協議]]></title>
  29. <link/>https://tw.stock.yahoo.com/news/各報要聞-美日貿談順利-5月底簽協議-010046482.html
  30. <pubdate>Sun, 28 Apr 2019 09:00:46 CST</pubdate>
  31. <guid ispermalink="false"></guid>
  32. <description><![CDATA[【時報-台北電】在中美貿易談判出現進展的同時,美國總統川普也明確表示,希望盡快與日本達成協議。川普26日指出,在他5月底出訪日本之前,美國可望與日本簽署新的雙邊貿易協議。  川普26日在白宮橢圓辦公室...]]></description>
  33. </item><item>
  34. <title><![CDATA[《各報要聞》台電掛保證,6月起供電免驚]]></title>
  35. <link/>https://tw.stock.yahoo.com/news/各報要聞-台電掛保證-6月起供電免驚-010046368.html
  36. <pubdate>Sun, 28 Apr 2019 09:00:46 CST</pubdate>
  37. <guid ispermalink="false"></guid>
  38. <description><![CDATA[【時報-台北電】4月用電量已創新高紀錄,缺電危機再起。根據台電內部推估,今夏尖峰用電將達3,770萬瓩,再創新高,因此通霄、林口新機組陸續上線,必須使命必達,6月起可望亮出代表供電充裕的「綠燈」,備轉...]]></description>
  39. </item><item>
  40. <title><![CDATA[《各報要聞》15條好漢,選前半年提前凍蒜]]></title>
  41. <link/>https://tw.stock.yahoo.com/news/各報要聞-15條好漢-選前半年提前凍蒜-010046188.html
  42. <pubdate>Sun, 28 Apr 2019 09:00:46 CST</pubdate>
  43. <guid ispermalink="false"></guid>
  44. <description><![CDATA[【時報-台北電】總統大選各方推舉人選話題炒的沸沸揚揚,市場專家指出,選舉常成股市靈藥,今明兩年在台美總統大選撐盤下,股市高檔行情有望;以過去近兩屆總統選舉來看,包括台積電、雙鴻等15個股,在選前半年股...]]></description>
  45. </item><item>
  46. <title><![CDATA[《各報要聞》16檔夠利,首季EPS大躍進]]></title>
  47. <link/>https://tw.stock.yahoo.com/news/各報要聞-16檔夠利-首季eps大躍進-010045860.html
  48. <pubdate>Sun, 28 Apr 2019 09:00:45 CST</pubdate>
  49. <guid ispermalink="false"></guid>
  50. <description><![CDATA[【時報-台北電】上市櫃公司第一季財報陸續公告,投資專家指出,愈早公布財報的公司獲利表現優異的機率愈高,全年展望也樂觀。據統計,包括高雄銀、凱美、美律等16檔個股,今年第一季每股稅後盈餘(EPS)大躍進...]]></description>
  51. </item><item>
  52. <title><![CDATA[《各報要聞》小英總統上街!2020大選,能源議題直球對決]]></title>
  53. <link/>https://tw.stock.yahoo.com/news/各報要聞-小英總統上街-2020大選-能源議題直球對決-010045224.html
  54. <pubdate>Sun, 28 Apr 2019 09:00:45 CST</pubdate>
  55. <guid ispermalink="false"></guid>
  56. <description><![CDATA[【時報-台北電】2019廢核遊行27日在台北登場,引爆反核、擁核兩陣營大車拚。有意參選2020總統大選的總統蔡英文、行政院前院長賴清德都現身力挺廢核,與此同時,國民黨總統初選參選人朱立倫則提出質疑,民...]]></description>
  57. </item><item>
  58. <title><![CDATA[《各報要聞》沒錢繳稅?銀行推優惠信貸救急]]></title>
  59. <link/>https://tw.stock.yahoo.com/news/各報要聞-沒錢繳稅-銀行推優惠信貸救急-010045854.html
  60. <pubdate>Sun, 28 Apr 2019 09:00:45 CST</pubdate>
  61. <guid ispermalink="false"></guid>
  62. <description><![CDATA[【時報-台北電】綜所稅繳稅起跑進入倒數計時階段,為因應民眾繳稅的資金需求,今年各銀行除推出「零利率分期刷卡繳稅」措施,緩解民眾繳稅資金需求外,不少銀行還加碼,推出限定期間的信用貸款優惠利率方案。  台...]]></description>
  63. </item><item>
  64. <title><![CDATA[《各報要聞》美股超High,單周兩度創新高]]></title>
  65. <link/>https://tw.stock.yahoo.com/news/各報要聞-美股超high-單周兩度創新高-010045985.html
  66. <pubdate>Sun, 28 Apr 2019 09:00:45 CST</pubdate>
  67. <guid ispermalink="false"></guid>
  68. <description><![CDATA[【時報-台北電】受惠於美國首季GDP表現強勁,加上企業財報頻傳佳音,美股26日同步收高,激勵標準普爾500與那斯達克指數,一周來第二度刷新收盤歷史新高紀錄。  其中道瓊工業指數終場收高81.25點至2...]]></description>
  69. </item><item>
  70. <title><![CDATA[《各報要聞》農委會力推有機耕作、食材]]></title>
  71. <link/>https://tw.stock.yahoo.com/news/各報要聞-農委會力推有機耕作-食材-022843593.html
  72. <pubdate>Sat, 27 Apr 2019 10:28:43 CST</pubdate>
  73. <guid ispermalink="false"></guid>
  74. <description><![CDATA[【時報-各報要聞】行政院農業委員會主委陳吉仲26日表示,「有機農業促進法」5月即將實施,未來有機及友善耕作面積可望達到1.5萬公頃。他並揭櫫當前的政策目標是,讓消費者享有安全農產品及提升農民所得。  ...]]></description>
  75. </item><item>
  76. <title><![CDATA[《各報要聞》龍邦加碼泰山,放眼全家]]></title>
  77. <link/>https://tw.stock.yahoo.com/news/各報要聞-龍邦加碼泰山-放眼全家-022608069.html
  78. <pubdate>Sat, 27 Apr 2019 10:26:08 CST</pubdate>
  79. <guid ispermalink="false"></guid>
  80. <description><![CDATA[【時報-各報要聞】龍邦國際董事長林國興表示,龍邦今年第二季將有處分廈門不動產的大量現金落袋,獲利了結,正在「握著現金找錢賺!」除看好有投資價值如泰山的股票繼續加碼,不排除敲進其他優質金融股和老牌傳產股...]]></description>
  81. </item></channel>
  82. </rss>
  83. <!-- w229.finance.tw1.yahoo.com Sun Apr 28 10:46:03 UTC 2019 -->
  84.  
  85. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement