Software Alternatives & Reviews

Best way to define static data inside code

The New York Times CNN
  1. Breaking local & world news from the award-winning news platform.
    Type scrapeInfo struct { authorSelector string textSelector string url string } Var info = map[string]*scrapeInfo{ "NYTIMES": { authorSelector: ".author-names p", textSelector: ".container .news-text", url: "https://nytimes.com/", }, "CNN": {authorSelector: "#header .author", textSelector: "#body .text", url: "https://cnn.com/", }, "BBC": {authorSelector: ".author", textSelector: ".article-text", url: "https://bbc.uk/", }}.

    #RSS Reader #RSS #Social Networks 123 social mentions

  2. 2

    CNN

    View the latest news and breaking news today for U.S., world, weather, entertainment, politics and health at CNN.com.
    Type scrapeInfo struct { authorSelector string textSelector string url string } Var info = map[string]*scrapeInfo{ "NYTIMES": { authorSelector: ".author-names p", textSelector: ".container .news-text", url: "https://nytimes.com/", }, "CNN": {authorSelector: "#header .author", textSelector: "#body .text", url: "https://cnn.com/", }, "BBC": {authorSelector: ".author", textSelector: ".article-text", url: "https://bbc.uk/", }}.

    #RSS Reader #RSS #News & Books 277 social mentions

Discuss: Best way to define static data inside code

Log in or Post with