Skip to content

Commit

Permalink
hindawi: added curl headers for API call
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestaP committed May 29, 2024
1 parent f9118d7 commit b602e5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hepcrawl/spiders/hindawi_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def __init__(self, source_file=None, *args, **kwargs):
def start_requests(self):
"""Default starting point for scraping shall be the local XML file."""
self.log('Harvest started.', logging.INFO)
yield Request(self.source_file)
headers = {
'User-Agent': 'curl/7.64.1'
}
yield Request(self.source_file, headers=headers)

def parse_node(self, response, node):
self.log('Parsing node...', logging.INFO)
Expand Down

0 comments on commit b602e5d

Please sign in to comment.