Przeglądaj źródła

[webpages] Properly use user agent header

Colin Powell 1 rok temu
rodzic
commit
d1dfc5502d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      vrobbler/apps/webpages/models.py

+ 1 - 1
vrobbler/apps/webpages/models.py

@@ -70,7 +70,7 @@ class WebPage(ScrobblableMixin):
 
     def _update_data_from_web(self, force=True):
         headers = {
-            "headers": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0"
+            "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0"
         }
         raw_text = requests.get(self.url, headers=headers).text
         if not self.title or force: