Skip to content

Commit

Permalink
adjusting get_all_de
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazztok45 committed Mar 6, 2024
1 parent 8d55593 commit cef8a84
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/zbmath_rest2oai/get_all_de.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@
# from https://stackoverflow.com/a/38677619/9215209


def get_all_de(api_source, csv_url, prefix):
with requests.get(csv_url, stream=True) as r:
lines = (line.decode('utf-8') for line in r.iter_lines())
for row in csv.reader(lines):
de = row[0]
try:
write_oai(de, api_source, prefix)
except Exception as error:
print(de, error, file=sys.stderr)
def get_all_de(api_source, prefix):
try:
write_oai(api_source, prefix)
except Exception as error:
print(error, file=sys.stderr)


0 comments on commit cef8a84

Please sign in to comment.