nebius/SWE-bench-extra huggingface dataset:
Repository: streamlink/streamlink

Issue:
[patch] Support https on tvcatchup.com
The problem:
```
tmp (lonefox): streamlink https://tvcatchup.com/watch/bbcone best
error: No plugin can handle URL: https://tvcatchup.com/watch/bbcone
```

The solution:
```
diff -bur streamlink-0.12.1-orig/src/streamlink/plugins/tvcatchup.py streamlink-0.12.1/src/streamlink/plugins/tvcatchup.py
--- streamlink-0.12.1-orig/src/streamlink/plugins/tvcatchup.py	2018-05-07 18:01:30.000000000 +0300
+++ streamlink-0.12.1/src/streamlink/plugins/tvcatchup.py	2018-05-26 08:54:47.000000000 +0300
@@ -5,7 +5,7 @@
 from streamlink.stream import HLSStream
 
 USER_AGENT = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
-_url_re = re.compile(r"http://(?:www\.)?tvcatchup.com/watch/\w+")
+_url_re = re.compile(r"https?://(?:www\.)?tvcatchup.com/watch/\w+")
 _stream_re = re.compile(r'''source.*?(?P<q>["'])(?P<stream_url>https?://.*m3u8\?.*clientKey=.*?)(?P=q)''')
 
 

```

Comments:

Patch:
diff --git a/src/streamlink/plugins/tvcatchup.py b/src/streamlink/plugins/tvcatchup.py
index ca6a60d2..bd150295 100644
--- a/src/streamlink/plugins/tvcatchup.py
+++ b/src/streamlink/plugins/tvcatchup.py
@@ -5,7 +5,7 @@ from streamlink.plugin.api import http
 from streamlink.stream import HLSStream
 
 USER_AGENT = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"
-_url_re = re.compile(r"http://(?:www\.)?tvcatchup.com/watch/\w+")
+_url_re = re.compile(r"https?://(?:www\.)?tvcatchup.com/watch/\w+")
 _stream_re = re.compile(r'''source.*?(?P<q>["'])(?P<stream_url>https?://.*m3u8\?.*clientKey=.*?)(?P=q)''')
 
 


Test patch:
diff --git a/tests/test_plugin_tvcatchup.py b/tests/test_plugin_tvcatchup.py
new file mode 100644
index 00000000..d52b81cd
--- /dev/null
+++ b/tests/test_plugin_tvcatchup.py
@@ -0,0 +1,16 @@
+import unittest
+
+from streamlink.plugins.tvcatchup import TVCatchup
+
+
+class TestPluginTVCatchup(unittest.TestCase):
+    def test_can_handle_url(self):
+        # should match
+        self.assertTrue(TVCatchup.can_handle_url("http://tvcatchup.com/watch/bbcone"))
+        self.assertTrue(TVCatchup.can_handle_url("http://www.tvcatchup.com/watch/five"))
+        self.assertTrue(TVCatchup.can_handle_url("https://www.tvcatchup.com/watch/bbctwo"))
+
+        # shouldn't match
+        self.assertFalse(TVCatchup.can_handle_url("http://www.tvplayer.com/"))
+        self.assertFalse(TVCatchup.can_handle_url("http://www.tvcatchup.com/"))
+        self.assertFalse(TVCatchup.can_handle_url("http://www.youtube.com/"))
\ No newline at end of file
Repository: streamlink/streamlink

Issue:
Plugin: cdnbg
Domain for BSTV has been changed to https://live.bstv.bg/.

Comments:

Patch:
diff --git a/src/streamlink/plugins/cdnbg.py b/src/streamlink/plugins/cdnbg.py
index 79b0172b..ee7a8a82 100644
--- a/src/streamlink/plugins/cdnbg.py
+++ b/src/streamlink/plugins/cdnbg.py
@@ -23,6 +23,7 @@ class CDNBG(Plugin):
             mmtvmusic\.com/live|
             mu-vi\.tv/LiveStreams/pages/Live\.aspx|
             videochanel\.bstv\.bg|
+            live\.bstv\.bg|
             bloombergtv.bg/video
         )/?
     """, re.VERBOSE)


Test patch:
diff --git a/tests/plugins/test_cdnbg.py b/tests/plugins/test_cdnbg.py
index b98b16ee..898cb598 100644
--- a/tests/plugins/test_cdnbg.py
+++ b/tests/plugins/test_cdnbg.py
@@ -23,6 +23,7 @@ class TestPluginCDNBG(unittest.TestCase):
         self.assertTrue(CDNBG.can_handle_url("https://mmtvmusic.com/live/"))
         self.assertTrue(CDNBG.can_handle_url("http://mu-vi.tv/LiveStreams/pages/Live.aspx"))
         self.assertTrue(CDNBG.can_handle_url("http://videochanel.bstv.bg/"))
+        self.assertTrue(CDNBG.can_handle_url("http://live.bstv.bg/"))
         self.assertTrue(CDNBG.can_handle_url("https://www.bloombergtv.bg/video"))
 
         # shouldn't match
Repository: streamlink/streamlink

Issue:
bigoweb.co / bigolive.tv plugin no longer works


----

### Checklist

- [x] This is a bug report.
- [ ] This is a plugin request.
- [ ] This is a feature request.
- [ ] I used the search function to find already opened/closed issues or pull requests.

### Description
error: No plugin can handle bigoweb.co addressess as of 10 minutes ago

### Expected / Actual behavior

10 minutes ago it worked fine and now it gives an error.
...

### Reproduction steps / Stream URLs to test

1. ...http://www.bigoweb.co/ (any stream)
2. ...
3. ...

### Environment details (operating system, python version, etc.)

...

### Comments, logs, screenshots, etc.

...


Comments:

Patch:
diff --git a/src/streamlink/plugins/bigo.py b/src/streamlink/plugins/bigo.py
index 98101c78..365d38cd 100644
--- a/src/streamlink/plugins/bigo.py
+++ b/src/streamlink/plugins/bigo.py
@@ -47,7 +47,7 @@ class BigoStream(Stream):
 
 
 class Bigo(Plugin):
-    _url_re = re.compile(r"https?://(live.bigo.tv/\d+|bigoweb.co/show/\d+)")
+    _url_re = re.compile(r"https?://(?:www\.)?(bigo\.tv/\d+|bigoweb\.co/show/\d+)")
     _flashvars_re = flashvars = re.compile(
         r'''^\s*(?<!<!--)<param.*value="tmp=(\d+)&channel=(\d+)&srv=(\d+\.\d+\.\d+\.\d+)&port=(\d+)"''',
         re.M)


Test patch:
diff --git a/tests/test_plugin_bigo.py b/tests/test_plugin_bigo.py
new file mode 100644
index 00000000..99bd4e17
--- /dev/null
+++ b/tests/test_plugin_bigo.py
@@ -0,0 +1,31 @@
+import unittest
+
+from streamlink.plugins.bigo import Bigo
+
+
+class TestPluginBongacams(unittest.TestCase):
+    def test_can_handle_url(self):
+        # Correct urls
+        self.assertTrue(Bigo.can_handle_url("http://www.bigoweb.co/show/00000000"))
+        self.assertTrue(Bigo.can_handle_url("https://www.bigoweb.co/show/00000000"))
+        self.assertTrue(Bigo.can_handle_url("http://bigoweb.co/show/00000000"))
+        self.assertTrue(Bigo.can_handle_url("https://bigoweb.co/show/00000000"))
+        self.assertTrue(Bigo.can_handle_url("http://bigo.tv/00000000"))
+        self.assertTrue(Bigo.can_handle_url("https://bigo.tv/00000000"))
+        self.assertTrue(Bigo.can_handle_url("https://www.bigo.tv/00000000"))
+        self.assertTrue(Bigo.can_handle_url("http://www.bigo.tv/00000000"))
+
+        # Old URLs don't work anymore
+        self.assertFalse(Bigo.can_handle_url("http://live.bigo.tv/00000000"))
+        self.assertFalse(Bigo.can_handle_url("https://live.bigo.tv/00000000"))
+
+        # Wrong URL structure
+        self.assertFalse(Bigo.can_handle_url("ftp://www.bigo.tv/00000000"))
+        self.assertFalse(Bigo.can_handle_url("https://www.bigo.tv/show/00000000"))
+        self.assertFalse(Bigo.can_handle_url("http://www.bigo.tv/show/00000000"))
+        self.assertFalse(Bigo.can_handle_url("http://bigo.tv/show/00000000"))
+        self.assertFalse(Bigo.can_handle_url("https://bigo.tv/show/00000000"))
+
+
+if __name__ == "__main__":
+    unittest.main()
Repository: sunpy/sunpy

Issue:
Header helper is bugged when creating a PCij matrix from a rotation angle for rectangular pixels
As [noted on the mailing list](https://groups.google.com/d/msgid/sunpy/0352a093-e23d-4681-8113-e560bd2be92an%40googlegroups.com), the calculation in the header helper of a PCij matrix from a rotation angle is incorrect when working with rectangular pixels (`CDELT1` not equal to `CDELT2`) because `lam` is the inverse of what it should be:
https://github.com/sunpy/sunpy/blob/1fa82dd5e39282ab392ae1b8ac4ad3c66b6d65da/sunpy/map/header_helper.py#L156

The analogous bug was fixed in `GenericMap` in #5766, but was missed in the header helper.

Comments:

Patch:
diff --git a/changelog/6597.bugfix.rst b/changelog/6597.bugfix.rst
new file mode 100644
index 000000000..17fb0e881
--- /dev/null
+++ b/changelog/6597.bugfix.rst
@@ -0,0 +1,1 @@
+Fixed the incorrect calculation in :func:`~sunpy.map.header_helper.make_fitswcs_header` of the rotation matrix from a rotation angle when the pixels are non-square.
diff --git a/sunpy/map/header_helper.py b/sunpy/map/header_helper.py
index f899b83eb..65faa7908 100644
--- a/sunpy/map/header_helper.py
+++ b/sunpy/map/header_helper.py
@@ -169,7 +169,7 @@ def _set_rotation_params(meta_wcs, rotation_angle, rotation_matrix):
         rotation_angle = 0 * u.deg
 
     if rotation_angle is not None:
-        lam = meta_wcs['cdelt1'] / meta_wcs['cdelt2']
+        lam = meta_wcs['cdelt2'] / meta_wcs['cdelt1']
         p = np.deg2rad(rotation_angle)
 
         rotation_matrix = np.array([[np.cos(p), -1 * lam * np.sin(p)],


Test patch:
diff --git a/sunpy/map/tests/test_header_helper.py b/sunpy/map/tests/test_header_helper.py
index fefd01816..1a3d5efe5 100644
--- a/sunpy/map/tests/test_header_helper.py
+++ b/sunpy/map/tests/test_header_helper.py
@@ -66,7 +66,14 @@ def test_metakeywords():
     assert isinstance(meta, dict)
 
 
-def test_deafult_rotation(map_data, hpc_coord):
+def test_scale_conversion(map_data, hpc_coord):
+    # The header will have cunit1/2 of arcsec
+    header = make_fitswcs_header(map_data, hpc_coord, scale=[1, 2] * u.arcmin / u.pix)
+    assert header['cdelt1'] == 60
+    assert header['cdelt2'] == 120
+
+
+def test_default_rotation(map_data, hpc_coord):
     header = make_fitswcs_header(map_data, hpc_coord)
     wcs = WCS(header)
     np.testing.assert_allclose(wcs.wcs.pc, [[1, 0], [0, 1]], atol=1e-5)
@@ -79,6 +86,13 @@ def test_rotation_angle(map_data, hpc_coord):
     np.testing.assert_allclose(wcs.wcs.pc, [[0, -1], [1, 0]], atol=1e-5)
 
 
+def test_rotation_angle_rectangular_pixels(map_data, hpc_coord):
+    header = make_fitswcs_header(map_data, hpc_coord, scale=[2, 5] * u.arcsec / u.pix,
+                                 rotation_angle=45*u.deg)
+    wcs = WCS(header)
+    np.testing.assert_allclose(wcs.wcs.pc, np.sqrt(0.5) * np.array([[1, -2.5], [0.4, 1]]), atol=1e-5)
+
+
 def test_rotation_matrix(map_data, hpc_coord):
     header = make_fitswcs_header(map_data, hpc_coord,
                                  rotation_matrix=np.array([[1, 0], [0, 1]]))