
from scraping.tools import *
from docopt import docopt

if __name__ == '__main__':
    arguments = docopt(__doc__, version='IEEE Xplore API Request')

parameters = [arguments['-au'], arguments['-ti'], arguments['-ab'],
              arguments['-py'], arguments['-hc']]

standard = 'http://ieeexplore.ieee.org/gateway/ipsSearch.jsp?'

url = create_url_search(parameters=parameters, standard=standard)
root = fetch_xml(url)

parents = root.getchildren()
[parents.remove(parents[0]) for _ in range(2)]

for document in parents:
    article = xml_to_dict(document)
    post = iee_to_axelbib(article)
    send = post_to_axelbib(post)


from scraping.tools import *
from docopt import docopt

if __name__ == '__main__':
    arguments = docopt(__doc__, version='IEEE Xplore API Request')

parameters = [arguments['-au'], arguments['-ti'], arguments['-ab'],
              arguments['-py'], arguments['-hc']]

standard = 'http://ieeexplore.ieee.org/gateway/ipsSearch.jsp?'

url = create_url_search(parameters=parameters, standard=standard)
root = fetch_xml(url)

parents = root.getchildren()
for _ in range(2): parents.remove(parents[0])

for document in parents:
    article = xml_to_dict(document)
    post = iee_to_axelbib(article)
    send = post_to_axelbib(post)

Fix loop to delete branches from xml.
Fix loop to delete branches from xml.

  
  from scraping.tools import *
  from docopt import docopt
  
  if __name__ == '__main__':
      arguments = docopt(__doc__, version='IEEE Xplore API Request')
  
  parameters = [arguments['-au'], arguments['-ti'], arguments['-ab'],
                arguments['-py'], arguments['-hc']]
  
  standard = 'http://ieeexplore.ieee.org/gateway/ipsSearch.jsp?'
  
  url = create_url_search(parameters=parameters, standard=standard)
  root = fetch_xml(url)
  
  parents = root.getchildren()
- [parents.remove(parents[0]) for _ in range(2)]
+ for _ in range(2): parents.remove(parents[0])
  
  for document in parents:
      article = xml_to_dict(document)
      post = iee_to_axelbib(article)
      send = post_to_axelbib(post)
  
Fix loop to delete branches from xml.
## Code Before:

from scraping.tools import *
from docopt import docopt

if __name__ == '__main__':
    arguments = docopt(__doc__, version='IEEE Xplore API Request')

parameters = [arguments['-au'], arguments['-ti'], arguments['-ab'],
              arguments['-py'], arguments['-hc']]

standard = 'http://ieeexplore.ieee.org/gateway/ipsSearch.jsp?'

url = create_url_search(parameters=parameters, standard=standard)
root = fetch_xml(url)

parents = root.getchildren()
[parents.remove(parents[0]) for _ in range(2)]

for document in parents:
    article = xml_to_dict(document)
    post = iee_to_axelbib(article)
    send = post_to_axelbib(post)

## Instruction:
Fix loop to delete branches from xml.
## Code After:

from scraping.tools import *
from docopt import docopt

if __name__ == '__main__':
    arguments = docopt(__doc__, version='IEEE Xplore API Request')

parameters = [arguments['-au'], arguments['-ti'], arguments['-ab'],
              arguments['-py'], arguments['-hc']]

standard = 'http://ieeexplore.ieee.org/gateway/ipsSearch.jsp?'

url = create_url_search(parameters=parameters, standard=standard)
root = fetch_xml(url)

parents = root.getchildren()
for _ in range(2): parents.remove(parents[0])

for document in parents:
    article = xml_to_dict(document)
    post = iee_to_axelbib(article)
    send = post_to_axelbib(post)
