Преглед на файлове

[webpages] Properly use user agent header

Colin Powell преди 1 година
родител
ревизия
d1dfc5502d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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: