You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by yh...@apache.org on 2025/09/30 14:29:39 UTC

(beam) branch master updated: fix license script (#36328)

This is an automated email from the ASF dual-hosted git repository.

yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 292484f96a2 fix license script (#36328)
292484f96a2 is described below

commit 292484f96a24d1ec4e250cd529a5875caa5e9f23
Author: Radosław Stankiewicz <ra...@google.com>
AuthorDate: Tue Sep 30 16:29:31 2025 +0200

    fix license script (#36328)
    
    * fix license script
    
    * fix license script
    
    * fix license script
---
 sdks/java/container/license_scripts/pull_licenses_java.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sdks/java/container/license_scripts/pull_licenses_java.py b/sdks/java/container/license_scripts/pull_licenses_java.py
index 0c92769822c..7032b368284 100644
--- a/sdks/java/container/license_scripts/pull_licenses_java.py
+++ b/sdks/java/container/license_scripts/pull_licenses_java.py
@@ -142,7 +142,8 @@ def pull_from_url(file_name, url, dep, no_list, use_cache=False):
 def pull_source_code(base_url, dir_name, dep):
     # base_url example: https://repo1.maven.org/maven2/org/mortbay/jetty/jsp-2.1/6.1.14/
     try:
-      soup = BeautifulSoup(urlopen(base_url).read(), "html.parser")
+      soup = BeautifulSoup(urlopen(Request(base_url, headers={
+        'User-Agent': 'Apache Beam'})).read(), "html.parser")
     except:
       logging.error('Error reading source base from {base_url}'.format(base_url=base_url))
       raise