How to use the jssoup function in jssoup

To help you get started, we’ve selected a few jssoup examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fetacore / Infinitex / src / react / Grid.jsx View on Github external
request('http://gen.lib.rus.ec/search.php?&req=' + encodeURIComponent(this.state.paperKeyword) + '&view=detailed&res=100', (err, response, body) => {
      switch (err) {
        case null:
          switch (response.statusCode) {
            case 200:
              let ids = []
              var soup = new JSSoup(body).findAll('table')
              for (var i = 0; i < soup.length; i++) {
                if (soup[i].findAll('td').length == 43) {
                  ids.push(soup[i].findAll('td')[26].contents[0]._text)
                }
                if (i == soup.length - 1) {
                  request({ url: `http://gen.lib.rus.ec/json.php?ids=${ids.join(',')}&fields=*` },
                    (err, response, body) => {
                      switch (err) {
                        case null:
                          switch (response.statusCode) {
                            case 200:
                              this.setState({
                                literatureSearchResults: JSON.parse(body),
                                networkPageIndex: 4,
                                literatureSearchResultsDisplay: true
                              })

jssoup

JSSoup is a BeautifulSoup style HTML parser library.

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Popular jssoup functions